Class ArrowGlyph

  • All Implemented Interfaces:
    Glyph

    public class ArrowGlyph
    extends java.lang.Object
    implements Glyph
    A Glyph that paints an arrow shape within the bounds. The setDirection method allows the decision of the direction, to which the arrow points.
    Since:
    1.5
    Author:
    Mark Southern, Andreas Dräger
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrowGlyph()
      Creates a new ArrowGlyph, which is filled with the color blue by default.
      ArrowGlyph​(java.awt.geom.Rectangle2D.Float bounds)
      This constructs an arrow in the given bounds, which is colored blue.
      ArrowGlyph​(java.awt.geom.Rectangle2D.Float bounds, java.awt.Paint fillPaint, java.awt.Paint outerPaint)
      Constructor which sets both the size of this arrow and its color.
      ArrowGlyph​(java.awt.Paint fillPaint, java.awt.Paint outerPaint)
      Creates a new ArrowGlyph, which is filled with the given color.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.geom.Rectangle2D.Float getBounds()  
      java.awt.Paint getFillPaint()
      Returns the paint properties of this glyph.
      java.awt.Paint getOuterPaint()
      Returns the paint properties of the outer line of this glyph.
      void render​(java.awt.Graphics2D g)  
      void setBounds​(java.awt.geom.Rectangle2D.Float r)  
      void setDirection​(int direction)
      This method allows you to decide in which direction the arrow has to point.
      void setFillPaint​(java.awt.Paint fillPaint)
      Allows you to set the paint properties of this glyph.
      void setOuterPaint​(java.awt.Paint outerPaint)
      Allows setting the paint properties of the outer line of this glyph to the given value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArrowGlyph

        public ArrowGlyph()
        Creates a new ArrowGlyph, which is filled with the color blue by default.
      • ArrowGlyph

        public ArrowGlyph​(java.awt.Paint fillPaint,
                          java.awt.Paint outerPaint)
        Creates a new ArrowGlyph, which is filled with the given color.
        Parameters:
        fillPaint - Paint properties to fill this arrow.
        outerPaint - Paint properties of the outer border of this arrow.
      • ArrowGlyph

        public ArrowGlyph​(java.awt.geom.Rectangle2D.Float bounds)
        This constructs an arrow in the given bounds, which is colored blue.
        Parameters:
        bounds -
      • ArrowGlyph

        public ArrowGlyph​(java.awt.geom.Rectangle2D.Float bounds,
                          java.awt.Paint fillPaint,
                          java.awt.Paint outerPaint)
        Constructor which sets both the size of this arrow and its color.
        Parameters:
        bounds -
        fillPaint -
    • Method Detail

      • setBounds

        public void setBounds​(java.awt.geom.Rectangle2D.Float r)
        Specified by:
        setBounds in interface Glyph
      • setDirection

        public void setDirection​(int direction)
        This method allows you to decide in which direction the arrow has to point. The definition of directions is equal to the definition of StrandedFeature.
        Parameters:
        direction - A +1 means to the right, -1 to the left an 0 (and any other value) produces a rectangular shape without arrows at its end.
      • render

        public void render​(java.awt.Graphics2D g)
        Specified by:
        render in interface Glyph
      • getFillPaint

        public java.awt.Paint getFillPaint()
        Returns the paint properties of this glyph.
        Returns:
        the fillPaint
      • setFillPaint

        public void setFillPaint​(java.awt.Paint fillPaint)
        Allows you to set the paint properties of this glyph.
        Parameters:
        fillPaint -
      • getOuterPaint

        public java.awt.Paint getOuterPaint()
        Returns the paint properties of the outer line of this glyph.
        Returns:
        the outerPaint
      • setOuterPaint

        public void setOuterPaint​(java.awt.Paint outerPaint)
        Allows setting the paint properties of the outer line of this glyph to the given value.
        Parameters:
        outerPaint -