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
  • Constructor Details

    • SimFieldLocationLayout

      public SimFieldLocationLayout(SimEnvGraphPanel aGraphPanel)
      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 before initialize() is called.
      Parameters:
      aRadius -
    • reset

      public void reset()
      See Also:
      • Layout.reset()
    • initialize

      public void initialize()
      See Also:
      • Layout.initialize()
    • 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

      public List<net.simplace.sim.util.FWSimFieldContainer> componentVertices()
      Returns:
      the SimComponents and managements of the graph, sorted by the order of execution
    • angleOf

      public double angleOf(Point2D aPoint)
      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