repast.simphony.agents.designer.model
Class AgentDiagramElementModelPart

java.lang.Object
  extended by repast.simphony.agents.designer.model.AgentModelPart
      extended by repast.simphony.agents.designer.model.AgentDiagramElementModelPart
All Implemented Interfaces:
PropertyChangeListener, EventListener
Direct Known Subclasses:
AgentPropertyorStepLabelModelPart, AgentPropertyorStepModelPart

public abstract class AgentDiagramElementModelPart
extends AgentModelPart

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) TODO

Field Summary
static String DEFAULT_PARENT_CLASS_NAME
           
protected  String parentClassName
           
static String PROP_LOCATION
           
 
Constructor Summary
AgentDiagramElementModelPart()
           
 
Method Summary
 Object getEditableValue()
           
 Point getLocation()
          TODO
 String getParentClassName()
           
 IPropertyDescriptor[] getPropertyDescriptors()
          Returns useful property flowDiagramElementDescriptors for the use in property sheets.
protected  Collection getPropertyDescriptorsCollection()
          Returns the collection of the property descriptors
 Object getPropertyValue(Object propName)
          Returns an Object which represents the appropriate value for the property name supplied.
 boolean isPropertySet(Object propName)
           
protected  boolean isPropertySet(String propName)
          TODO
 void resetPropertyValue(Object prop)
           
 void setLocation(Point point)
          Sets the location property and fires a change event
 void setParentClassName(String parentClassName)
           
 void setPropertyValue(Object id, Object value)
          Sets the value of a given property with the value supplied.
 
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_LOCATION

public static final String PROP_LOCATION
See Also:
Constant Field Values

DEFAULT_PARENT_CLASS_NAME

public static final String DEFAULT_PARENT_CLASS_NAME
See Also:
Constant Field Values

parentClassName

protected String parentClassName
Constructor Detail

AgentDiagramElementModelPart

public AgentDiagramElementModelPart()
Method Detail

getPropertyDescriptorsCollection

protected Collection getPropertyDescriptorsCollection()
Returns the collection of the property descriptors

Returns:
the collection of the property descriptors

getPropertyDescriptors

public IPropertyDescriptor[] getPropertyDescriptors()
Returns useful property flowDiagramElementDescriptors for the use in property sheets. This supports location.

Returns:
Array of property flowDiagramElementescriptors.
See Also:
org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()

getPropertyValue

public Object getPropertyValue(Object propName)
Returns an Object which represents the appropriate value for the property name supplied.

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.

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)

setLocation

public void setLocation(Point point)
Sets the location property and fires a change event

Parameters:
point - the new location

getLocation

public Point getLocation()
TODO

Returns:

getEditableValue

public Object getEditableValue()
See Also:
org.eclipse.ui.views.properties.IPropertySource#getEditableValue()

resetPropertyValue

public void resetPropertyValue(Object prop)

isPropertySet

public boolean isPropertySet(Object propName)
See Also:
org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)

isPropertySet

protected boolean isPropertySet(String propName)
TODO

Parameters:
propName -
Returns:

getParentClassName

public String getParentClassName()

setParentClassName

public void setParentClassName(String parentClassName)