repast.simphony.agents.designer.editparts
Class DecisionStepLabelEditPart

java.lang.Object
  extended by AbstractGraphicalEditPart
      extended by repast.simphony.agents.designer.editparts.AgentBuilderEditPart
          extended by repast.simphony.agents.designer.editparts.AgentDiagramElementEditPart
              extended by repast.simphony.agents.designer.editparts.AgentPropertyorStepLabelEditPart
                  extended by repast.simphony.agents.designer.editparts.DecisionStepLabelEditPart
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class DecisionStepLabelEditPart
extends AgentPropertyorStepLabelEditPart

Author:
greifa (Adapted by Michael J. North for Use in Repast Simphony from Alexander Greif’s Flow4J-Eclipse (http://flow4jeclipse.sourceforge.net/docs/index.html), with Thanks to the Original Author)

Nested Class Summary
 
Nested classes/interfaces inherited from class repast.simphony.agents.designer.editparts.AgentPropertyorStepLabelEditPart
AgentPropertyorStepLabelEditPart.FlowletLabelEditManager, AgentPropertyorStepLabelEditPart.LabelCellEditorLocator
 
Constructor Summary
DecisionStepLabelEditPart()
           
 
Method Summary
protected  void adjustFlowletLabelFigure(PropertyOrStepLabelFigure propertyOrStepLabelFigure)
          Sets the figure's display text to the decision's description if it is set.
protected  AgentPropertyorStepLabelEditPart.FlowletLabelEditManager getFlowletLabelEditManager()
          Returns the FlowletLabelEditManager for this type of EditPart.
 void propertyChange(PropertyChangeEvent event)
          Reacts on property change of the modelPart.
 
Methods inherited from class repast.simphony.agents.designer.editparts.AgentPropertyorStepLabelEditPart
createEditPolicies, createFigure, getFlowletLabel, getFlowletWithLabelEditPart, hasProperties, performRequest
 
Methods inherited from class repast.simphony.agents.designer.editparts.AgentDiagramElementEditPart
activate, deactivate, getFlowDiagramElementToolTip, refreshVisuals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecisionStepLabelEditPart

public DecisionStepLabelEditPart()
Method Detail

adjustFlowletLabelFigure

protected void adjustFlowletLabelFigure(PropertyOrStepLabelFigure propertyOrStepLabelFigure)
Sets the figure's display text to the decision's description if it is set. otherwise to the decision statement itself.

Overrides:
adjustFlowletLabelFigure in class AgentPropertyorStepLabelEditPart
Parameters:
propertyOrStepLabelFigure - the figure.
See Also:
AgentPropertyorStepLabelEditPart.adjustFlowletLabelFigure(repast.simphony.agents.designer.figures.PropertyOrStepLabelFigure)

propertyChange

public void propertyChange(PropertyChangeEvent event)
Reacts on property change of the modelPart. Sets the label's text only if it has no valid description.

Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class AgentPropertyorStepLabelEditPart
Parameters:
event - Event which details the property change.
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

getFlowletLabelEditManager

protected AgentPropertyorStepLabelEditPart.FlowletLabelEditManager getFlowletLabelEditManager()
Returns the FlowletLabelEditManager for this type of EditPart. Sets the forceDirty flag to true because the edit text differs from the display text.

Overrides:
getFlowletLabelEditManager in class AgentPropertyorStepLabelEditPart
Returns:
the FlowletLabelEditManager for this type of EditPart.
See Also:
AgentPropertyorStepLabelEditPart.getFlowletLabelEditManager()