Class DiscreteColorScalePane

    • Constructor Detail

      • DiscreteColorScalePane

        public DiscreteColorScalePane​(ColorScale cs)
        A Basic DiscreteColorScalePane. It assumes, that the colors are spaced equally in the ColorScale provided.
        Parameters:
        cs - the colorscale to use
    • Method Detail

      • paintScale

        protected void paintScale​(Graphics g,
                                  int w,
                                  int h)
        This helper function paints a LinearGradientPaint on a graphics object. Unfortunately directly printing it to a panel will mess up the size, so we print it to a image instead in paintComponent
        Overrides:
        paintScale in class ColorScalePane
        Parameters:
        g - The graphics object to paint to
        w - The width of the gradient
        h - the height of the gradient