Class CGDLayout<T>
- java.lang.Object
-
- repast.simphony.visualization.AbstractNetworkLayout<T>
-
- repast.simphony.visualization.cgd.CGDLayout<T>
-
- All Implemented Interfaces:
ProjectionListener
,Layout<T,Network<T>>
public class CGDLayout<T> extends AbstractNetworkLayout<T> implements ProjectionListener
-
-
Field Summary
Fields Modifier and Type Field Description protected Network
network
-
Fields inherited from class repast.simphony.visualization.AbstractNetworkLayout
baseGraph, layoutName, locationData
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Box
getBoundingBox()
Gets a bounding box that describes the extent of this layout in location coordinates.VisualizationProperties
getLayoutProperties()
Gets the layout properties for this layout.float[]
getLocation(T obj)
Gets the location of the specified object as determined by this layout.void
projectionEventOccurred(ProjectionEvent evt)
Invoked when a projection event occurs.void
setLayoutProperties(VisualizationProperties props)
Sets the layout properties for this layout.void
setProjection(Network projection)
Sets the projection associated with this Layout.void
update()
Updates this layout.-
Methods inherited from class repast.simphony.visualization.AbstractNetworkLayout
getGraph, getLocationData, getName
-
-
-
-
Field Detail
-
network
protected Network network
-
-
Constructor Detail
-
CGDLayout
public CGDLayout()
-
CGDLayout
public CGDLayout(Network network)
-
-
Method Detail
-
update
public void update()
Description copied from interface:Layout
Updates this layout.
-
getLocation
public float[] getLocation(T obj)
Description copied from interface:Layout
Gets the location of the specified object as determined by this layout.- Specified by:
getLocation
in interfaceLayout<T,Network<T>>
- Parameters:
obj
- the object whose location we want.- Returns:
- the location of the object.
-
setLayoutProperties
public void setLayoutProperties(VisualizationProperties props)
Description copied from interface:Layout
Sets the layout properties for this layout.- Specified by:
setLayoutProperties
in interfaceLayout<T,Network<T>>
- Overrides:
setLayoutProperties
in classAbstractNetworkLayout<T>
- Parameters:
props
- the layout properties
-
getLayoutProperties
public VisualizationProperties getLayoutProperties()
Description copied from interface:Layout
Gets the layout properties for this layout.- Specified by:
getLayoutProperties
in interfaceLayout<T,Network<T>>
- Overrides:
getLayoutProperties
in classAbstractNetworkLayout<T>
- Returns:
- the layout properties for this layout.
-
setProjection
public void setProjection(Network projection)
Description copied from interface:Layout
Sets the projection associated with this Layout.- Specified by:
setProjection
in interfaceLayout<T,Network<T>>
- Overrides:
setProjection
in classAbstractNetworkLayout<T>
- Parameters:
projection
- the associated projection.
-
projectionEventOccurred
public void projectionEventOccurred(ProjectionEvent evt)
Description copied from interface:ProjectionListener
Invoked when a projection event occurs.- Specified by:
projectionEventOccurred
in interfaceProjectionListener<T>
- Parameters:
evt
- the object describing the event
-
getBoundingBox
public Box getBoundingBox()
Description copied from interface:Layout
Gets a bounding box that describes the extent of this layout in location coordinates.- Specified by:
getBoundingBox
in interfaceLayout<T,Network<T>>
- Returns:
- a bounding box that describes the extent of this layout in location coordinates, or a 0 size box if the extent is unknown.
-
-