Package org.apache.pivot.wtk
Class ColorChooser
- java.lang.Object
-
- org.apache.pivot.wtk.Component
-
- org.apache.pivot.wtk.Container
-
- org.apache.pivot.wtk.ColorChooser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceColorChooser.SelectedColorBindMappingTranslates between color and context data during data binding.-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container
Container.EDTChecker
-
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
Constructors Constructor Description ColorChooser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()If a bind key is set, clears the selected color.ListenerList<ColorChooserBindingListener>getColorChooserBindingListeners()ListenerList<ColorChooserSelectionListener>getColorChooserSelectionListeners()java.awt.ColorgetSelectedColor()ColorChooser.SelectedColorBindMappinggetSelectedColorBindMapping()BindTypegetSelectedColorBindType()java.lang.StringgetSelectedColorKey()voidload(java.lang.Object context)Loads the selected color from the specified bind context using this color chooser's bind key, if one is set.voidsetSelectedColor(java.awt.Color selectedColor)Sets the selected color.voidsetSelectedColor(java.lang.String selectedColor)Sets the selected color.voidsetSelectedColorBindMapping(ColorChooser.SelectedColorBindMapping selectedColorBindMapping)voidsetSelectedColorBindType(BindType selectedColorBindType)voidsetSelectedColorKey(java.lang.String selectedColorKey)Sets this color chooser's data binding key.voidstore(java.lang.Object context)Stores the selected color into the specified bind context using this color chooser's bind key, if one is set.-
Methods inherited from class org.apache.pivot.wtk.Container
add, assertEventDispatchThread, assertEventDispatchThread, containsFocus, descendantAdded, descendantGainedFocus, descendantLostFocus, descendantRemoved, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, setParent, setVisible, transferFocus, update
-
Methods inherited from class org.apache.pivot.wtk.Component
checkSkin, clearFocus, contains, copyStyle, copyStyle, getAncestor, getAncestor, getAttribute, getAutomationID, getBaseline, getBaseline, getBounds, getComponentClassListeners, getComponentDataListeners, getComponentDecoratorListeners, getComponentKeyListeners, getComponentListeners, getComponentMouseButtonListeners, getComponentMouseListeners, getComponentMouseWheelListeners, getComponentStateListeners, getComponentStyleListeners, getComponentTooltipListeners, getCursor, getDecoratedBounds, getDecorators, getDisplay, getDragSource, getDropTarget, getFocusedComponent, getHeight, getHeightLimits, getLocation, getMaximumHeight, getMaximumWidth, getMenuHandler, getMinimumHeight, getMinimumWidth, getMouseLocation, getName, getNamedStyles, getParent, getPreferredHeight, getPreferredHeight, getPreferredSize, getPreferredWidth, getPreferredWidth, getScreenBounds, getSize, getSkin, getStyle, getStyle, getStyleBoolean, getStyleBoolean, getStyleColor, getStyleColor, getStyleFont, getStyleFont, getStyleInt, getStyleInt, getStyles, getTextInputMethodListener, getTooltipDelay, getTooltipText, getTooltipWrapText, getTypedStyles, getUserData, getVisibleArea, getVisibleArea, getVisibleArea, getWidth, getWidthLimits, getWindow, getX, getY, indexBoundsCheck, installSkin, isBlocked, isEnabled, isFocusable, isFocused, isMouseOver, isOpaque, isPreferredHeightSet, isPreferredSizeSet, isPreferredWidthSet, isShowing, isValid, isVisible, keyPressed, keyReleased, keyTyped, mapPointFromAncestor, mapPointFromAncestor, mapPointToAncestor, mapPointToAncestor, mouseOver, offsetToScreen, putStyle, putStyle, reenterMouse, repaint, repaint, repaint, repaint, repaint, scrollAreaToVisible, scrollAreaToVisible, setAttribute, setAutomationID, setAutomationID, setCursor, setDragSource, setDropTarget, setEnabled, setFocused, setHeight, setHeightLimits, setHeightLimits, setLocation, setLocation, setMaximumHeight, setMaximumWidth, setMenuHandler, setMinimumHeight, setMinimumWidth, setName, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSize, setSize, setSkin, setStyleName, setStyleNames, setStyleNames, setStyles, setStyles, setTooltipDelay, setTooltipText, setTooltipWrapText, setWidth, setWidthLimits, setWidthLimits, setX, setY, toString, transferFocus, validate
-
-
-
-
Method Detail
-
getSelectedColor
public java.awt.Color getSelectedColor()
- Returns:
- The currently selected color, or
nullif no color is selected.
-
setSelectedColor
public void setSelectedColor(java.awt.Color selectedColor)
Sets the selected color.- Parameters:
selectedColor- The color to select, ornullto clear the selection.
-
setSelectedColor
public void setSelectedColor(java.lang.String selectedColor)
Sets the selected color.- Parameters:
selectedColor- The color to select, ornullto clear the selection.
-
getSelectedColorKey
public java.lang.String getSelectedColorKey()
- Returns:
- The data binding key that is set on this color chooser.
-
setSelectedColorKey
public void setSelectedColorKey(java.lang.String selectedColorKey)
Sets this color chooser's data binding key.- Parameters:
selectedColorKey- The binding key for the selected color.
-
getSelectedColorBindType
public BindType getSelectedColorBindType()
-
setSelectedColorBindType
public void setSelectedColorBindType(BindType selectedColorBindType)
-
getSelectedColorBindMapping
public ColorChooser.SelectedColorBindMapping getSelectedColorBindMapping()
-
setSelectedColorBindMapping
public void setSelectedColorBindMapping(ColorChooser.SelectedColorBindMapping selectedColorBindMapping)
-
load
public void load(java.lang.Object context)
Loads the selected color from the specified bind context using this color chooser's bind key, if one is set.
-
store
public void store(java.lang.Object context)
Stores the selected color into the specified bind context using this color chooser's bind key, if one is set.
-
clear
public void clear()
If a bind key is set, clears the selected color.
-
getColorChooserSelectionListeners
public ListenerList<ColorChooserSelectionListener> getColorChooserSelectionListeners()
- Returns:
- The color chooser selection listener list.
-
getColorChooserBindingListeners
public ListenerList<ColorChooserBindingListener> getColorChooserBindingListeners()
- Returns:
- The color chooser binding listener list.
-
-