Class PaletteColorProvider

java.lang.Object
org.eclipse.gef.GEFColorProvider
org.eclipse.gef.ui.palette.PaletteColorProvider
All Implemented Interfaces:
org.eclipse.draw2d.ColorProvider

public class PaletteColorProvider extends GEFColorProvider
Default colors used by the PaletteViewer which are used when painting the palette figures. Clients may extend this class to define their own colors. The color provider can be set via PaletteViewer.setColorProvider(PaletteColorProvider). Important This class is still work-in-progress and new methods might be added in the future.
Since:
3.20
  • Field Details

  • Constructor Details

    • PaletteColorProvider

      protected PaletteColorProvider()
  • Method Details

    • getListSelectedBackgroundColor

      public Color getListSelectedBackgroundColor()
      Specified by:
      getListSelectedBackgroundColor in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getListSelectedBackgroundColor in class GEFColorProvider
    • getListHoverBackgroundColor

      public Color getListHoverBackgroundColor()
      Specified by:
      getListHoverBackgroundColor in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getListHoverBackgroundColor in class GEFColorProvider
    • getButton

      public Color getButton()
      Specified by:
      getButton in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getButton in class GEFColorProvider
    • getButtonDarker

      public Color getButtonDarker()
      Specified by:
      getButtonDarker in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getButtonDarker in class GEFColorProvider
    • getButtonDarkest

      public Color getButtonDarkest()
      Specified by:
      getButtonDarkest in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getButtonDarkest in class GEFColorProvider
    • getListBackground

      public Color getListBackground()
      Specified by:
      getListBackground in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getListBackground in class GEFColorProvider
    • getListForeground

      public Color getListForeground()
      Specified by:
      getListForeground in interface org.eclipse.draw2d.ColorProvider
      Overrides:
      getListForeground in class GEFColorProvider
    • getButtonDarker

      public final Color getButtonDarker(double weight)
      Returns the mix of getButton() with getButtonDarker() with weight weight. This weight must be within the interval [0, 1]. The mixed color is only calculated once and then cached. It is therefore recommended to only call this method with constants, to avoid rounding errors due to floating point arithmetic.
      Throws:
      IllegalArgumentException - if weight is outside the valid range.
    • getListBackground

      public final Color getListBackground(double weight)
      Returns the mix of getButton() with getListBackground() with weight weight. This weight must be within the interval [0, 1]. The mixed color is only calculated once and then cached. It is therefore recommended to only call this method with constants, to avoid rounding errors due to floating point arithmetic.
      Throws:
      IllegalArgumentException - if weight is outside the valid range.
      Since:
      3.21
    • getHotspotColor

      public final Color getHotspotColor()
      Returns the foreground color of the PinFigure when the cursor is over the button.