repast.simphony.agents.designer.model
Class AgentPropertyModelPart

java.lang.Object
  extended by repast.simphony.agents.designer.model.AgentModelPart
      extended by repast.simphony.agents.designer.model.AgentDiagramElementModelPart
          extended by repast.simphony.agents.designer.model.AgentPropertyorStepModelPart
              extended by repast.simphony.agents.designer.model.AgentPropertyorStepWithLabelModelPart
                  extended by repast.simphony.agents.designer.model.AgentPropertyModelPart
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class AgentPropertyModelPart
extends AgentPropertyorStepWithLabelModelPart

The Model Part for the Template Flowlet.

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)

Field Summary
static String PROP_AGENT_PROPERTY_COMMENT
           
static String PROP_AGENT_PROPERTY_COMPILED_NAME
           
static String PROP_AGENT_PROPERTY_DEFAULT_VALUE
           
static String PROP_AGENT_PROPERTY_TYPE
           
 
Fields inherited from class repast.simphony.agents.designer.model.AgentPropertyorStepWithLabelModelPart
propertyOrStepLabel
 
Fields inherited from class repast.simphony.agents.designer.model.AgentPropertyorStepModelPart
PROP_SOURCE_CONNECTION, PROP_TARGET_CONNECTION
 
Fields inherited from class repast.simphony.agents.designer.model.AgentDiagramElementModelPart
DEFAULT_PARENT_CLASS_NAME, parentClassName, PROP_LOCATION
 
Constructor Summary
AgentPropertyModelPart()
           
 
Method Summary
protected  String getLabelPropertyNameResource()
          Returns the name of the resource entry that contains the property name
 String getPropertyCompiledName()
           
 String getPropertyDefaultValue()
           
 String getPropertyDescription()
           
protected  Collection getPropertyDescriptorsCollection()
          Collects all property descriptors.
 String getPropertyType()
           
 Object getPropertyValue(Object id)
          Returns an Object which represents the appropriate value for the property name supplied.
 String getType()
          Returns the flowlet type.
 Integer getVisibility()
           
 void setPropertyCompiledName(String propertyCompiledName)
           
 void setPropertyDefaultValue(String propertyDefaultValue)
           
 void setPropertyDescription(String string)
          Sets the propertyComment and fires a property change event.
 void setPropertyType(String propertyType)
           
 void setPropertyValue(Object id, Object value)
          Sets the value of a given property with the value supplied.
 void setVisibility(Integer visibility)
           
 
Methods inherited from class repast.simphony.agents.designer.model.AgentPropertyorStepWithLabelModelPart
getFlowletLabel, getLabel, hasValidLabel, setFlowletLabel, setLabel
 
Methods inherited from class repast.simphony.agents.designer.model.AgentPropertyorStepModelPart
connectSource, connectTarget, disconnectSource, disconnectTarget, getSourceTransitions, getTargetTransitions
 
Methods inherited from class repast.simphony.agents.designer.model.AgentDiagramElementModelPart
getEditableValue, getLocation, getParentClassName, getPropertyDescriptors, isPropertySet, isPropertySet, resetPropertyValue, setLocation, setParentClassName
 
Methods inherited from class repast.simphony.agents.designer.model.AgentModelPart
addPropertyChangeListener, firePropertyChange, fireStructureChange, propertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_AGENT_PROPERTY_COMMENT

public static final String PROP_AGENT_PROPERTY_COMMENT
See Also:
Constant Field Values

PROP_AGENT_PROPERTY_COMPILED_NAME

public static final String PROP_AGENT_PROPERTY_COMPILED_NAME
See Also:
Constant Field Values

PROP_AGENT_PROPERTY_TYPE

public static final String PROP_AGENT_PROPERTY_TYPE
See Also:
Constant Field Values

PROP_AGENT_PROPERTY_DEFAULT_VALUE

public static final String PROP_AGENT_PROPERTY_DEFAULT_VALUE
See Also:
Constant Field Values
Constructor Detail

AgentPropertyModelPart

public AgentPropertyModelPart()
Method Detail

getType

public String getType()
Description copied from class: AgentPropertyorStepModelPart
Returns the flowlet type.

Specified by:
getType in class AgentPropertyorStepModelPart
Returns:
the flowlet type
See Also:
AgentPropertyorStepModelPart.getType()

getLabelPropertyNameResource

protected String getLabelPropertyNameResource()
Returns the name of the resource entry that contains the property name

Overrides:
getLabelPropertyNameResource in class AgentPropertyorStepWithLabelModelPart
Returns:
key in the resources file
See Also:
AgentPropertyorStepWithLabelModelPart.getLabelPropertyNameResource()

getPropertyDescriptorsCollection

protected Collection getPropertyDescriptorsCollection()
Collects all property descriptors. Those of the superclass and those of this class

Overrides:
getPropertyDescriptorsCollection in class AgentPropertyorStepWithLabelModelPart
Returns:
Collection with all Property descriptors

getPropertyValue

public Object getPropertyValue(Object id)
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 AgentPropertyorStepWithLabelModelPart
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 AgentPropertyorStepWithLabelModelPart
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)

getPropertyDescription

public String getPropertyDescription()
Returns:

setPropertyDescription

public void setPropertyDescription(String string)
Sets the propertyComment and fires a property change event.

Parameters:
string - the propertyComment

getPropertyCompiledName

public String getPropertyCompiledName()

setPropertyCompiledName

public void setPropertyCompiledName(String propertyCompiledName)

getPropertyType

public String getPropertyType()

setPropertyType

public void setPropertyType(String propertyType)

getPropertyDefaultValue

public String getPropertyDefaultValue()

setPropertyDefaultValue

public void setPropertyDefaultValue(String propertyDefaultValue)

getVisibility

public Integer getVisibility()

setVisibility

public void setVisibility(Integer visibility)