Class TreeLayout2D<T>
java.lang.Object
repast.simphony.visualization.AbstractNetworkLayout<T>
repast.simphony.visualization.visualization2D.layout.TreeLayout2D<T>
- Type Parameters:
T
-
A Tree layout.
- Author:
- Eric Tatara
-
Field Summary
Modifier and TypeFieldDescriptionprotected edu.uci.ics.jung.algorithms.layout.TreeLayout<T,
RepastEdge<T>> Fields inherited from class repast.simphony.visualization.AbstractNetworkLayout
baseGraph, layoutName, locationData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a bounding box that describes the extent of this layout in location coordinates.float[]
getLocation
(T obj) Gets the location of the specified object as determined by this layout.protected void
A Tree layout expects the graph to directed and acyclic, with a root node and children nodes.void
setProjection
(Network<T> projection) Sets the projection associated with this Layout.void
update()
Updates this layout.Methods inherited from class repast.simphony.visualization.AbstractNetworkLayout
getGraph, getLayoutProperties, getLocationData, getName, setLayoutProperties
-
Field Details
-
layout
-
network
-
-
Constructor Details
-
TreeLayout2D
public TreeLayout2D()
-
-
Method Details
-
setProjection
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.
-
update
public void update()Description copied from interface:Layout
Updates this layout. -
setLayout
protected void setLayout()A Tree layout expects the graph to directed and acyclic, with a root node and children nodes. Isolated nodes without edges are pruned. -
getLocation
Description copied from interface:Layout
Gets the location of the specified object as determined by this layout.- Parameters:
obj
- the object whose location we want.- Returns:
- the location of the object.
-
getBoundingBox
Description copied from interface:Layout
Gets a bounding box that describes the extent of this layout in location coordinates.- Returns:
- a bounding box that describes the extent of this layout in location coordinates, or a 0 size box if the extent is unknown.
-