Class ColourScheme

    • Constructor Detail

      • ColourScheme

        public ColourScheme()
    • Method Detail

      • getScaleBar

        public BufferedImage getScaleBar​(int width,
                                         int height,
                                         float fracOutOfRange,
                                         boolean vertical,
                                         boolean labels,
                                         Color textColor,
                                         Color bgColor)
        Gets a scale bar for this ColourScheme
        Parameters:
        width - The desired width of the scale bar
        height - The desired height of the scale bar
        fracOutOfRange - The amount of out of range to show as a fraction of the coloured part
        vertical - Whether or not the scale bar should be vertical
        labels - Whether to show numerical labels
        textColor - The colour of the text labels
        bgColor - The background colour for the text labels
        Returns:
        The scale bar image
      • getScaleBar

        public BufferedImage getScaleBar​(int width,
                                         int height,
                                         float fracOutOfRangeLow,
                                         float fracOutOfRangeHigh,
                                         boolean vertical,
                                         boolean labels,
                                         Color textColor,
                                         Color bgColor)
        Gets a scale bar for this ColourScheme
        Parameters:
        width - The desired width of the scale bar
        height - The desired height of the scale bar
        fracOutOfRangeLow - The amount below the minimum to show as a fraction of the coloured part
        fracOutOfRangeHigh - The amount above the maximum to show as a fraction of the coloured part
        vertical - Whether or not the scale bar should be vertical
        labels - Whether to show numerical labels
        textColor - The colour of the text labels
        bgColor - The background colour for the text labels
        Returns:
        The scale bar image
      • getColor

        public abstract Color getColor​(Number value)
        Returns the colour associated with the given value
        Parameters:
        value - The value to get a colour for
        Returns:
        The Color according to this ColourScheme
      • getScaleMin

        public abstract Float getScaleMin()
        Returns:
        The minimum value of this colour scale
      • getScaleMax

        public abstract Float getScaleMax()
        Returns:
        The maximum value of this colour scale