Class SimFieldLocationLayout
java.lang.Object
edu.uci.ics.jung.algorithms.layout.AbstractLayout<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>
net.simplace.client.sim.graphpanel.layout.SimFieldLocationLayout
- All Implemented Interfaces:
edu.uci.ics.jung.algorithms.layout.Layout<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>, org.apache.commons.collections15.Transformer<net.simplace.sim.util.FWSimFieldContainer, Point2D>
public class SimFieldLocationLayout
extends edu.uci.ics.jung.algorithms.layout.AbstractLayout<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>
- Author:
- aenders
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class edu.uci.ics.jung.algorithms.layout.AbstractLayout
graph, initialized, locations, size -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublevoidPlaces the SimComponents (and managements) of the graph on the circle again, in the order of execution (#62), e.g.List<net.simplace.sim.util.FWSimFieldContainer> protected SimFieldLocationLayout.CircleVertexDatagetCircleData(net.simplace.sim.util.FWSimFieldContainer v) doubleReturns the radius of the circle.voidvoidreset()voidsetRadius(double aRadius) Sets the radius of the circle.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
-
Constructor Details
-
SimFieldLocationLayout
- Parameters:
aGraphPanel-
-
-
Method Details
-
getRadius
public double getRadius()Returns the radius of the circle.- Returns:
- the radius
-
setRadius
public void setRadius(double aRadius) Sets the radius of the circle. Must be called beforeinitialize()is called.- Parameters:
aRadius-
-
reset
public void reset()- See Also:
-
initialize
public void initialize()- See Also:
-
arrangeComponents
public void arrangeComponents()Places the SimComponents (and managements) of the graph on the circle again, in the order of execution (#62), e.g. after the order was changed or a component was added. Resources and outputs keep their position. -
componentVertices
- Returns:
- the SimComponents and managements of the graph, sorted by the order of execution
-
angleOf
- Parameters:
aPoint- a point of the graph (layout coordinates)- Returns:
- the angle of the point on the component circle, 0 .. 2 pi, as used for placing the components
-
getCircleData
protected SimFieldLocationLayout.CircleVertexData getCircleData(net.simplace.sim.util.FWSimFieldContainer v) - Parameters:
v- the field container- Returns:
- circle data of the vertex
-