Package org.csstudio.opibuilder.util
Class OPIColor
java.lang.Object
org.csstudio.opibuilder.util.OPIColor
- All Implemented Interfaces:
IAdaptable
The dedicated color type which supports predefined color name in OPI builder color file. If the color name doesn't
exist in the color file, the color value is null.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
<T> T
getAdapter
(Class<T> adapter) getCopy()
getImage()
Get the color image for this color.int
hashCode()
boolean
void
setColorName
(String colorName) void
setColorValue
(RGB rgb) toString()
-
Constructor Details
-
OPIColor
-
OPIColor
-
OPIColor
public OPIColor(int red, int green, int blue) -
OPIColor
-
-
Method Details
-
getColorName
- Returns:
- the name of color if it is a predefined color macro; otherwise, it is a string of the RGB values.
-
getRGBValue
- Returns:
- the rgb value of the color. null if the predefined color does not exist.
-
getSWTColor
- Returns:
- the swt color. No dispose is needed, the system will handle the dispose.
-
isPreDefined
public boolean isPreDefined()- Returns:
- true if this color is predefined in color file, false otherwise.
-
setColorName
-
setColorValue
-
getAdapter
- Specified by:
getAdapter
in interfaceIAdaptable
-
getImage
Get the color image for this color.- Returns:
- the color image
-
toString
-
equals
-
hashCode
public int hashCode() -
getCopy
-