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
ConstructorDescriptionBasicDisplayDescriptor
(String name) BasicDisplayDescriptor
(DisplayDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEditedStyle
(String objClassName, String userStyleName) void
addLayerOrder
(String objClassName, int order) void
addNetworkEditedStyle
(Object networkID, String networkClassName) void
addNetworkStyle
(Object networkID, String networkClassName) void
addProjection
(ProjectionData data, ProjectionDescriptor descriptor) Adds the data for a projection for which this is the display info.void
void
Removes any added projection descriptors.void
Gets the background color of the display.Gets the Bounding Box for the display.Class<?>[]
Class<?>[]
getEditedStyleName
(String objClassName) getLayerOrder
(String objClassName) int
Gets the name of the projection associated with the layout.getNetworkEditedStyleName
(Object networkID) getNetworkStyleClassName
(Object networkID) int
Gets 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.void
set
(DisplayDescriptor descriptor) Sets the fields of this descriptor from another when making copies.void
setBackgroundColor
(Color color) Sets the background color of the display.void
setBoundingBox
(BoundingBox boundingBox) Sets the BoundingBox for the display.void
setDisplayType
(String type, boolean reset) Sets the display type of this descriptor.void
setLayoutClassName
(String className) void
setLayoutFrequency
(IDisplay.LayoutFrequency frequency) void
setLayoutInterval
(int interval) void
setLayoutProjection
(String layoutProjection) Sets the name of the projection to associate with the layout.void
Sets the layout properties for this display.void
setProperty
(String name, Object value) Sets the specified property.void
setScheduleParameters
(ScheduleParameters scheduleInfo) Sets the parameters for when to activate the display update.Methods inherited from class repast.simphony.scenario.AbstractDescriptor
addScenarioChangedListener, getName, readResolve, setName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface repast.simphony.engine.schedule.Descriptor
getName, setName
Methods 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:
getProjections
in interfaceDisplayDescriptor
- Returns:
- the data for all the projections for which this is the display info.
-
getProjectionCount
public int getProjectionCount()Description copied from interface:DisplayDescriptor
Gets the number of projections in this display descriptor.- Specified by:
getProjectionCount
in 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:
addProjection
in interfaceDisplayDescriptor
- Parameters:
data
-descriptor
-
-
clearProjections
public void clearProjections()- Specified by:
clearProjections
in interfaceDisplayDescriptor
-
getProjectionDescriptor
Gets the ProjectionDescriptor for the named projection.- Specified by:
getProjectionDescriptor
in 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:
clearProjectionDescriptors
in interfaceDisplayDescriptor
-
getProjectionDescriptors
- Specified by:
getProjectionDescriptors
in interfaceDisplayDescriptor
-
set
Sets the fields of this descriptor from another when making copies.- Specified by:
set
in interfaceDisplayDescriptor
- Parameters:
descriptor
-
-
getDisplayType
- Specified by:
getDisplayType
in interfaceDisplayDescriptor
-
setDisplayType
Description copied from interface:DisplayDescriptor
Sets 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:
setDisplayType
in 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:
addStyle
in interfaceDisplayDescriptor
-
addEditedStyle
- Specified by:
addEditedStyle
in interfaceDisplayDescriptor
-
addNetworkStyle
- Specified by:
addNetworkStyle
in interfaceDisplayDescriptor
-
addNetworkEditedStyle
- Specified by:
addNetworkEditedStyle
in interfaceDisplayDescriptor
-
getStyleClassName
- Specified by:
getStyleClassName
in interfaceDisplayDescriptor
-
getEditedStyleName
- Specified by:
getEditedStyleName
in interfaceDisplayDescriptor
-
getNetworkStyleClassName
- Specified by:
getNetworkStyleClassName
in interfaceDisplayDescriptor
-
getNetworkEditedStyleName
- Specified by:
getNetworkEditedStyleName
in interfaceDisplayDescriptor
-
agentClassStyleNames
- Specified by:
agentClassStyleNames
in interfaceDisplayDescriptor
-
agentClassEditedStyleNames
- Specified by:
agentClassEditedStyleNames
in interfaceDisplayDescriptor
-
networkStyleIDs
- Specified by:
networkStyleIDs
in interfaceDisplayDescriptor
-
networkEditedStyleIDs
- Specified by:
networkEditedStyleIDs
in interfaceDisplayDescriptor
-
getLayoutFrqeuency
- Specified by:
getLayoutFrqeuency
in interfaceDisplayDescriptor
-
setLayoutFrequency
- Specified by:
setLayoutFrequency
in interfaceDisplayDescriptor
-
getScheduleParameters
Description copied from interface:DisplayDescriptor
Retrieves the parameters for when to activate the display update.- Specified by:
getScheduleParameters
in interfaceDisplayDescriptor
- Returns:
- the parameters for when to activate the display update.
-
setScheduleParameters
Description copied from interface:DisplayDescriptor
Sets the parameters for when to activate the display update.- Specified by:
setScheduleParameters
in interfaceDisplayDescriptor
- Parameters:
scheduleInfo
- when to activate the display update
-
getLayoutClassName
- Specified by:
getLayoutClassName
in interfaceDisplayDescriptor
-
setLayoutClassName
- Specified by:
setLayoutClassName
in interfaceDisplayDescriptor
-
getLayoutProjection
Description copied from interface:DisplayDescriptor
Gets the name of the projection associated with the layout.- Specified by:
getLayoutProjection
in interfaceDisplayDescriptor
- Returns:
- the name of the projection associated with the layout.
-
setLayoutProjection
Description copied from interface:DisplayDescriptor
Sets the name of the projection to associate with the layout.- Specified by:
setLayoutProjection
in interfaceDisplayDescriptor
-
setLayoutInterval
public void setLayoutInterval(int interval) - Specified by:
setLayoutInterval
in interfaceDisplayDescriptor
-
getLayoutInterval
public int getLayoutInterval()- Specified by:
getLayoutInterval
in interfaceDisplayDescriptor
-
getLayoutProperties
- Specified by:
getLayoutProperties
in interfaceDisplayDescriptor
- Returns:
- hints for displaying a grid.
-
setLayoutProperties
Sets the layout properties for this display.- Specified by:
setLayoutProperties
in interfaceDisplayDescriptor
-
getBoundingBox
Gets the Bounding Box for the display. This defines the extents of the display- Specified by:
getBoundingBox
in interfaceDisplayDescriptor
- Returns:
- the BoundingBox
-
setBoundingBox
Sets the BoundingBox for the display. This defines the extents of the display.- Specified by:
setBoundingBox
in interfaceDisplayDescriptor
- Parameters:
boundingBox
- The BoundingBox
-
agentClassLayerOrders
- Specified by:
agentClassLayerOrders
in interfaceDisplayDescriptor
-
getLayerOrder
- Specified by:
getLayerOrder
in interfaceDisplayDescriptor
-
addLayerOrder
- Specified by:
addLayerOrder
in interfaceDisplayDescriptor
-
getProperty
Gets the named property.- Specified by:
getProperty
in interfaceDisplayDescriptor
- Parameters:
name
- the name of the property- Returns:
- the named property
-
setProperty
Sets the specified property.- Specified by:
setProperty
in 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:
propertyNames
in interfaceDisplayDescriptor
- Returns:
- an iterable of names of the properties contained by this descriptor.
-
getStyles
- Specified by:
getStyles
in interfaceDisplayDescriptor
-
getBackgroundColor
Description copied from interface:DisplayDescriptor
Gets the background color of the display.- Specified by:
getBackgroundColor
in interfaceDisplayDescriptor
- Returns:
- the background color of the display.
-
setBackgroundColor
Description copied from interface:DisplayDescriptor
Sets the background color of the display.- Specified by:
setBackgroundColor
in interfaceDisplayDescriptor
- Parameters:
color
- the background color of the display.
-
getLayerOrders
- Specified by:
getLayerOrders
in interfaceDisplayDescriptor
-
getEditedStyles
- Specified by:
getEditedStyles
in interfaceDisplayDescriptor
-
getDefaultStyles
- Specified by:
getDefaultStyles
in interfaceDisplayDescriptor
-
getDefaultNetStyles
- Specified by:
getDefaultNetStyles
in interfaceDisplayDescriptor
-