Class GrayPaintScale

    • Constructor Summary

      Constructors 
      Constructor Description
      GrayPaintScale()
      Creates a new GrayPaintScale instance with default values.
      GrayPaintScale​(double lowerBound, double upperBound)
      Creates a new paint scale for values in the specified range.
      GrayPaintScale​(double lowerBound, double upperBound, int alpha)
      Creates a new paint scale for values in the specified range.
    • Constructor Detail

      • GrayPaintScale

        public GrayPaintScale()
        Creates a new GrayPaintScale instance with default values.
      • GrayPaintScale

        public GrayPaintScale​(double lowerBound,
                              double upperBound)
        Creates a new paint scale for values in the specified range.
        Parameters:
        lowerBound - the lower bound.
        upperBound - the upper bound.
        Throws:
        IllegalArgumentException - if lowerBound is not less than upperBound.
      • GrayPaintScale

        public GrayPaintScale​(double lowerBound,
                              double upperBound,
                              int alpha)
        Creates a new paint scale for values in the specified range.
        Parameters:
        lowerBound - the lower bound.
        upperBound - the upper bound.
        alpha - the alpha transparency (0-255).
        Throws:
        IllegalArgumentException - if lowerBound is not less than upperBound, or alpha is not in the range 0 to 255.
        Since:
        1.0.13
    • Method Detail

      • getAlpha

        public int getAlpha()
        Returns the alpha transparency that was specified in the constructor.
        Returns:
        The alpha transparency (in the range 0 to 255).
        Since:
        1.0.13
      • getPaint

        public Paint getPaint​(double value)
        Returns a paint for the specified value.
        Specified by:
        getPaint in interface PaintScale
        Parameters:
        value - the value (must be within the range specified by the lower and upper bounds for the scale).
        Returns:
        A paint for the specified value.
      • equals

        public boolean equals​(Object obj)
        Tests this GrayPaintScale instance for equality with an arbitrary object. This method returns true if and only if:
        • obj is not null;
        • obj is an instance of GrayPaintScale;
        Overrides:
        equals in class Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class Object
        Returns:
        A hash code.