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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    Colors 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

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Whether 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

    Constructors
    Constructor
    Description
    SimFieldRenderer(edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> aPickedState, boolean aCyclic)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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)
     
    protected static boolean
    vertexHit(edu.uci.ics.jung.visualization.RenderContext<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink> rc, Shape s)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pickedState

      protected edu.uci.ics.jung.visualization.picking.PickedState<net.simplace.sim.util.FWSimFieldContainer> pickedState
      Picked state of the vertices.
    • cyclic

      protected boolean cyclic
      Whether 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 vertices
      aCyclic - 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 context
      aV - the vertex
      aShape - 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:
      paintVertex in interface edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<net.simplace.sim.util.FWSimFieldContainer, net.simplace.sim.model.SimFieldLink>
      See Also:
      • Renderer.Vertex.paintVertex(edu.uci.ics.jung.visualization.RenderContext, edu.uci.ics.jung.algorithms.layout.Layout, java.lang.Object)
    • 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 context
      s - the transformed shape of the vertex
      Returns:
      boolean if the shape is visible on the screen device