Package org.eclipse.ui.themes
Class RGBBlendColorFactory
java.lang.Object
org.eclipse.ui.themes.RGBBlendColorFactory
- All Implemented Interfaces:
IExecutableExtension
,IColorFactory
A reusable
IColorFactory
that may be used to blend two colors.
The colors to blend are specified as per method number two in
IExecutableExtension
.
Example usage:
<colorDefinition label="Red/Blue Blend" id="example.redblueblend">
<colorFactory plugin="org.eclipse.ui"
class="org.eclipse.ui.themes.RGBBlendColorFactory">
<parameter name="color1" value="255,0,0" />
<parameter name="color2" value="COLOR_BLUE" />
</colorFactory>
</colorDefinition>
The color values may be specified as RGB triples or as SWT constants.
- Since:
- 3.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new color.void
setInitializationData
(IConfigurationElement config, String propertyName, Object data) This executable extension requires parameters to be explicitly declared via the second method described in theIExecutableExtension
documentation.
-
Constructor Details
-
RGBBlendColorFactory
public RGBBlendColorFactory()
-
-
Method Details
-
createColor
Description copied from interface:IColorFactory
Create a new color.- Specified by:
createColor
in interfaceIColorFactory
- Returns:
- a new color. This must never be
null
.
-
setInitializationData
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException This executable extension requires parameters to be explicitly declared via the second method described in theIExecutableExtension
documentation. This class expects that there will be two parameters,color1
andcolor2
, that describe the two colors to be blended. These values may either be RGB triples or SWT constants.- Specified by:
setInitializationData
in interfaceIExecutableExtension
- Parameters:
config
- the configuration element used to trigger this execution. It can be queried by the executable extension for specific configuration propertiespropertyName
- the name of an attribute of the configuration element used on thecreateExecutableExtension(String)
call. This argument can be used in the cases where a single configuration element is used to define multiple executable extensions.data
- adapter data in the form of aString
, aHashtable
, ornull
.- Throws:
CoreException
- if error(s) detected during initialization processing- See Also:
-