org.pentaho.di.ui.core.gui
Class ManagedColor

java.lang.Object
  extended by 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
ManagedColor(Color color, boolean systemColor)
           
ManagedColor(Display display, int color)
          Create a managed color by specifying the color (SWT.COLOR_*)
ManagedColor(Display display, int r, int g, int b)
          Create a new managed color by using the Red Green & Blue values.
ManagedColor(Display display, RGB rgb)
          Create a new managed color by using the Red Green & Blue values.
 
Method Summary
 void dispose()
          Free the managed resource if it hasn't already been done and if this is not a system color
 Color getColor()
           
 boolean isSystemColor()
           
 void setColor(Color color)
           
 void setSystemColor(boolean systemColor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedColor

public ManagedColor(Color color,
                    boolean systemColor)
Parameters:
color - The color
systemColor - true if this is a system color and doesn't need to be disposed off

ManagedColor

public ManagedColor(Display display,
                    RGB rgb)
Create a new managed color by using the Red Green & Blue values.

Parameters:
display -
rgb -

ManagedColor

public ManagedColor(Display display,
                    int r,
                    int g,
                    int b)
Create a new managed color by using the Red Green & Blue values.

Parameters:
display -
r - Red composite
g - Green composite
b - Blue composite

ManagedColor

public ManagedColor(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 Color getColor()
Returns:
Returns the color.

setColor

public void setColor(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.