com.ibm.commons.swt.util
Class ColorWrapper
java.lang.Object
com.ibm.commons.swt.util.Resource
com.ibm.commons.swt.util.ColorWrapper
public class ColorWrapper
- extends com.ibm.commons.swt.util.Resource
SWT Color wrapper. Automatically takes care of disposing of the Color. This class however does NOT
extend org.eclipse.swt.graphics.Color, so it is not interchangeable with org.eclipse.swt.graphics.Color.
Nested classes/interfaces inherited from class com.ibm.commons.swt.util.Resource |
com.ibm.commons.swt.util.Resource.Entry, com.ibm.commons.swt.util.Resource.ResourceRegistry |
Constructor Summary |
ColorWrapper(org.eclipse.swt.graphics.Device device,
int r,
int g,
int b)
Constructs a new instance of the class given the Device, and the Red, Green and Blue values of the desired color. |
ColorWrapper(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.RGB data)
Constructs a new instance of the class given the Device, and the RGB value of the desired color. |
ColorWrapper(int r,
int g,
int b)
Constructs a new instance of the Red, Green and Blue values of the desired color. |
ColorWrapper(org.eclipse.swt.graphics.RGB data)
Constructs a new instance of the class given the RGB value of the desired color. |
Methods inherited from class com.ibm.commons.swt.util.Resource |
findRegistry |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorWrapper
public ColorWrapper(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.RGB data)
- Constructs a new instance of the class given the Device, and the RGB value of the desired color.
- Parameters:
device
- - org.eclipse.swt.graphics.Devicedata
- - org.eclipse.swt.graphics.RGB
ColorWrapper
public ColorWrapper(org.eclipse.swt.graphics.Device device,
int r,
int g,
int b)
- Constructs a new instance of the class given the Device, and the Red, Green and Blue values of the desired color.
- Parameters:
device
- - org.eclipse.swt.graphics.Devicer
- - red int valueg
- - green int valueb
- - blue int value
ColorWrapper
public ColorWrapper(org.eclipse.swt.graphics.RGB data)
- Constructs a new instance of the class given the RGB value of the desired color.
- Parameters:
data
- - org.eclipse.swt.graphics.RGB
ColorWrapper
public ColorWrapper(int r,
int g,
int b)
- Constructs a new instance of the Red, Green and Blue values of the desired color.
- Parameters:
r
- - red int valueg
- - green int valueb
- - blue int value
dispose
public void dispose()
getRGB
public org.eclipse.swt.graphics.RGB getRGB()
getColor
public org.eclipse.swt.graphics.Color getColor()
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object
- Throws:
java.lang.Throwable