Class SimFieldLocationTransformer

java.lang.Object
net.simplace.client.sim.graphpanel.transformer.SimFieldLocationTransformer
All Implemented Interfaces:
org.apache.commons.collections15.Transformer<net.simplace.sim.util.FWSimFieldContainer, Point2D>

public class SimFieldLocationTransformer extends Object implements org.apache.commons.collections15.Transformer<net.simplace.sim.util.FWSimFieldContainer, Point2D>
Transforms a field container into its initial location: the vertical position depends on the content type (resources top, SimComponents middle, outputs bottom), the horizontal position on the order number. This is used as the backing Transformer for the LazyMap of the layouts.
Author:
Andreas Enders
  • Field Details

    • MAIN_HEIGHT

      public static final Map<net.simplace.sim.util.FWSimVariable.CONTENT_TYPE, Double> MAIN_HEIGHT
      Relative vertical position (0..1) per content type.
    • MAIN_WIDTH

      public static final Map<net.simplace.sim.util.FWSimVariable.CONTENT_TYPE, Integer> MAIN_WIDTH
      First order number per content type (subtracted from the order number for the horizontal position).
  • Constructor Details

    • SimFieldLocationTransformer

      public SimFieldLocationTransformer(Dimension aDimension)
      Creates an instance with the specified dimension.
      Parameters:
      aDimension - size of the graph area
  • Method Details

    • transform

      public Point2D transform(net.simplace.sim.util.FWSimFieldContainer v)
      Specified by:
      transform in interface org.apache.commons.collections15.Transformer<net.simplace.sim.util.FWSimFieldContainer, Point2D>
      See Also:
      • Transformer.transform(java.lang.Object)