Class FillMode


  • @Equality
    public class FillMode
    extends java.lang.Object
    Describes how a region above the axis is represented visually. It can be represented by a line, a filled region, or both. Both parts may be drawn with variable transparency.
    Since:
    27 Mar 2015
    Author:
    Mark Taylor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static FillMode LINE  
      static FillMode SEMI
      Solid boundary, fill area coloured in with transparency.
      static FillMode SOLID
      Solid fill area, no boundary.
    • Constructor Summary

      Constructors 
      Constructor Description
      FillMode​(java.lang.String name, double lineAlpha, double fillAlpha, java.lang.String description)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.Icon createIcon​(int[] data, java.awt.Color color, java.awt.Stroke stroke, int pad)
      Returns an icon representing this fill mode.
      boolean equals​(java.lang.Object o)  
      java.lang.String getDescription()
      Returns a short description for this mode.
      float getFillAlpha()
      Returns the alpha value for filling the area.
      float getLineAlpha()
      Returns the alpha value for drawing a line.
      java.lang.String getName()
      Returns the name for this mode.
      boolean hasFill()
      Indicates whether the area is filled.
      int hashCode()  
      boolean hasLine()
      Indicates whether a line is drawn.
      boolean isOpaque()
      Indicates whether this mode represents opaque drawing.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • SOLID

        public static final FillMode SOLID
        Solid fill area, no boundary.
      • LINE

        public static final FillMode LINE
      • SEMI

        public static final FillMode SEMI
        Solid boundary, fill area coloured in with transparency.
    • Constructor Detail

      • FillMode

        public FillMode​(java.lang.String name,
                        double lineAlpha,
                        double fillAlpha,
                        java.lang.String description)
        Constructor.
        Parameters:
        name - mode name
        lineAlpha - alpha for line drawing (zero means no line)
        fillAlpha - alpha for area filling (zero means no fill)
        description - plain text description
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name for this mode.
        Returns:
        name
      • getDescription

        public java.lang.String getDescription()
        Returns a short description for this mode.
        Returns:
        plain text description
      • getLineAlpha

        public float getLineAlpha()
        Returns the alpha value for drawing a line.
        Returns:
        line alpha in range 0..1, zero for no line
      • getFillAlpha

        public float getFillAlpha()
        Returns the alpha value for filling the area.
        Returns:
        fill alpha in range 0..1, zero for no fill
      • hasLine

        public boolean hasLine()
        Indicates whether a line is drawn.
        Returns:
        lineAlpha>0
      • hasFill

        public boolean hasFill()
        Indicates whether the area is filled.
        Returns:
        fillAlpha>0
      • isOpaque

        public boolean isOpaque()
        Indicates whether this mode represents opaque drawing.
        Returns:
        true only if no transparency is applied
      • createIcon

        public javax.swing.Icon createIcon​(int[] data,
                                           java.awt.Color color,
                                           java.awt.Stroke stroke,
                                           int pad)
        Returns an icon representing this fill mode.
        Parameters:
        data - Y data values as integer pixel levels above 0
        color - base colour
        stroke - line stroke
        pad - number of pixels on all sides to pad
        Returns:
        icon
      • hashCode

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

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