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 Color
getButtonDarker
(double weight) final Color
Returns the foreground color of thePinFigure
when the cursor is over the button.Methods inherited from class org.eclipse.gef.GEFColorProvider
getButtonLightest, getLineForeground, getListBackground, getListForeground, 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:
getListSelectedBackgroundColor
in interfaceColorProvider
- Overrides:
getListSelectedBackgroundColor
in classGEFColorProvider
-
getListHoverBackgroundColor
- Specified by:
getListHoverBackgroundColor
in interfaceColorProvider
- Overrides:
getListHoverBackgroundColor
in classGEFColorProvider
-
getButton
- Specified by:
getButton
in interfaceColorProvider
- Overrides:
getButton
in classGEFColorProvider
-
getButtonDarker
- Specified by:
getButtonDarker
in interfaceColorProvider
- Overrides:
getButtonDarker
in classGEFColorProvider
-
getButtonDarkest
- Specified by:
getButtonDarkest
in interfaceColorProvider
- Overrides:
getButtonDarkest
in 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
- ifweight
is outside the valid range.
-
getHotspotColor
Returns the foreground color of thePinFigure
when the cursor is over the button.
-