Package org.eclipse.draw2d
Class ColorConstants.SystemColorFactory
java.lang.Object
org.eclipse.draw2d.ColorConstants.SystemColorFactory
- Enclosing interface:
- ColorConstants
This utility class is used to create a system
Color
using any of the
supported SWT
constants. The Color
is created using the
Display
bound to the current thread.- Since:
- 3.13
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SystemColorFactory
public SystemColorFactory()
-
-
Method Details
-
getColor
Returns the matching standardColor
for the given constant, which should be one of the color constants specified in classSWT
. Any value other than one of theSWT
color constants which is passed in will result in theColor
black. ThisColor
should not be free'd because it was allocated by the system, not the application. Note: This method should be invoked from within the UI thread if possible, as it will attempt to create a new Display instance, if not!
-