fr.lifl.jedi.gui.display.interactionDisplayer.model.tree
Class PerformedInteractionsInstanceNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by fr.lifl.jedi.gui.display.interactionDisplayer.model.tree.PerformedInteractionsDisplayableNode
          extended by fr.lifl.jedi.gui.display.interactionDisplayer.model.tree.PerformedInteractionsInstanceNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class PerformedInteractionsInstanceNode
extends PerformedInteractionsDisplayableNode

A node that represents the interactions performed by a particular agent instance.

Version:
JEDI V 2.3
Created the 16 juin 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
PerformedInteractionsInstanceNode(Agent a, int step)
          Constructor of the node that represents the data related to an agent instance.
 
Method Summary
 void buildTreeAccordingToOptions(OptionsModel model, int step)
          Builds the tree according to the options provided in the model.
 void tagAsAlive(int step)
          Tag the agent represented by this node as alive.
 void tagAsDead(int step)
          Tag the agent represented by this node as dead.
 void updateSourceParticipation(AbstractRealizableTuple<?> tuple, int step)
          Updates the data structure to take into account that the agent was the source of an interaction during a time step.
 void updateTargetParticipation(AbstractRealizableTuple<?> tuple, int step)
          Updates the data structure to take into account that the agent was the target of an interaction during a time step.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PerformedInteractionsInstanceNode

public PerformedInteractionsInstanceNode(Agent a,
                                         int step)
Constructor of the node that represents the data related to an agent instance.

Parameters:
a - the agent for which this instance gathers data.
step - the time step during which the agent was put first in the environment.
Method Detail

tagAsAlive

public void tagAsAlive(int step)
Tag the agent represented by this node as alive.

Parameters:
step - The simulation step for which the agent is tagged as alive.

tagAsDead

public void tagAsDead(int step)
Tag the agent represented by this node as dead.

Parameters:
step - The simulation step for which the agent is tagged as dead.

updateSourceParticipation

public void updateSourceParticipation(AbstractRealizableTuple<?> tuple,
                                      int step)
Updates the data structure to take into account that the agent was the source of an interaction during a time step.

Parameters:
tuple - The tuple that represents the interaction in which the agent plays a source role.
step - The simulation step during which the interaction occurred.

updateTargetParticipation

public void updateTargetParticipation(AbstractRealizableTuple<?> tuple,
                                      int step)
Updates the data structure to take into account that the agent was the target of an interaction during a time step.

Parameters:
tuple - The tuple that represents the interaction in which the agent plays a target role.
step - The simulation step during which the interaction occurred.

buildTreeAccordingToOptions

public void buildTreeAccordingToOptions(OptionsModel model,
                                        int step)
Description copied from class: PerformedInteractionsDisplayableNode
Builds the tree according to the options provided in the model.

Specified by:
buildTreeAccordingToOptions in class PerformedInteractionsDisplayableNode
Parameters:
model - The model in which display options are stored.
step - The current time step of the simulation.
See Also:
PerformedInteractionsDisplayableNode.buildTreeAccordingToOptions(fr.lifl.jedi.gui.display.interactionDisplayer.model.OptionsModel, int)