Class Symbol


  • public class Symbol
    extends java.lang.Object
    The definition of a symbol that should be rendered at the node position.
    Since:
    10827 Extracted from NodeElement
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.awt.Color fillColor
      The color to fill the interior of the shape.
      int size
      The width and height of this symbol
      java.awt.Stroke stroke
      The stroke to use for the outline
      java.awt.Color strokeColor
      The color to draw the stroke with
      private SymbolShape symbolShape  
    • Constructor Summary

      Constructors 
      Constructor Description
      Symbol​(SymbolShape symbol, int size, java.awt.Stroke stroke, java.awt.Color strokeColor, java.awt.Color fillColor)
      Create a new symbol
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Shape buildShapeAround​(double x, double y)
      Builds the shape for this symbol
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • size

        public final int size
        The width and height of this symbol
      • stroke

        public final java.awt.Stroke stroke
        The stroke to use for the outline
      • strokeColor

        public final java.awt.Color strokeColor
        The color to draw the stroke with
      • fillColor

        public final java.awt.Color fillColor
        The color to fill the interior of the shape.
    • Constructor Detail

      • Symbol

        public Symbol​(SymbolShape symbol,
                      int size,
                      java.awt.Stroke stroke,
                      java.awt.Color strokeColor,
                      java.awt.Color fillColor)
        Create a new symbol
        Parameters:
        symbol - The symbol type
        size - The overall size of the symbol, both width and height are the same
        stroke - The stroke to use for the outline
        strokeColor - The color to draw the stroke with
        fillColor - The color to fill the interior of the shape.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • buildShapeAround

        public java.awt.Shape buildShapeAround​(double x,
                                               double y)
        Builds the shape for this symbol
        Parameters:
        x - The center x coordinate
        y - The center y coordinate
        Returns:
        The symbol shape.