uk.co.agena.minerva.model.extendedbn
Class ExtendedNodeAdapter

java.lang.Object
  extended by uk.co.agena.minerva.model.extendedbn.ExtendedNodeAdapter
All Implemented Interfaces:
java.util.EventListener, ExtendedNodeListener

public class ExtendedNodeAdapter
extends java.lang.Object
implements ExtendedNodeListener

Defines an adapter for ExtendedNodes. Any object interested in events can instantiate a subclass of this adapter rather than implementing ModelListener. Only those methods that are needed by the subclass then need to be implemented.


Constructor Summary
ExtendedNodeAdapter()
           
 
Method Summary
 void extendedNodeAttributeChanged(ExtendedNodeEvent ene, int attribute)
          Called when selected attributes of the node are changed.
 void extendedNodeConnBNNotFound(ExtendedNodeEvent ene)
          Invoked whenever the a CoreBN is needed but is not initialised.
 void extendedNodeConnNodeIdChanged(ExtendedNodeEvent ene)
          Invoked when the ConnNodeId of an ExtendedNode is changed.
 void extendedNodeInconsistentEvidenceEntered(ExtendedNodeEvent ene)
          Invoked whenever an inconsistent evidence exception is thrown when entering evidence.
 void extendedNodeMarginalsChanged(ExtendedNodeEvent ene, boolean useMarginalDataSetForStateReplication)
          Invoked whenever the marginals of an ExtendedNode has changed.
 void extendedNodeStateNameChanged(ExtendedNodeEvent ene, ExtendedState es)
          Invoked when an ExtendedState name is changed.
 void extendedNodeStatesReplaced(ExtendedNodeEvent ene)
          Called when the node's states are replaced.
 void extendedNodeVariableAdded(ExtendedNodeEvent ene, Variable addedVarible)
          Invoked when a Variable is added to the ExtendedNodes VariableList.
 void extendedNodeVariableRemoved(ExtendedNodeEvent ene, Variable removedVarible)
          Invoked when a Variable is removed from the ExtendedNodes VariableList.
 void extendedNodeVisibleAttributeChanged(ExtendedNodeEvent ene, boolean visible)
          Invoked when an ExtendedNode visible attribute is changed.
 void extendedStateAdded(ExtendedNodeEvent ene)
          Invoked when an ExtendedState is added to this ExtendedNode
 void extendedStateRemoved(ExtendedNodeEvent ene, int indexOfStateRemoved)
          Invoked when an ExtendedState is removed from this ExtendedNode
 void nodeChanged(ExtendedNodeEvent ene)
          Called whenever a node changes (for selected events)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedNodeAdapter

public ExtendedNodeAdapter()
Method Detail

extendedNodeMarginalsChanged

public void extendedNodeMarginalsChanged(ExtendedNodeEvent ene,
                                         boolean useMarginalDataSetForStateReplication)
Description copied from interface: ExtendedNodeListener
Invoked whenever the marginals of an ExtendedNode has changed.

Specified by:
extendedNodeMarginalsChanged in interface ExtendedNodeListener
Parameters:
ene - the event encapsulating information about the change
useMarginalDataSetForStateReplication - TODO

extendedNodeInconsistentEvidenceEntered

public void extendedNodeInconsistentEvidenceEntered(ExtendedNodeEvent ene)
Description copied from interface: ExtendedNodeListener
Invoked whenever an inconsistent evidence exception is thrown when entering evidence.

Specified by:
extendedNodeInconsistentEvidenceEntered in interface ExtendedNodeListener
Parameters:
ene - the event encapsulating information about the change

extendedNodeConnBNNotFound

public void extendedNodeConnBNNotFound(ExtendedNodeEvent ene)
                                throws ExtendedBNException
Description copied from interface: ExtendedNodeListener
Invoked whenever the a CoreBN is needed but is not initialised.

Specified by:
extendedNodeConnBNNotFound in interface ExtendedNodeListener
Parameters:
ene - the event encapsulating information about the change
Throws:
ExtendedBNException

extendedStateAdded

public void extendedStateAdded(ExtendedNodeEvent ene)
Description copied from interface: ExtendedNodeListener
Invoked when an ExtendedState is added to this ExtendedNode

Specified by:
extendedStateAdded in interface ExtendedNodeListener

extendedStateRemoved

public void extendedStateRemoved(ExtendedNodeEvent ene,
                                 int indexOfStateRemoved)
Description copied from interface: ExtendedNodeListener
Invoked when an ExtendedState is removed from this ExtendedNode

Specified by:
extendedStateRemoved in interface ExtendedNodeListener

extendedNodeStateNameChanged

public void extendedNodeStateNameChanged(ExtendedNodeEvent ene,
                                         ExtendedState es)
Description copied from interface: ExtendedNodeListener
Invoked when an ExtendedState name is changed.

Specified by:
extendedNodeStateNameChanged in interface ExtendedNodeListener

extendedNodeVisibleAttributeChanged

public void extendedNodeVisibleAttributeChanged(ExtendedNodeEvent ene,
                                                boolean visible)
Description copied from interface: ExtendedNodeListener
Invoked when an ExtendedNode visible attribute is changed.

Specified by:
extendedNodeVisibleAttributeChanged in interface ExtendedNodeListener

extendedNodeConnNodeIdChanged

public void extendedNodeConnNodeIdChanged(ExtendedNodeEvent ene)
Description copied from interface: ExtendedNodeListener
Invoked when the ConnNodeId of an ExtendedNode is changed.

Specified by:
extendedNodeConnNodeIdChanged in interface ExtendedNodeListener

extendedNodeStatesReplaced

public void extendedNodeStatesReplaced(ExtendedNodeEvent ene)
Description copied from interface: ExtendedNodeListener
Called when the node's states are replaced.

Specified by:
extendedNodeStatesReplaced in interface ExtendedNodeListener

extendedNodeAttributeChanged

public void extendedNodeAttributeChanged(ExtendedNodeEvent ene,
                                         int attribute)
Description copied from interface: ExtendedNodeListener
Called when selected attributes of the node are changed. The Int value in the second arguement defines what attribute it was that changed, the constant value for which are available on the ExtendedNodeEvent class

Specified by:
extendedNodeAttributeChanged in interface ExtendedNodeListener

extendedNodeVariableAdded

public void extendedNodeVariableAdded(ExtendedNodeEvent ene,
                                      Variable addedVarible)
Description copied from interface: ExtendedNodeListener
Invoked when a Variable is added to the ExtendedNodes VariableList.

Specified by:
extendedNodeVariableAdded in interface ExtendedNodeListener
Parameters:
ene - The ExtendedNode event.
addedVarible - The Variable that was added.

extendedNodeVariableRemoved

public void extendedNodeVariableRemoved(ExtendedNodeEvent ene,
                                        Variable removedVarible)
Description copied from interface: ExtendedNodeListener
Invoked when a Variable is removed from the ExtendedNodes VariableList.

Specified by:
extendedNodeVariableRemoved in interface ExtendedNodeListener
Parameters:
ene - The ExtendedNode event.
removedVarible - The Variable that was removed.

nodeChanged

public void nodeChanged(ExtendedNodeEvent ene)
Description copied from interface: ExtendedNodeListener
Called whenever a node changes (for selected events)

Specified by:
nodeChanged in interface ExtendedNodeListener


Copyright © 2006 Agena Ltd. All Rights Reserved.