repast.simphony.visualization.engine
Class DefaultDisplayDescriptor

java.lang.Object
  extended by repast.simphony.engine.schedule.DefaultDescriptor
      extended by repast.simphony.visualization.engine.DefaultDisplayDescriptor
All Implemented Interfaces:
Descriptor, DisplayDescriptor

public class DefaultDisplayDescriptor
extends DefaultDescriptor
implements DisplayDescriptor

Author:
Nick Collier

Nested Class Summary
 
Nested classes/interfaces inherited from interface repast.simphony.visualization.engine.DisplayDescriptor
DisplayDescriptor.DisplayType
 
Constructor Summary
DefaultDisplayDescriptor()
           
DefaultDisplayDescriptor(String name)
           
 
Method Summary
 void 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 addStyle(String objClassName, String styleClassName)
           
 void addValueLayerName(String name)
          Adds the named value layer to the list of value layers to display.
 Iterable<String> agentClassEditedStyleNames()
           
 Iterable<String> agentClassLayerOrders()
           
 Iterable<String> agentClassStyleNames()
           
 void clearProjectionDescriptors()
          Removes any added projection descriptors.
 Color getBackgroundColor()
          Gets the background color of the display.
 BoundingBox getBoundingBox()
          Gets the Bounding Box for the display.
 Class<?>[] getDefaultNetStyles2D()
           
 Class<?>[] getDefaultNetStyles3D()
           
 Class<?>[] getDefaultNetStylesGIS3D()
           
 Class<?>[] getDefaultStyles2D()
           
 Class<?>[] getDefaultStyles3D()
           
 Class<?>[] getDefaultStylesGIS3D()
           
 DisplayDescriptor.DisplayType getDisplayType()
           
 String getEditedStyleName(String objClassName)
           
 Map<String,String> getEditedStyles()
           
 Integer getLayerOrder(String objClassName)
           
 Map<String,Integer> getLayerOrders()
           
 String getLayoutClassName()
           
 IDisplay.LayoutFrequency getLayoutFrqeuency()
           
 int getLayoutInterval()
           
 String getLayoutProjection()
          Gets the name of the projection associated with the layout.
 VisualizationProperties getLayoutProperties()
           
 String getNetworkEditedStyleName(Object networkID)
           
 String getNetworkStyleClassName(Object networkID)
           
 ProjectionDescriptor getProjectionDescriptor(String name)
          Gets the ProjectionDescriptor for the named projection.
 Iterable<ProjectionDescriptor> getProjectionDescriptors()
           
 List<ProjectionData> getProjections()
          Gets the data for all the projections for which this is the display info.
 Object getProperty(String name)
          Gets the named property.
 ScheduleParameters getScheduleParameters()
          Retrieves the parameters for when to activate the display update.
 String getStyleClassName(String objClassName)
           
 Map<String,String> getStyles()
           
 String getValueLayerEditedStyleName()
          Gets the name of the value layer edited style.
 List<String> getValueLayerNames()
          Gets a List of all the names of the value layers to display.
 String getValueLayerStyleName()
          Gets the name of the value layer style.
 Iterable<Object> networkEditedStyleIDs()
           
 Iterable<Object> networkStyleIDs()
           
 Iterable<String> propertyNames()
          Gets an iterable of names of the properties contained by this descriptor.
 void set(DisplayDescriptor descriptor)
           
 void setBackgroundColor(Color color)
          Sets the background color of the display.
 void setBoundingBox(BoundingBox boundingBox)
          Sets the BoundingBox for the display.
 void setDisplayType(DisplayDescriptor.DisplayType type)
           
 void setDisplayType(DisplayDescriptor.DisplayType 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 setLayoutProperties(VisualizationProperties props)
          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.
 void setValueLayerEditedStyleName(String name)
          Sets the value layer edited style name.
 void setValueLayerStyleName(String name)
          Sets the value layer style name.
 
Methods inherited from class repast.simphony.engine.schedule.DefaultDescriptor
getName, 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
 

Constructor Detail

DefaultDisplayDescriptor

public DefaultDisplayDescriptor()

DefaultDisplayDescriptor

public DefaultDisplayDescriptor(String name)
Method Detail

getProjections

public List<ProjectionData> getProjections()
Gets the data for all the projections for which this is the display info.

Specified by:
getProjections in interface DisplayDescriptor
Returns:
the data for all the projections for which this is the display info.

addProjection

public void addProjection(ProjectionData data,
                          ProjectionDescriptor descriptor)
Adds the data for a projection for which this is the display info.

Specified by:
addProjection in interface DisplayDescriptor
Parameters:
data -
descriptor -

getProjectionDescriptor

public ProjectionDescriptor getProjectionDescriptor(String name)
Gets the ProjectionDescriptor for the named projection.

Specified by:
getProjectionDescriptor in interface DisplayDescriptor
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 interface DisplayDescriptor

getProjectionDescriptors

public Iterable<ProjectionDescriptor> getProjectionDescriptors()
Specified by:
getProjectionDescriptors in interface DisplayDescriptor

set

public void set(DisplayDescriptor descriptor)
Specified by:
set in interface DisplayDescriptor

getDisplayType

public DisplayDescriptor.DisplayType getDisplayType()
Specified by:
getDisplayType in interface DisplayDescriptor

setDisplayType

public void setDisplayType(DisplayDescriptor.DisplayType type)
Specified by:
setDisplayType in interface DisplayDescriptor

setDisplayType

public void setDisplayType(DisplayDescriptor.DisplayType type,
                           boolean reset)
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 interface DisplayDescriptor
Parameters:
type - the display type
reset - if true, then the fields in the descriptor that depend on type info will be reset.

addStyle

public void addStyle(String objClassName,
                     String styleClassName)
Specified by:
addStyle in interface DisplayDescriptor

addEditedStyle

public void addEditedStyle(String objClassName,
                           String userStyleName)
Specified by:
addEditedStyle in interface DisplayDescriptor

addNetworkStyle

public void addNetworkStyle(Object networkID,
                            String networkClassName)
Specified by:
addNetworkStyle in interface DisplayDescriptor

addNetworkEditedStyle

public void addNetworkEditedStyle(Object networkID,
                                  String networkClassName)
Specified by:
addNetworkEditedStyle in interface DisplayDescriptor

getStyleClassName

public String getStyleClassName(String objClassName)
Specified by:
getStyleClassName in interface DisplayDescriptor

getEditedStyleName

public String getEditedStyleName(String objClassName)
Specified by:
getEditedStyleName in interface DisplayDescriptor

getNetworkStyleClassName

public String getNetworkStyleClassName(Object networkID)
Specified by:
getNetworkStyleClassName in interface DisplayDescriptor

getNetworkEditedStyleName

public String getNetworkEditedStyleName(Object networkID)
Specified by:
getNetworkEditedStyleName in interface DisplayDescriptor

agentClassStyleNames

public Iterable<String> agentClassStyleNames()
Specified by:
agentClassStyleNames in interface DisplayDescriptor

agentClassEditedStyleNames

public Iterable<String> agentClassEditedStyleNames()
Specified by:
agentClassEditedStyleNames in interface DisplayDescriptor

networkStyleIDs

public Iterable<Object> networkStyleIDs()
Specified by:
networkStyleIDs in interface DisplayDescriptor

networkEditedStyleIDs

public Iterable<Object> networkEditedStyleIDs()
Specified by:
networkEditedStyleIDs in interface DisplayDescriptor

getLayoutFrqeuency

public IDisplay.LayoutFrequency getLayoutFrqeuency()
Specified by:
getLayoutFrqeuency in interface DisplayDescriptor

setLayoutFrequency

public void setLayoutFrequency(IDisplay.LayoutFrequency frequency)
Specified by:
setLayoutFrequency in interface DisplayDescriptor

getScheduleParameters

public ScheduleParameters getScheduleParameters()
Description copied from interface: DisplayDescriptor
Retrieves the parameters for when to activate the display update.

Specified by:
getScheduleParameters in interface DisplayDescriptor
Returns:
the parameters for when to activate the display update.

setScheduleParameters

public void setScheduleParameters(ScheduleParameters scheduleInfo)
Description copied from interface: DisplayDescriptor
Sets the parameters for when to activate the display update.

Specified by:
setScheduleParameters in interface DisplayDescriptor
Parameters:
scheduleInfo - when to activate the display update

getLayoutClassName

public String getLayoutClassName()
Specified by:
getLayoutClassName in interface DisplayDescriptor

setLayoutClassName

public void setLayoutClassName(String className)
Specified by:
setLayoutClassName in interface DisplayDescriptor

getLayoutProjection

public String getLayoutProjection()
Description copied from interface: DisplayDescriptor
Gets the name of the projection associated with the layout.

Specified by:
getLayoutProjection in interface DisplayDescriptor
Returns:
the name of the projection associated with the layout.

setLayoutProjection

public void setLayoutProjection(String layoutProjection)
Description copied from interface: DisplayDescriptor
Sets the name of the projection to associate with the layout.

Specified by:
setLayoutProjection in interface DisplayDescriptor

setLayoutInterval

public void setLayoutInterval(int interval)
Specified by:
setLayoutInterval in interface DisplayDescriptor

getLayoutInterval

public int getLayoutInterval()
Specified by:
getLayoutInterval in interface DisplayDescriptor

getDefaultStyles3D

public Class<?>[] getDefaultStyles3D()
Specified by:
getDefaultStyles3D in interface DisplayDescriptor

getDefaultStyles2D

public Class<?>[] getDefaultStyles2D()
Specified by:
getDefaultStyles2D in interface DisplayDescriptor

getDefaultStylesGIS3D

public Class<?>[] getDefaultStylesGIS3D()
Specified by:
getDefaultStylesGIS3D in interface DisplayDescriptor

getDefaultNetStyles3D

public Class<?>[] getDefaultNetStyles3D()
Specified by:
getDefaultNetStyles3D in interface DisplayDescriptor

getDefaultNetStyles2D

public Class<?>[] getDefaultNetStyles2D()
Specified by:
getDefaultNetStyles2D in interface DisplayDescriptor

getDefaultNetStylesGIS3D

public Class<?>[] getDefaultNetStylesGIS3D()
Specified by:
getDefaultNetStylesGIS3D in interface DisplayDescriptor

getLayoutProperties

public VisualizationProperties getLayoutProperties()
Specified by:
getLayoutProperties in interface DisplayDescriptor
Returns:
hints for displaying a grid.

setLayoutProperties

public void setLayoutProperties(VisualizationProperties props)
Sets the layout properties for this display.

Specified by:
setLayoutProperties in interface DisplayDescriptor

addValueLayerName

public void addValueLayerName(String name)
Adds the named value layer to the list of value layers to display.

Specified by:
addValueLayerName in interface DisplayDescriptor
Parameters:
name - the name of the value layer to display.

getValueLayerNames

public List<String> getValueLayerNames()
Gets a List of all the names of the value layers to display.

Specified by:
getValueLayerNames in interface DisplayDescriptor
Returns:
a List of all the names of the value layers to display.

setValueLayerStyleName

public void setValueLayerStyleName(String name)
Sets the value layer style name.

Specified by:
setValueLayerStyleName in interface DisplayDescriptor
Parameters:
name -

getValueLayerStyleName

public String getValueLayerStyleName()
Gets the name of the value layer style. Will return null if no value layer style has been selected.

Specified by:
getValueLayerStyleName in interface DisplayDescriptor
Returns:
the name of the value layer style.

getBoundingBox

public BoundingBox getBoundingBox()
Gets the Bounding Box for the display. This defines the extents of the display

Specified by:
getBoundingBox in interface DisplayDescriptor
Returns:
the BoundingBox

setBoundingBox

public void setBoundingBox(BoundingBox boundingBox)
Sets the BoundingBox for the display. This defines the extents of the display.

Specified by:
setBoundingBox in interface DisplayDescriptor
Parameters:
boundingBox - The BoundingBox

agentClassLayerOrders

public Iterable<String> agentClassLayerOrders()
Specified by:
agentClassLayerOrders in interface DisplayDescriptor

getLayerOrder

public Integer getLayerOrder(String objClassName)
Specified by:
getLayerOrder in interface DisplayDescriptor

addLayerOrder

public void addLayerOrder(String objClassName,
                          int order)
Specified by:
addLayerOrder in interface DisplayDescriptor

getProperty

public Object getProperty(String name)
Gets the named property.

Specified by:
getProperty in interface DisplayDescriptor
Parameters:
name - the name of the property
Returns:
the named property

setProperty

public void setProperty(String name,
                        Object value)
Sets the specified property.

Specified by:
setProperty in interface DisplayDescriptor
Parameters:
name - the property's name
value - the property's value

propertyNames

public Iterable<String> propertyNames()
Gets an iterable of names of the properties contained by this descriptor.

Specified by:
propertyNames in interface DisplayDescriptor
Returns:
an iterable of names of the properties contained by this descriptor.

getStyles

public Map<String,String> getStyles()
Specified by:
getStyles in interface DisplayDescriptor

getValueLayerEditedStyleName

public String getValueLayerEditedStyleName()
Gets the name of the value layer edited style. Will return null if no value layer style has been selected.

Specified by:
getValueLayerEditedStyleName in interface DisplayDescriptor
Returns:
the name of the value layer edited style.

setValueLayerEditedStyleName

public void setValueLayerEditedStyleName(String name)
Sets the value layer edited style name.

Specified by:
setValueLayerEditedStyleName in interface DisplayDescriptor
Parameters:
name -

getBackgroundColor

public Color getBackgroundColor()
Description copied from interface: DisplayDescriptor
Gets the background color of the display.

Specified by:
getBackgroundColor in interface DisplayDescriptor
Returns:
the background color of the display.

setBackgroundColor

public void setBackgroundColor(Color color)
Description copied from interface: DisplayDescriptor
Sets the background color of the display.

Specified by:
setBackgroundColor in interface DisplayDescriptor
Parameters:
color - the background color of the display.

getLayerOrders

public Map<String,Integer> getLayerOrders()
Specified by:
getLayerOrders in interface DisplayDescriptor

getEditedStyles

public Map<String,String> getEditedStyles()
Specified by:
getEditedStyles in interface DisplayDescriptor