Class RadialLayout
java.lang.Object
edu.uci.ics.jung.algorithms.layout.AbstractLayout<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number>
org.jppf.ui.monitoring.node.graph.RadialLayout
- All Implemented Interfaces:
edu.uci.ics.jung.algorithms.layout.Layout<org.jppf.client.monitoring.topology.AbstractTopologyComponent,,Number> org.apache.commons.collections15.Transformer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Point2D>
public class RadialLayout
extends edu.uci.ics.jung.algorithms.layout.AbstractLayout<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number>
Radial layout for JPPF topology graph.
This layout places all the driver vertices on a circle centered on the current view. The node vertices for each driver are then placed in a half-circle centered on the driver vertex, in the angle range [driverAngle - PI/2, driverAngle + PI/2], where driverAngle is the angle formed by the line segment between the center of the view and the driver vertex, with regards to the coordinates system.
This is not a generic layout algorithm as it assumes the graph to have the topological properties of a JPPF Grid:
- drivers are roots in the graph
- drivers can be linked together (i.e. cyclic graph)
- each node is only attached to a single driver (i.e. "terminal vertices")
- Author:
- Laurent Cohen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default radius factor to use when none is specified.Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size -
Constructor Summary
ConstructorsConstructorDescriptionRadialLayout(edu.uci.ics.jung.graph.Graph<org.jppf.client.monitoring.topology.AbstractTopologyComponent, Number> graph) Initialize this layout with the specified graph.RadialLayout(edu.uci.ics.jung.graph.Graph<org.jppf.client.monitoring.topology.AbstractTopologyComponent, Number> graph, double radiusFactor) Initialize this layout with the specified graph and radius factor. -
Method Summary
Methods inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
getGraph, getSize, getX, getY, isLocked, lock, lock, offsetVertex, setGraph, setInitializer, setLocation, setLocation, setSize, transform
-
Field Details
-
DEFAULT_RADIUS_FACTOR
public static final double DEFAULT_RADIUS_FACTORThe default radius factor to use when none is specified.- See Also:
-
-
Constructor Details
-
RadialLayout
public RadialLayout(edu.uci.ics.jung.graph.Graph<org.jppf.client.monitoring.topology.AbstractTopologyComponent, Number> graph) Initialize this layout with the specified graph.- Parameters:
graph- the graph to layout.
-
RadialLayout
public RadialLayout(edu.uci.ics.jung.graph.Graph<org.jppf.client.monitoring.topology.AbstractTopologyComponent, Number> graph, double radiusFactor) Initialize this layout with the specified graph and radius factor.- Parameters:
graph- the graph to layout.radiusFactor- radius factor to use.
-
-
Method Details
-
initialize
public void initialize() -
reset
public void reset()
-