Class SimFieldRenderer
java.lang.Object
net.simplace.client.sim.graphpanel.renderer.SimFieldRenderer
- All Implemented Interfaces:
edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>
public class SimFieldRenderer
extends Object
implements edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>
Paints the vertices of the solution graph with a gradient in the color of their content type.
- Author:
- aenders
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classColors of the vertices per content type.Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.Vertex
edu.uci.ics.jung.visualization.renderers.Renderer.Vertex.NOOP -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the gradient is cyclic (repeated from the middle of the shape).protected edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> Picked state of the vertices. -
Constructor Summary
ConstructorsConstructorDescriptionSimFieldRenderer(edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> aPickedState, boolean aCyclic) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpaintShapeForVertex(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aRc, net.simplace.sim.util.FWSimFieldContainer aV, Shape aShape) Fills the shape with the gradient and draws its outline.voidpaintVertex(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aRc, edu.uci.ics.jung.algorithms.layout.Layout<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aLayout, net.simplace.sim.util.FWSimFieldContainer aV) protected static booleanvertexHit(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> rc, Shape s)
-
Field Details
-
pickedState
protected edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> pickedStatePicked state of the vertices. -
cyclic
protected boolean cyclicWhether the gradient is cyclic (repeated from the middle of the shape).
-
-
Constructor Details
-
SimFieldRenderer
public SimFieldRenderer(edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> aPickedState, boolean aCyclic) - Parameters:
aPickedState- picked state of the verticesaCyclic- whether the gradient is cyclic
-
-
Method Details
-
paintShapeForVertex
protected void paintShapeForVertex(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aRc, net.simplace.sim.util.FWSimFieldContainer aV, Shape aShape) Fills the shape with the gradient and draws its outline.- Parameters:
aRc- render contextaV- the vertexaShape- the transformed shape of the vertex
-
paintVertex
public void paintVertex(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aRc, edu.uci.ics.jung.algorithms.layout.Layout<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> aLayout, net.simplace.sim.util.FWSimFieldContainer aV) - Specified by:
paintVertexin interfaceedu.uci.ics.jung.visualization.renderers.Renderer.Vertex<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>- See Also:
-
vertexHit
protected static boolean vertexHit(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> rc, Shape s) - Parameters:
rc- render contexts- the transformed shape of the vertex- Returns:
- boolean if the shape is visible on the screen device
-