Class DefaultDirectedEdgeRenderer

java.lang.Object
org.cristalise.kernel.graph.renderer.DefaultDirectedEdgeRenderer
All Implemented Interfaces:
DirectedEdgeRenderer
Direct Known Subclasses:
WfDirectedEdgeDefRenderer, WfDirectedEdgeRenderer

public class DefaultDirectedEdgeRenderer extends Object implements DirectedEdgeRenderer
Default edge renderer implementing the DirectedEdgeRenderer. Use it as is or as a base class
  • Field Details

    • LINE_PAINT

      public static final Paint LINE_PAINT
    • TEXT_PAINT

      public static final Paint TEXT_PAINT
    • ERROR_PAINT

      public static final Paint ERROR_PAINT
  • Constructor Details

    • DefaultDirectedEdgeRenderer

      public DefaultDirectedEdgeRenderer()
      Setup arrow template
  • Method Details

    • draw

      public void draw(Graphics2D g2d, DirectedEdge directedEdge)
      Default implementation, can only draw straight line and does not add any label
      Specified by:
      draw in interface DirectedEdgeRenderer
      Parameters:
      g2d - the canvas to draw on
      directedEdge - te edge to be drawn
    • draw

      public void draw(Graphics2D g2d, DirectedEdge directedEdge, String label, String type, boolean hasError)
      Draws an edge using different calculations, coloring and label
      Parameters:
      g2d - the canvas
      directedEdge - edge to be drawn
      label - the label to put on the line
      type - the type of the line
      hasError - if the edge is in an erroneous state