|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.preference.ColorSelector
public class ColorSelector
The ColorSelector is a wrapper for a button that displays a
selected Color and allows the user to change the selection.
| Field Summary | |
|---|---|
static String |
PROP_COLORCHANGE
Property name that signifies the selected color of this ColorSelector has changed. |
| 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 | |
|---|---|
void |
addListener(IPropertyChangeListener listener)
Adds a property change listener to this ColorSelector. |
Button |
getButton()
Get the button control being wrappered by the selector. |
RGB |
getColorValue()
Return the currently displayed color. |
void |
open()
Activate the editor for this selector. |
void |
removeListener(IPropertyChangeListener listener)
Removes the given listener from this ColorSelector. |
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 org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_COLORCHANGE
ColorSelector has changed.
| Constructor Detail |
|---|
public ColorSelector(Composite parent)
Composite.
parent - The parent of the button.| Method Detail |
|---|
public void addListener(IPropertyChangeListener listener)
ColorSelector.
Events are fired when the color in the control changes via the user
clicking an selecting a new one in the color dialog. No event is fired in
the case where setColorValue(RGB) is invoked.
listener - a property change listenerpublic Button getButton()
Buttonpublic RGB getColorValue()
RGBpublic void removeListener(IPropertyChangeListener listener)
ColorSelector. Has
no affect if the listener is not registered.
listener - a property change listenerpublic void setColorValue(RGB rgb)
rgb - The new color.public void setEnabled(boolean state)
state - the enabled state.protected void updateColorImage()
public void open()
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.