Package org.eclipse.gef.ui.palette
Class PaletteColorProvider
java.lang.Object
org.eclipse.gef.GEFColorProvider
org.eclipse.gef.ui.palette.PaletteColorProvider
- All Implemented Interfaces:
org.eclipse.draw2d.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
org.eclipse.draw2d.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, getShadowColor, getTitleBackground, getTitleForeground, getTitleGradient, getTitleInactiveBackground, getTitleInactiveForeground, getTitleInactiveGradient, getTooltipBackground, getTooltipForeground
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PaletteColorProvider
protected PaletteColorProvider()
-
-
Method Details
-
getListSelectedBackgroundColor
- Specified by:
getListSelectedBackgroundColorin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getListSelectedBackgroundColorin classGEFColorProvider
-
getListHoverBackgroundColor
- Specified by:
getListHoverBackgroundColorin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getListHoverBackgroundColorin classGEFColorProvider
-
getButton
- Specified by:
getButtonin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getButtonin classGEFColorProvider
-
getButtonDarker
- Specified by:
getButtonDarkerin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getButtonDarkerin classGEFColorProvider
-
getButtonDarkest
- Specified by:
getButtonDarkestin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getButtonDarkestin classGEFColorProvider
-
getListBackground
- Specified by:
getListBackgroundin interfaceorg.eclipse.draw2d.ColorProvider- Overrides:
getListBackgroundin classGEFColorProvider
-
getListForeground
- Specified by:
getListForegroundin interfaceorg.eclipse.draw2d.ColorProvider- 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.
-