Class BasicDisplayDescriptor
java.lang.Object
repast.simphony.scenario.AbstractDescriptor
repast.simphony.visualization.engine.BasicDisplayDescriptor
- All Implemented Interfaces:
Descriptor,DisplayDescriptor
- Direct Known Subclasses:
CartesianDisplayDescriptor,GISDisplayDescriptor
public abstract class BasicDisplayDescriptor
extends AbstractDescriptor
implements DisplayDescriptor
Basic Display descriptor implementation.
TODO Projections: also implement network descriptor?
- Author:
- Nick Collier, Eric Tatara
-
Field Summary
Fields inherited from class repast.simphony.scenario.AbstractDescriptor
scs -
Constructor Summary
ConstructorsConstructorDescriptionBasicDisplayDescriptor(String name) BasicDisplayDescriptor(DisplayDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEditedStyle(String objClassName, String userStyleName) voidaddLayerOrder(String objClassName, int order) voidaddNetworkEditedStyle(Object networkID, String networkClassName) voidaddNetworkStyle(Object networkID, String networkClassName) voidaddProjection(ProjectionData data, ProjectionDescriptor descriptor) Adds the data for a projection for which this is the display info.voidvoidRemoves any added projection descriptors.voidGets the background color of the display.Gets the Bounding Box for the display.Class<?>[]Class<?>[]getEditedStyleName(String objClassName) getLayerOrder(String objClassName) intGets the name of the projection associated with the layout.getNetworkEditedStyleName(Object networkID) getNetworkStyleClassName(Object networkID) intGets the number of projections in this display descriptor.Gets the ProjectionDescriptor for the named projection.Gets the data for all the projections for which this is the display info.getProperty(String name) Gets the named property.Retrieves the parameters for when to activate the display update.getStyleClassName(String objClassName) Gets an iterable of names of the properties contained by this descriptor.voidset(DisplayDescriptor descriptor) Sets the fields of this descriptor from another when making copies.voidsetBackgroundColor(Color color) Sets the background color of the display.voidsetBoundingBox(BoundingBox boundingBox) Sets the BoundingBox for the display.voidsetDisplayType(String type, boolean reset) Sets the display type of this descriptor.voidsetLayoutClassName(String className) voidsetLayoutFrequency(IDisplay.LayoutFrequency frequency) voidsetLayoutInterval(int interval) voidsetLayoutProjection(String layoutProjection) Sets the name of the projection to associate with the layout.voidSets the layout properties for this display.voidsetProperty(String name, Object value) Sets the specified property.voidsetScheduleParameters(ScheduleParameters scheduleInfo) Sets the parameters for when to activate the display update.Methods inherited from class repast.simphony.scenario.AbstractDescriptor
addScenarioChangedListener, getName, readResolve, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface repast.simphony.engine.schedule.Descriptor
getName, setNameMethods inherited from interface repast.simphony.visualization.engine.DisplayDescriptor
addScenarioChangedListener, makeCopy
-
Constructor Details
-
BasicDisplayDescriptor
-
BasicDisplayDescriptor
-
-
Method Details
-
getProjections
Gets the data for all the projections for which this is the display info.- Specified by:
getProjectionsin interfaceDisplayDescriptor- Returns:
- the data for all the projections for which this is the display info.
-
getProjectionCount
public int getProjectionCount()Description copied from interface:DisplayDescriptorGets the number of projections in this display descriptor.- Specified by:
getProjectionCountin interfaceDisplayDescriptor- Returns:
- the number of projections in this display descriptor.
-
addProjection
Adds the data for a projection for which this is the display info.- Specified by:
addProjectionin interfaceDisplayDescriptor- Parameters:
data-descriptor-
-
clearProjections
public void clearProjections()- Specified by:
clearProjectionsin interfaceDisplayDescriptor
-
getProjectionDescriptor
Gets the ProjectionDescriptor for the named projection.- Specified by:
getProjectionDescriptorin interfaceDisplayDescriptor- Parameters:
name- the name of the projection whose descriptor we want- Returns:
- the ProjectionDescriptor for the named projection.
-
clearProjectionDescriptors
public void clearProjectionDescriptors()Removes any added projection descriptors.- Specified by:
clearProjectionDescriptorsin interfaceDisplayDescriptor
-
getProjectionDescriptors
- Specified by:
getProjectionDescriptorsin interfaceDisplayDescriptor
-
set
Sets the fields of this descriptor from another when making copies.- Specified by:
setin interfaceDisplayDescriptor- Parameters:
descriptor-
-
getDisplayType
- Specified by:
getDisplayTypein interfaceDisplayDescriptor
-
setDisplayType
Description copied from interface:DisplayDescriptorSets the display type of this descriptor. If reset is true, then the fields in the descriptor that depend on type info will be reset.- Specified by:
setDisplayTypein interfaceDisplayDescriptor- Parameters:
type- the display typereset- if true, then the fields in the descriptor that depend on type info will be reset.
-
addStyle
- Specified by:
addStylein interfaceDisplayDescriptor
-
addEditedStyle
- Specified by:
addEditedStylein interfaceDisplayDescriptor
-
addNetworkStyle
- Specified by:
addNetworkStylein interfaceDisplayDescriptor
-
addNetworkEditedStyle
- Specified by:
addNetworkEditedStylein interfaceDisplayDescriptor
-
getStyleClassName
- Specified by:
getStyleClassNamein interfaceDisplayDescriptor
-
getEditedStyleName
- Specified by:
getEditedStyleNamein interfaceDisplayDescriptor
-
getNetworkStyleClassName
- Specified by:
getNetworkStyleClassNamein interfaceDisplayDescriptor
-
getNetworkEditedStyleName
- Specified by:
getNetworkEditedStyleNamein interfaceDisplayDescriptor
-
agentClassStyleNames
- Specified by:
agentClassStyleNamesin interfaceDisplayDescriptor
-
agentClassEditedStyleNames
- Specified by:
agentClassEditedStyleNamesin interfaceDisplayDescriptor
-
networkStyleIDs
- Specified by:
networkStyleIDsin interfaceDisplayDescriptor
-
networkEditedStyleIDs
- Specified by:
networkEditedStyleIDsin interfaceDisplayDescriptor
-
getLayoutFrqeuency
- Specified by:
getLayoutFrqeuencyin interfaceDisplayDescriptor
-
setLayoutFrequency
- Specified by:
setLayoutFrequencyin interfaceDisplayDescriptor
-
getScheduleParameters
Description copied from interface:DisplayDescriptorRetrieves the parameters for when to activate the display update.- Specified by:
getScheduleParametersin interfaceDisplayDescriptor- Returns:
- the parameters for when to activate the display update.
-
setScheduleParameters
Description copied from interface:DisplayDescriptorSets the parameters for when to activate the display update.- Specified by:
setScheduleParametersin interfaceDisplayDescriptor- Parameters:
scheduleInfo- when to activate the display update
-
getLayoutClassName
- Specified by:
getLayoutClassNamein interfaceDisplayDescriptor
-
setLayoutClassName
- Specified by:
setLayoutClassNamein interfaceDisplayDescriptor
-
getLayoutProjection
Description copied from interface:DisplayDescriptorGets the name of the projection associated with the layout.- Specified by:
getLayoutProjectionin interfaceDisplayDescriptor- Returns:
- the name of the projection associated with the layout.
-
setLayoutProjection
Description copied from interface:DisplayDescriptorSets the name of the projection to associate with the layout.- Specified by:
setLayoutProjectionin interfaceDisplayDescriptor
-
setLayoutInterval
public void setLayoutInterval(int interval) - Specified by:
setLayoutIntervalin interfaceDisplayDescriptor
-
getLayoutInterval
public int getLayoutInterval()- Specified by:
getLayoutIntervalin interfaceDisplayDescriptor
-
getLayoutProperties
- Specified by:
getLayoutPropertiesin interfaceDisplayDescriptor- Returns:
- hints for displaying a grid.
-
setLayoutProperties
Sets the layout properties for this display.- Specified by:
setLayoutPropertiesin interfaceDisplayDescriptor
-
getBoundingBox
Gets the Bounding Box for the display. This defines the extents of the display- Specified by:
getBoundingBoxin interfaceDisplayDescriptor- Returns:
- the BoundingBox
-
setBoundingBox
Sets the BoundingBox for the display. This defines the extents of the display.- Specified by:
setBoundingBoxin interfaceDisplayDescriptor- Parameters:
boundingBox- The BoundingBox
-
agentClassLayerOrders
- Specified by:
agentClassLayerOrdersin interfaceDisplayDescriptor
-
getLayerOrder
- Specified by:
getLayerOrderin interfaceDisplayDescriptor
-
addLayerOrder
- Specified by:
addLayerOrderin interfaceDisplayDescriptor
-
getProperty
Gets the named property.- Specified by:
getPropertyin interfaceDisplayDescriptor- Parameters:
name- the name of the property- Returns:
- the named property
-
setProperty
Sets the specified property.- Specified by:
setPropertyin interfaceDisplayDescriptor- Parameters:
name- the property's namevalue- the property's value
-
propertyNames
Gets an iterable of names of the properties contained by this descriptor.- Specified by:
propertyNamesin interfaceDisplayDescriptor- Returns:
- an iterable of names of the properties contained by this descriptor.
-
getStyles
- Specified by:
getStylesin interfaceDisplayDescriptor
-
getBackgroundColor
Description copied from interface:DisplayDescriptorGets the background color of the display.- Specified by:
getBackgroundColorin interfaceDisplayDescriptor- Returns:
- the background color of the display.
-
setBackgroundColor
Description copied from interface:DisplayDescriptorSets the background color of the display.- Specified by:
setBackgroundColorin interfaceDisplayDescriptor- Parameters:
color- the background color of the display.
-
getLayerOrders
- Specified by:
getLayerOrdersin interfaceDisplayDescriptor
-
getEditedStyles
- Specified by:
getEditedStylesin interfaceDisplayDescriptor
-
getDefaultStyles
- Specified by:
getDefaultStylesin interfaceDisplayDescriptor
-
getDefaultNetStyles
- Specified by:
getDefaultNetStylesin interfaceDisplayDescriptor
-