|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Button
org.apache.pivot.wtk.ColorChooserButton
public class ColorChooserButton
A component that allows a user to select a color. The color chooser is hidden until the user pushes the button.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Button |
---|
Button.DataRenderer, Button.State |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
ColorChooserButton()
|
|
ColorChooserButton(Object buttonData)
|
Method Summary | |
---|---|
void |
clear()
If a bind key is set, clears the selected color. |
ListenerList<ColorChooserButtonListener> |
getColorChooserButtonListeners()
Returns the color chooser button listener list. |
ListenerList<ColorChooserButtonSelectionListener> |
getColorChooserButtonSelectionListeners()
Returns the color chooser button selection listener list. |
Color |
getSelectedColor()
Returns the currently selected color. |
String |
getSelectedColorKey()
Gets the data binding key that is set on this color chooser button. |
void |
load(Dictionary<String,?> context)
Loads the selected color from the specified bind context using this color picker button's bind key, if one is set. |
void |
setSelectedColor(Color selectedColor)
Sets the selected color. |
void |
setSelectedColor(String selectedColor)
Sets the selected color to the color represented by the specified color string. |
void |
setSelectedColorKey(String selectedColorKey)
Sets this color chooser button's data binding key. |
void |
setToggleButton(boolean toggleButton)
Sets the button's toggle state. |
void |
store(Dictionary<String,?> context)
Stores the selected color into the specified bind context using this color picker button's bind key, if one is set. |
Methods inherited from class org.apache.pivot.wtk.Button |
---|
getAction, getButtonData, getButtonGroup, getButtonListeners, getButtonPressListeners, getButtonStateListeners, getDataRenderer, getSelectedKey, getState, getStateKey, isSelected, isToggleButton, isTriState, press, setAction, setAction, setButtonData, setButtonGroup, setDataRenderer, setEnabled, setSelected, setSelectedKey, setState, setState, setStateKey, setTriState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColorChooserButton()
public ColorChooserButton(Object buttonData)
Method Detail |
---|
public void setToggleButton(boolean toggleButton)
Button
setToggleButton
in class Button
UnsupportedOperationException
- This method is not supported by ColorChooserButton.public Color getSelectedColor()
public void setSelectedColor(Color selectedColor)
selectedColor
- The color to select, or null to clear the selection.public final void setSelectedColor(String selectedColor)
selectedColor
- A string representing a colorpublic String getSelectedColorKey()
public void setSelectedColorKey(String selectedColorKey)
public void load(Dictionary<String,?> context)
load
in class Button
public void store(Dictionary<String,?> context)
store
in class Button
public void clear()
clear
in class Button
public ListenerList<ColorChooserButtonListener> getColorChooserButtonListeners()
public ListenerList<ColorChooserButtonSelectionListener> getColorChooserButtonSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |