repast.simphony.agents.designer.model
Class AgentPropertyorStepWithLabelModelPart
java.lang.Object
repast.simphony.agents.designer.model.AgentModelPart
repast.simphony.agents.designer.model.AgentDiagramElementModelPart
repast.simphony.agents.designer.model.AgentPropertyorStepModelPart
repast.simphony.agents.designer.model.AgentPropertyorStepWithLabelModelPart
- All Implemented Interfaces:
- PropertyChangeListener, EventListener
- Direct Known Subclasses:
- AgentPropertyModelPart, BehaviorStepModelPart, DecisionStepModelPart, TaskStepModelPart
public abstract class AgentPropertyorStepWithLabelModelPart
- extends AgentPropertyorStepModelPart
- Author:
- agreif (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)
Model part of a flowlet that has a label property.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propertyOrStepLabel
protected AgentPropertyorStepLabelModelPart propertyOrStepLabel
AgentPropertyorStepWithLabelModelPart
public AgentPropertyorStepWithLabelModelPart()
getFlowletLabel
public AgentPropertyorStepLabelModelPart getFlowletLabel()
- Returns the flowlet's label model.
- Returns:
- the flowlet's label model.
getLabel
public String getLabel()
setLabel
public void setLabel(String newLabel)
setFlowletLabel
public void setFlowletLabel(AgentPropertyorStepLabelModelPart flowletLabel)
- Sets the flowlet's label.
- Parameters:
propertyOrStepLabel -
hasValidLabel
public boolean hasValidLabel()
- Returns whether the property has a valid label. This means that it is not
null and length is not zero.
- Returns:
true if the property has a valid label.
getLabelPropertyNameResource
protected String getLabelPropertyNameResource()
- Returns the name of the resource entry that contains the property name.
This metzhod returns the default key, subclasses can specify a more
specific key.
- Returns:
- key in the resources file
getPropertyDescriptorsCollection
protected Collection getPropertyDescriptorsCollection()
- Collects all property descriptors. Those of the superclass and those of
this class
- Overrides:
getPropertyDescriptorsCollection in class AgentDiagramElementModelPart
- Returns:
- Collection with all Property descriptors
getPropertyValue
public Object getPropertyValue(Object propName)
- Returns an Object which represents the appropriate value for the property
name supplied. In case of label property the request will be routed to
the label modelPart.
- Overrides:
getPropertyValue in class AgentDiagramElementModelPart
- Parameters:
propName - Name of the property for which the the values are needed.
- Returns:
- Object which is the value of the property.
- See Also:
org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
setPropertyValue
public void setPropertyValue(Object id,
Object value)
- Sets the value of a given property with the value supplied. Also fires a
property change if necessary.
- Overrides:
setPropertyValue in class AgentDiagramElementModelPart
- Parameters:
id - Name of the parameter to be changed.value - Value to be set to the given parameter.- See Also:
org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object,
java.lang.Object)