|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kahina.core.behavior.KahinaBehavior<T>
T - a subclass of KahinaObjectpublic class KahinaBehavior<T extends KahinaObject>
The generic ancestor class of all behavior classes.
Behaviors are Kahina's way of defining the application-specific behavior of complex components such as trees.
They usually determine how a complex object is constructed and how it reacts to incoming KahinaEvents.
A typical use case is LogicProgrammingTreeBehavior for control flow trees in logic programming.
This class is generic and can be specialized for any subclass of KahinaObject.
In an application, the user will usually want to inherit from a specialized variant such as KahinaTreeBehavior.
By default, a KahinaBehavior implements the KahinaListener interface, but it does not register itself with the event system.
For that purpose, implementations should use the KahinaRunner.getControl().registerListener mechanism.
| Field Summary | |
|---|---|
protected KahinaInstance |
kahina
The KahinaInstance this behavior is connected to |
protected T |
object
The KahinaObject that is being controlled by this behavior |
| Constructor Summary | |
|---|---|
KahinaBehavior(T object,
KahinaInstance kahina)
Class constructor specifying the controlled object and the KahinaInstance that it is connected to. |
|
| Method Summary | |
|---|---|
void |
processEvent(KahinaEvent e)
Does not react to any event by default; is overridden by implementations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected T extends KahinaObject object
protected KahinaInstance kahina
| Constructor Detail |
|---|
public KahinaBehavior(T object,
KahinaInstance kahina)
object - the KahinaObject of type T that is going to be controlled by the new instancekahina - the KahinaInstance that this behavior will belong to and communicate with| Method Detail |
|---|
public void processEvent(KahinaEvent e)
processEvent in interface KahinaListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||