org.kahina.core.behavior
Class KahinaTreeBehavior

java.lang.Object
  extended by org.kahina.core.behavior.KahinaBehavior<KahinaTree>
      extended by org.kahina.core.behavior.KahinaTreeBehavior
All Implemented Interfaces:
KahinaListener
Direct Known Subclasses:
LogicProgrammingTreeBehavior

public class KahinaTreeBehavior
extends KahinaBehavior<KahinaTree>

The ancestor class of all tree behavior classes.

A version of KahinaBehavior for defining the application-specific behavior of KahinaTrees. Implementations usually define the way a tree is constructed and how it reacts to incoming KahinaEvents. A typical use case is LogicProgrammingTreeBehavior for control flow tree in logic programming.

In an application, the user will usually want to inherit from this in order to define the behavior of tree components. By default, each 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
 
Fields inherited from class org.kahina.core.behavior.KahinaBehavior
kahina, object
 
Constructor Summary
KahinaTreeBehavior(KahinaTree tree, KahinaInstance kahina)
          Class constructor specifying the controlled tree and the KahinaInstance that it is connected to.
 
Method Summary
 
Methods inherited from class org.kahina.core.behavior.KahinaBehavior
processEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KahinaTreeBehavior

public KahinaTreeBehavior(KahinaTree tree,
                          KahinaInstance kahina)
Class constructor specifying the controlled tree and the KahinaInstance that it is connected to.

Parameters:
tree - the KahinaTree the behavior of which is going to be controlled by the new instance
kahina - the KahinaInstance that this behavior will belong to and communicate with