net.sf.jzeno.echo.databinding
Class DynaColorChooser

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.CustomComponent
          extended by net.sf.jzeno.echo.databinding.DynaColorChooser
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, BindingTarget, PropertyComponent, RebindableComponent, EventSink, EventSource, Precreation, Component, ChangeListener, FastComponent, FastComponentContainer

public class DynaColorChooser
extends CustomComponent
implements ChangeListener, Precreation

This component allows you to choose a color from a palette of possible colors. Bind this component to a property of type Color.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
DynaColorChooser()
           
DynaColorChooser(java.lang.Class beanClass, java.lang.String propertyPath, java.lang.String constructionHints)
           
 
Method Summary
 void applyContext()
           
 Color getBorderColor()
           
 int getBorderSize()
           
 int getCellHeight()
           
 int getCellSpacing()
           
 Color getCellSpacingColor()
           
 int getCellsPerRow()
           
 int getCellWidth()
           
 Color[] getColorArray()
           
 java.lang.String getErrorMessage()
           
 Insets getInsets()
           
 boolean isReadOnly()
           
 void rebind()
           This operation causes the component to reset it's content to that of the domain model.
 void setBorderColor(Color c)
          Sets the border Color of the DynaColorChooser.
 void setBorderSize(int i)
          Sets the size of the border of the DynaColorChooser.
 void setCellHeight(int i)
           Sets the height of the cells in the color chooser.
 void setCellSpacing(int i)
           Sets the spacing between the cells of the palette.
 void setCellSpacingColor(Color c)
           Sets the color of the spacing between the cells of the palette.
 void setCellsPerRow(int i)
           Sets the number of cell per row in the palette.
 void setCellWidth(int i)
           Sets the height of the cells in the color chooser.
 void setColorArray(Color[] colors)
           Sets the color that are to be selected from.
 void setErrorMessage(java.lang.String errorMessage)
           
 void setInsets(Insets i)
          Sets the Insets used by the ColorChooser
 void setReadOnly(boolean readOnly)
           Mark this component as read-only.
 void stateChanged(ChangeEvent e)
          Invoked when a state change occurs.
 
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isRequired, isValid, markInvalid, markValid, preRender, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setRequired, setValue, traceValue, validate
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setFont, setForeground, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynaColorChooser

public DynaColorChooser()

DynaColorChooser

public DynaColorChooser(java.lang.Class beanClass,
                        java.lang.String propertyPath,
                        java.lang.String constructionHints)
Method Detail

rebind

public void rebind()
Description copied from interface: RebindableComponent

This operation causes the component to reset it's content to that of the domain model.

Specified by:
rebind in interface RebindableComponent
Overrides:
rebind in class CustomComponent

stateChanged

public void stateChanged(ChangeEvent e)
Description copied from interface: ChangeListener
Invoked when a state change occurs.

Specified by:
stateChanged in interface ChangeListener
Parameters:
e - The event describing the state change.

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface PropertyComponent
Overrides:
isReadOnly in class CustomComponent

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from interface: PropertyComponent

Mark this component as read-only.

Specified by:
setReadOnly in interface PropertyComponent
Overrides:
setReadOnly in class CustomComponent

getErrorMessage

public java.lang.String getErrorMessage()

setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)

setBorderColor

public void setBorderColor(Color c)
Sets the border Color of the DynaColorChooser.


getBorderColor

public Color getBorderColor()

setBorderSize

public void setBorderSize(int i)
Sets the size of the border of the DynaColorChooser.


getBorderSize

public int getBorderSize()

setCellHeight

public void setCellHeight(int i)

Sets the height of the cells in the color chooser.


getCellHeight

public int getCellHeight()

setCellWidth

public void setCellWidth(int i)

Sets the height of the cells in the color chooser.


getCellWidth

public int getCellWidth()

setCellSpacing

public void setCellSpacing(int i)

Sets the spacing between the cells of the palette.


getCellSpacing

public int getCellSpacing()

setCellSpacingColor

public void setCellSpacingColor(Color c)

Sets the color of the spacing between the cells of the palette.


getCellSpacingColor

public Color getCellSpacingColor()

setCellsPerRow

public void setCellsPerRow(int i)

Sets the number of cell per row in the palette.


getCellsPerRow

public int getCellsPerRow()

setColorArray

public void setColorArray(Color[] colors)

Sets the color that are to be selected from.


getColorArray

public Color[] getColorArray()

setInsets

public void setInsets(Insets i)
Sets the Insets used by the ColorChooser


getInsets

public Insets getInsets()

applyContext

public void applyContext()
Specified by:
applyContext in interface Precreation