Package org.eclipse.gef.ui.palette
Class PaletteColorProvider
java.lang.Object
org.eclipse.gef.GEFColorProvider
org.eclipse.gef.ui.palette.PaletteColorProvider
- All Implemented Interfaces:
ColorProvider
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.draw2d.ColorProvider
ColorProvider.SystemColorFactory -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ColorgetButtonDarker(double weight) final ColorReturns the foreground color of thePinFigurewhen the cursor is over the button.final ColorgetListBackground(double weight) Methods inherited from class org.eclipse.gef.GEFColorProvider
getButtonLightest, getLineForeground, getMenuBackground, getMenuBackgroundSelected, getMenuForeground, getMenuForegroundSelected, getTitleBackground, getTitleForeground, getTitleGradient, getTitleInactiveBackground, getTitleInactiveForeground, getTitleInactiveGradient, getTooltipBackground, getTooltipForeground
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PaletteColorProvider
protected PaletteColorProvider()
-
-
Method Details
-
getListSelectedBackgroundColor
- Specified by:
getListSelectedBackgroundColorin interfaceColorProvider- Overrides:
getListSelectedBackgroundColorin classGEFColorProvider
-
getListHoverBackgroundColor
- Specified by:
getListHoverBackgroundColorin interfaceColorProvider- Overrides:
getListHoverBackgroundColorin classGEFColorProvider
-
getButton
- Specified by:
getButtonin interfaceColorProvider- Overrides:
getButtonin classGEFColorProvider
-
getButtonDarker
- Specified by:
getButtonDarkerin interfaceColorProvider- Overrides:
getButtonDarkerin classGEFColorProvider
-
getButtonDarkest
- Specified by:
getButtonDarkestin interfaceColorProvider- Overrides:
getButtonDarkestin classGEFColorProvider
-
getListBackground
- Specified by:
getListBackgroundin interfaceColorProvider- Overrides:
getListBackgroundin classGEFColorProvider
-
getListForeground
- Specified by:
getListForegroundin interfaceColorProvider- Overrides:
getListForegroundin classGEFColorProvider
-
getButtonDarker
Returns the mix ofgetButton()withgetButtonDarker()with weightweight. 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- ifweightis outside the valid range.
-
getListBackground
Returns the mix ofgetButton()withgetListBackground()with weightweight. 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- ifweightis outside the valid range.- Since:
- 3.21
-
getHotspotColor
Returns the foreground color of thePinFigurewhen the cursor is over the button.
-