Eclipse Platform
2.1

org.eclipse.jface.preference
Class ColorSelector

java.lang.Object
  |
  +--org.eclipse.jface.preference.ColorSelector

public class ColorSelector
extends Object

The ColorSelector is a wrapper for a button that displays a selected Color and allows the user to change the selection.


Constructor Summary
ColorSelector(Composite parent)
          Create a new instance of the reciever and the button that it wrappers in the supplied parent Composite
 
Method Summary
 Button getButton()
          Get the button control being wrappered by the selector.
 RGB getColorValue()
          Return the currently displayed color.
 void setColorValue(RGB rgb)
          Set the current color value and update the control.
 void setEnabled(boolean state)
          Set whether or not the button is enabled.
protected  void updateColorImage()
          Update the image being displayed on the button using the current color setting,
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorSelector

public ColorSelector(Composite parent)
Create a new instance of the reciever and the button that it wrappers in the supplied parent Composite
Parameters:
parent. - The parent of the button.
Method Detail

getColorValue

public RGB getColorValue()
Return the currently displayed color.
Returns:
RGB

setColorValue

public void setColorValue(RGB rgb)
Set the current color value and update the control.
Parameters:
rgb. - The new color.

getButton

public Button getButton()
Get the button control being wrappered by the selector.
Returns:
Button

updateColorImage

protected void updateColorImage()
Update the image being displayed on the button using the current color setting,

setEnabled

public void setEnabled(boolean state)
Set whether or not the button is enabled.

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.