Package org.pentaho.di.ui.core.gui
Class ManagedColor
- java.lang.Object
-
- org.pentaho.di.ui.core.gui.ManagedColor
-
public class ManagedColor extends Object
Class to keep track of which color is a system color (managed by the OS) and which is not.- Since:
- 2006-06-15
- Author:
- Matt
-
-
Constructor Summary
Constructors Constructor Description ManagedColor(org.eclipse.swt.graphics.Color color, boolean systemColor)
ManagedColor(org.eclipse.swt.widgets.Display display, int color)
Create a managed color by specifying the color (SWT.COLOR_*)ManagedColor(org.eclipse.swt.widgets.Display display, int r, int g, int b)
Create a new managed color by using the Red Green & Blue values.ManagedColor(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.RGB rgb)
Create a new managed color by using the Red Green & Blue values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Free the managed resource if it hasn't already been done and if this is not a system colororg.eclipse.swt.graphics.Color
getColor()
boolean
isSystemColor()
void
setColor(org.eclipse.swt.graphics.Color color)
void
setSystemColor(boolean systemColor)
-
-
-
Constructor Detail
-
ManagedColor
public ManagedColor(org.eclipse.swt.graphics.Color color, boolean systemColor)
- Parameters:
color
- The colorsystemColor
- true if this is a system color and doesn't need to be disposed off
-
ManagedColor
public ManagedColor(org.eclipse.swt.widgets.Display display, org.eclipse.swt.graphics.RGB rgb)
Create a new managed color by using the Red Green & Blue values.- Parameters:
display
-rgb
-
-
ManagedColor
public ManagedColor(org.eclipse.swt.widgets.Display display, int r, int g, int b)
Create a new managed color by using the Red Green & Blue values.- Parameters:
display
-r
- Red compositeg
- Green compositeb
- Blue composite
-
ManagedColor
public ManagedColor(org.eclipse.swt.widgets.Display display, int color)
Create a managed color by specifying the color (SWT.COLOR_*)- Parameters:
display
-color
-
-
-
Method Detail
-
dispose
public void dispose()
Free the managed resource if it hasn't already been done and if this is not a system color
-
getColor
public org.eclipse.swt.graphics.Color getColor()
- Returns:
- Returns the color.
-
setColor
public void setColor(org.eclipse.swt.graphics.Color color)
- Parameters:
color
- the color to set
-
setSystemColor
public void setSystemColor(boolean systemColor)
- Parameters:
systemColor
- the systemColor to set
-
isSystemColor
public boolean isSystemColor()
- Returns:
- true if this is a system color.
-
-