org.apache.pivot.wtk
Class ColorChooser

java.lang.Object
  extended by org.apache.pivot.wtk.Component
      extended by org.apache.pivot.wtk.Container
          extended by org.apache.pivot.wtk.ColorChooser
All Implemented Interfaces:
Iterable<Component>, Sequence<Component>, ConstrainedVisual, Visual

public class ColorChooser
extends Container

Component that allows the user to select a color.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary
 
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence
Sequence.Tree<T>
 
Constructor Summary
ColorChooser()
           
 
Method Summary
 ListenerList<ColorChooserListener> getColorChooserListeners()
          Returns the color chooser listener list.
 ListenerList<ColorChooserSelectionListener> getColorChooserSelectionListeners()
          Returns the color chooser selection listener list.
 Color getSelectedColor()
          Gets the currently selected color, or null if no color is selected.
 String getSelectedColorKey()
          Gets the data binding key that is set on this color chooser.
 void load(Dictionary<String,?> context)
          Loads the selected color from the specified bind context using this color chooser's bind key, if one is set.
 void setSelectedColor(Color selectedColor)
          Sets the currently selected color.
 void setSelectedColor(String selectedColor)
          Sets the currently selected color.
 void setSelectedColorKey(String selectedColorKey)
          Sets this color chooser's data binding key.
 void store(Dictionary<String,?> context)
          Stores the selected color into the specified bind context using this color picker's bind key, if one is set.
 
Methods inherited from class org.apache.pivot.wtk.Container
add, clear, containsFocus, descendantAdded, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, iterator, layout, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, requestFocus, setContextKey, setFocusTraversalPolicy, setParent, setVisible, transferFocus, update
 
Methods inherited from class org.apache.pivot.wtk.Component
clearFocus, getAttributes, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getGraphics, getHeight, getLocation, getMaximumPreferredHeight, getMaximumPreferredWidth, getMenuHandler, getMinimumPreferredHeight, getMinimumPreferredWidth, getParent, getPreferredHeight, getPreferredHeight, getPreferredHeightLimits, getPreferredSize, getPreferredWidth, getPreferredWidth, getPreferredWidthLimits, getSize, getSkin, getStyles, getTooltipText, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWindow, getX, getY, installThemeSkin, invalidate, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, load, mapPointFromAncestor, mapPointToAncestor, mouseOver, reenterMouse, repaint, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttributes, setAutomationID, setCursor, setCursor, setDragSource, setDropTarget, setEnabled, setHeight, setLocation, setLocation, setMaximumPreferredHeight, setMaximumPreferredWidth, setMenuHandler, setMinimumPreferredHeight, setMinimumPreferredWidth, setPreferredHeight, setPreferredHeightLimits, setPreferredHeightLimits, setPreferredSize, setPreferredSize, setPreferredWidth, setPreferredWidthLimits, setPreferredWidthLimits, setSize, setSize, setSkin, setStyles, setStyles, setStyles, setTooltipText, setWidth, setX, setY, store, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorChooser

public ColorChooser()
Method Detail

getSelectedColor

public Color getSelectedColor()
Gets the currently selected color, or null if no color is selected.


setSelectedColor

public void setSelectedColor(Color selectedColor)
Sets the currently selected color.

Parameters:
selectedColor - The selected color, or null to specify no selection

setSelectedColor

public void setSelectedColor(String selectedColor)
Sets the currently selected color.

Parameters:
selectedColor - The selected color

getSelectedColorKey

public String getSelectedColorKey()
Gets the data binding key that is set on this color chooser.


setSelectedColorKey

public void setSelectedColorKey(String selectedColorKey)
Sets this color chooser's data binding key.


load

public void load(Dictionary<String,?> context)
Loads the selected color from the specified bind context using this color chooser's bind key, if one is set.

Overrides:
load in class Container

store

public void store(Dictionary<String,?> context)
Stores the selected color into the specified bind context using this color picker's bind key, if one is set.

Overrides:
store in class Container

getColorChooserListeners

public ListenerList<ColorChooserListener> getColorChooserListeners()
Returns the color chooser listener list.


getColorChooserSelectionListeners

public ListenerList<ColorChooserSelectionListener> getColorChooserSelectionListeners()
Returns the color chooser selection listener list.