echopointng
Class ColorChooser

java.lang.Object
  extended by nextapp.echo2.app.Component
      extended by echopointng.ComponentEx
          extended by echopointng.AbleComponent
              extended by echopointng.ColorChooser
All Implemented Interfaces:
AccessKeyable, Attributeable, Borderable, Delegateable, Heightable, Insetable, MouseCursorable, Sizeable, ToolTipable, Widthable, java.io.Serializable, RenderIdSupport

public class ColorChooser
extends AbleComponent

ColorChooser allows the user to select a color from a color swatch model.

See Also:
Serialized Form

Field Summary
static Style DEFAULT_STYLE
           
static java.lang.String PROPERTY_SELECTION_MODEL
           
static java.lang.String PROPERTY_SELECTION_TEXT
           
static java.lang.String PROPERTY_SWATCH_HEIGHT
           
static java.lang.String PROPERTY_SWATCH_MODEL
           
static java.lang.String PROPERTY_SWATCH_WIDTH
           
static java.lang.String PROPERTY_SWATCHES_PER_ROW
           
 
Fields inherited from class echopointng.ComponentEx
PROPERTY_HIDDEN
 
Fields inherited from class nextapp.echo2.app.Component
CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopointng.able.AccessKeyable
PROPERTY_ACCESS_KEY
 
Fields inherited from interface echopointng.able.Borderable
PROPERTY_BORDER
 
Fields inherited from interface echopointng.able.MouseCursorable
CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, PROPERTY_MOUSE_CURSOR, PROPERTY_MOUSE_CURSOR_URI
 
Fields inherited from interface echopointng.able.Insetable
DEFAULT_INSETS, DEFAULT_OUTSETS, PROPERTY_INSETS, PROPERTY_OUTSETS
 
Fields inherited from interface echopointng.able.Widthable
PROPERTY_WIDTH
 
Fields inherited from interface echopointng.able.Heightable
PROPERTY_HEIGHT
 
Fields inherited from interface echopointng.able.ToolTipable
PROPERTY_TOOL_TIP_TEXT
 
Constructor Summary
ColorChooser()
          Creates a ColorChooser
 
Method Summary
 Color getSelectedColor()
          A short-cut method for getSelectionModel().getSelectedColor()
 ColorSelectionModel getSelectionModel()
           
 java.lang.String getSelectionText()
           
 int getSwatchesPerRow()
           
 Extent getSwatchHeight()
           
 ColorSwatchModel getSwatchModel()
           
 Extent getSwatchWidth()
           
 void processInput(java.lang.String inputName, java.lang.Object inputValue)
          Processes client input specific to the Component received from the UpdateManager.
 void setSelectedColor(Color newValue)
          A short-cut method for getSelectionModel().setSelectedColor()
 void setSelectionModel(ColorSelectionModel newValue)
           
 void setSelectionText(java.lang.String newValue)
           
 void setSwatchesPerRow(int newValue)
          Sets the number for color swatches that will be displayed per row of color data.
 void setSwatchHeight(Extent newValue)
          Sets the height of the color swatches
 void setSwatchModel(ColorSwatchModel newValue)
           
 void setSwatchWidth(Extent newValue)
          Sets the width of the color swatches
 
Methods inherited from class echopointng.AbleComponent
getAccessKey, getBorder, getHeight, getInsets, getMouseCursor, getMouseCursorURI, getOutsets, getToolTipText, getWidth, setAccessKey, setBorder, setHeight, setInsets, setMouseCursor, setMouseCursorURI, setOutsets, setToolTipText, setWidth
 
Methods inherited from class echopointng.ComponentEx
getAttribute, getAttributeNames, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, getRenderProperty, isHidden, setAttribute, setHidden, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class nextapp.echo2.app.Component
add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 
Methods inherited from interface echopointng.able.Delegateable
getRenderProperty, getRenderProperty
 

Field Detail

DEFAULT_STYLE

public static final Style DEFAULT_STYLE

PROPERTY_SELECTION_MODEL

public static final java.lang.String PROPERTY_SELECTION_MODEL
See Also:
Constant Field Values

PROPERTY_SELECTION_TEXT

public static final java.lang.String PROPERTY_SELECTION_TEXT
See Also:
Constant Field Values

PROPERTY_SWATCH_HEIGHT

public static final java.lang.String PROPERTY_SWATCH_HEIGHT
See Also:
Constant Field Values

PROPERTY_SWATCH_MODEL

public static final java.lang.String PROPERTY_SWATCH_MODEL
See Also:
Constant Field Values

PROPERTY_SWATCH_WIDTH

public static final java.lang.String PROPERTY_SWATCH_WIDTH
See Also:
Constant Field Values

PROPERTY_SWATCHES_PER_ROW

public static final java.lang.String PROPERTY_SWATCHES_PER_ROW
See Also:
Constant Field Values
Constructor Detail

ColorChooser

public ColorChooser()
Creates a ColorChooser

Method Detail

getSelectedColor

public Color getSelectedColor()
A short-cut method for getSelectionModel().getSelectedColor()


getSelectionModel

public ColorSelectionModel getSelectionModel()

getSelectionText

public java.lang.String getSelectionText()

getSwatchesPerRow

public int getSwatchesPerRow()
Returns:
the number for color swatches that will be displayed per row of color data.

getSwatchHeight

public Extent getSwatchHeight()
Returns:
- the height of the color swatches

getSwatchModel

public ColorSwatchModel getSwatchModel()

getSwatchWidth

public Extent getSwatchWidth()
Returns:
- the width of the color swatches

processInput

public void processInput(java.lang.String inputName,
                         java.lang.Object inputValue)
Description copied from class: Component
Processes client input specific to the Component received from the UpdateManager. Derivative implementations should take care to invoke super.processInput().

Overrides:
processInput in class Component
Parameters:
inputName - the name of the input
inputValue - the value of the input
See Also:
Component.processInput(java.lang.String, java.lang.Object)

setSelectedColor

public void setSelectedColor(Color newValue)
A short-cut method for getSelectionModel().setSelectedColor()


setSelectionModel

public void setSelectionModel(ColorSelectionModel newValue)

setSelectionText

public void setSelectionText(java.lang.String newValue)

setSwatchesPerRow

public void setSwatchesPerRow(int newValue)
Sets the number for color swatches that will be displayed per row of color data.

Parameters:
newValue - - the number for color swatches that will be displayed per row of color data.

setSwatchHeight

public void setSwatchHeight(Extent newValue)
Sets the height of the color swatches

Parameters:
newValue - - the height of the color swatches

setSwatchModel

public void setSwatchModel(ColorSwatchModel newValue)

setSwatchWidth

public void setSwatchWidth(Extent newValue)
Sets the width of the color swatches

Parameters:
newValue - - the width of the color swatches