net.sf.jzeno.echo.databinding
Class AbstractDynaPickList

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by net.sf.jzeno.echo.components.CustomComponent
          extended by net.sf.jzeno.echo.databinding.AbstractDynaPickList
All Implemented Interfaces:
java.io.Serializable, BindingTarget, PropertyComponent, RebindableComponent, EventSink, EventSource, Precreation, Component, FastComponent, FastComponentContainer
Direct Known Subclasses:
DynaLargePickList, DynaPickList

public abstract class AbstractDynaPickList
extends CustomComponent
implements Precreation

See Also:
Serialized Form

Nested Class Summary
 class AbstractDynaPickList.DefaultValidator
           
 
Field Summary
protected  DynaButton addAllButton
           
protected  DynaButton addButton
           
protected  java.util.List allOptions
           
protected  DynaGrid buttonGrid
           
protected  java.lang.String cssButtonClass
           
protected  java.lang.String cssButtonClassDisabled
           
protected  Decorator decorator
           
protected  java.lang.String invalidMessageKey
           
protected  java.util.List leftSelection
           
protected  Title leftTitle
           
protected  java.lang.String leftTitleText
           
static int PERCENT_UNITS
           
static int PIXEL_UNITS
           
protected  DynaButton removeAllButton
           
protected  DynaButton removeButton
           
protected  java.util.List rightSelection
           
protected  Title rightTitle
           
protected  java.lang.String rightTitleText
           
protected  java.lang.String selectedTitle
           
protected  java.lang.String unselectedTitle
           
 
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
AbstractDynaPickList()
           
AbstractDynaPickList(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints)
           
 
Method Summary
 void addAll()
           
 void addOne()
           
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 java.lang.String getAddAllLabel()
           Sets the label on the add all button.
 java.lang.String getAddLabel()
           Gets the label on the add button.
 int getButtonHeight()
           
 int getButtonWidth()
           
 java.lang.String getCssButtonClass()
           
 java.lang.String getCssButtonClassDisabled()
           
 Decorator getDecorator()
           Gets the decorator for PickLists.
 Font getFont()
          Returns the font.
 java.lang.String getInvalidMessage()
           Gets the message key that is added to the screen, when the component is marked as invalid.
 java.lang.String getInvalidMessageKey()
          Deprecated.  
 java.util.Comparator getLeftComparator()
           Gets the current comparator that specifies the sort order of the left table.
protected abstract  ListBoxInterface getLeftListBox()
           
 java.util.List getLeftSelection()
           Gets the collection of selected java beans in the left listbox.
 int getLeftWidth()
           
 int getLeftWidthUnits()
           
protected abstract  java.util.List getList()
           
 java.lang.String getRemoveAllLabel()
           Gets the label on the remove all button.
 java.lang.String getRemoveLabel()
           Gets the label on the remove button.
 java.util.Comparator getRightComparator()
           Gets the current comparator that specifies the sort order of the right table.
protected abstract  ListBoxInterface getRightListBox()
           
 java.util.List getRightSelection()
           Gets the collection of selected java beans in the right listbox.
 int getRightWidth()
           
 int getRightWidthUnits()
           
 java.lang.String getSelectedTitle()
           Gets the title string appearing above the right dynaTable.
 java.lang.String getUnselectedTitle()
           Gets the title string appearing above the left dynaTable.
 boolean isReadOnly()
           
 void preRender()
           Make changes to the visual representation of this component before Echo starts rendering the component.
 void removeAll()
          Removes all child Components.
 void removeOne()
           
 void setAddAllLabel(java.lang.String addAllLabel)
           Sets the label on the add all button.
 void setAddLabel(java.lang.String addLabel)
           Sets the label on the add button.
 void setButtonHeight(int i)
           
 void setButtonWidth(int buttonWidth)
           
 void setCssButtonClass(java.lang.String buttonCssClass)
           
 void setCssButtonClassDisabled(java.lang.String buttonCssClass)
           
 void setDecorator(Decorator decorator)
           Sets the decorator for PickLists.
 void setFocused(boolean focused)
           Sets the input focus on this component.
 void setFont(Font font)
          Sets the font of the component.
 void setInvalidMessage(java.lang.String invalidMessage)
           Sets the message key that is shown when the component is marked as invalid.
 void setInvalidMessageKey(java.lang.String s)
          Deprecated.  
 void setLeftComparator(java.util.Comparator comparator)
           Sets a comparator for specifying custom sort orders on the left table.
 void setLeftSelection(java.util.List leftSelection)
           Sets the collection of selected java beans in the left listbox.
 void setLeftWidth(int width)
           
 void setLeftWidthUnits(int widthUnits)
           
 void setReadOnly(boolean readOnly)
           Mark this component as read-only.
 void setRemoveAllLabel(java.lang.String removeAllLabel)
           Sets the label on the remove all button.
 void setRemoveLabel(java.lang.String removeLabel)
           Sets the label on the remove button.
 void setRightComparator(java.util.Comparator comparator)
           Sets a comparator for specifying custom sort orders on the right table.
 void setRightSelection(java.util.List rightSelection)
           Sets the collection of selected java beans in the right listbox.
 void setRightWidth(int width)
           
 void setRightWidthUnits(int widthUnits)
           
 void setSelectedTitle(java.lang.String selectedTitle)
           Sets the title string appearing above the right dynaTable.
 void setUnselectedTitle(java.lang.String unselectedTitle)
           Sets the title string appearing above the left dynaTable.
 
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isRequired, isValid, markInvalid, markValid, rebind, removeValidator, setActionCommand, setBean, setBeanClass, setNullObject, setProperty, setRequired, setValue, traceValue, validate
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getForeground, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, 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
 
Methods inherited from interface net.sf.jzeno.echo.Precreation
applyContext
 

Field Detail

allOptions

protected java.util.List allOptions

addButton

protected DynaButton addButton

removeButton

protected DynaButton removeButton

addAllButton

protected DynaButton addAllButton

removeAllButton

protected DynaButton removeAllButton

cssButtonClass

protected java.lang.String cssButtonClass

cssButtonClassDisabled

protected java.lang.String cssButtonClassDisabled

buttonGrid

protected DynaGrid buttonGrid

decorator

protected Decorator decorator

unselectedTitle

protected java.lang.String unselectedTitle

selectedTitle

protected java.lang.String selectedTitle

invalidMessageKey

protected java.lang.String invalidMessageKey

leftSelection

protected java.util.List leftSelection

rightSelection

protected java.util.List rightSelection

leftTitle

protected Title leftTitle

rightTitle

protected Title rightTitle

leftTitleText

protected java.lang.String leftTitleText

rightTitleText

protected java.lang.String rightTitleText

PIXEL_UNITS

public static final int PIXEL_UNITS
See Also:
Constant Field Values

PERCENT_UNITS

public static final int PERCENT_UNITS
See Also:
Constant Field Values
Constructor Detail

AbstractDynaPickList

public AbstractDynaPickList()

AbstractDynaPickList

public AbstractDynaPickList(java.lang.Class beanClass,
                            java.lang.String propertyName,
                            java.lang.String constructionHints)
Method Detail

addOne

public void addOne()

removeOne

public void removeOne()

addAll

public void addAll()

removeAll

public void removeAll()
Description copied from interface: Component
Removes all child Components.

Specified by:
removeAll in interface Component
Overrides:
removeAll in class AbstractComponent

setButtonWidth

public void setButtonWidth(int buttonWidth)

getButtonWidth

public int getButtonWidth()

setLeftWidthUnits

public void setLeftWidthUnits(int widthUnits)

getLeftWidthUnits

public int getLeftWidthUnits()

getLeftWidth

public int getLeftWidth()

setLeftWidth

public void setLeftWidth(int width)

setRightWidthUnits

public void setRightWidthUnits(int widthUnits)

getRightWidthUnits

public int getRightWidthUnits()

setRightWidth

public void setRightWidth(int width)

getRightWidth

public int getRightWidth()

setFocused

public void setFocused(boolean focused)

Sets the input focus on this component.

Specified by:
setFocused in interface Component
Overrides:
setFocused in class AbstractComponent
Parameters:
focused - True if the component is to be focused.

getLeftSelection

public java.util.List getLeftSelection()

Gets the collection of selected java beans in the left listbox.


setLeftSelection

public void setLeftSelection(java.util.List leftSelection)

Sets the collection of selected java beans in the left listbox.


getRightSelection

public java.util.List getRightSelection()

Gets the collection of selected java beans in the right listbox.


setRightSelection

public void setRightSelection(java.util.List rightSelection)

Sets the collection of selected java beans in the right listbox.


getInvalidMessage

public java.lang.String getInvalidMessage()

Gets the message key that is added to the screen, when the component is marked as invalid. Also see setInvalidMessage(String).


getInvalidMessageKey

public java.lang.String getInvalidMessageKey()
Deprecated. 


setInvalidMessage

public void setInvalidMessage(java.lang.String invalidMessage)

Sets the message key that is shown when the component is marked as invalid. Typically the component is marked invalid when you call EchoSupport.doValidationRecursively(Component) in your code. The value specified for this property is translated through the i18n support in jZeno (i18n.properties).


setInvalidMessageKey

public void setInvalidMessageKey(java.lang.String s)
Deprecated. 


setAddLabel

public void setAddLabel(java.lang.String addLabel)

Sets the label on the add button.


getAddLabel

public java.lang.String getAddLabel()

Gets the label on the add button.


setAddAllLabel

public void setAddAllLabel(java.lang.String addAllLabel)

Sets the label on the add all button.


getAddAllLabel

public java.lang.String getAddAllLabel()

Sets the label on the add all button.


setRemoveLabel

public void setRemoveLabel(java.lang.String removeLabel)

Sets the label on the remove button.


getRemoveLabel

public java.lang.String getRemoveLabel()

Gets the label on the remove button.


setRemoveAllLabel

public void setRemoveAllLabel(java.lang.String removeAllLabel)

Sets the label on the remove all button.


getRemoveAllLabel

public java.lang.String getRemoveAllLabel()

Gets the label on the remove all button.


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

isReadOnly

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

getSelectedTitle

public java.lang.String getSelectedTitle()

Gets the title string appearing above the right dynaTable.


setSelectedTitle

public void setSelectedTitle(java.lang.String selectedTitle)

Sets the title string appearing above the right dynaTable.


getUnselectedTitle

public java.lang.String getUnselectedTitle()

Gets the title string appearing above the left dynaTable.


setUnselectedTitle

public void setUnselectedTitle(java.lang.String unselectedTitle)

Sets the title string appearing above the left dynaTable.


setButtonHeight

public void setButtonHeight(int i)

getButtonHeight

public int getButtonHeight()

setFont

public void setFont(Font font)
Description copied from interface: Component
Sets the font of the component.

Specified by:
setFont in interface Component
Overrides:
setFont in class AbstractComponent
Parameters:
font - The new font of the component.

getFont

public Font getFont()
Description copied from interface: Component
Returns the font.

Specified by:
getFont in interface Component
Overrides:
getFont in class AbstractComponent
Returns:
The font of the component.

getDecorator

public Decorator getDecorator()

Gets the decorator for PickLists. This is applied on the bound list models of the constituent ListBoxes.

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

setDecorator

public void setDecorator(Decorator decorator)

Sets the decorator for PickLists. This is applied on the bound list models of the constituent ListBoxes.

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

setLeftComparator

public void setLeftComparator(java.util.Comparator comparator)

Sets a comparator for specifying custom sort orders on the left table.


getLeftComparator

public java.util.Comparator getLeftComparator()

Gets the current comparator that specifies the sort order of the left table.


setRightComparator

public void setRightComparator(java.util.Comparator comparator)

Sets a comparator for specifying custom sort orders on the right table.


getRightComparator

public java.util.Comparator getRightComparator()

Gets the current comparator that specifies the sort order of the right table.


getRightListBox

protected abstract ListBoxInterface getRightListBox()

getLeftListBox

protected abstract ListBoxInterface getLeftListBox()

getList

protected abstract java.util.List getList()

applyStyle

public void applyStyle(Style style)
Description copied from interface: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class AbstractComponent
Parameters:
style - The style object from which to retrieve properties for this Component.

preRender

public void preRender()
Description copied from interface: PropertyComponent

Make changes to the visual representation of this component before Echo starts rendering the component.

Do not modify any bound javabeans in this method, as the changes to these will not be reflected properly on the screen.

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

getCssButtonClass

public java.lang.String getCssButtonClass()

setCssButtonClass

public void setCssButtonClass(java.lang.String buttonCssClass)

getCssButtonClassDisabled

public java.lang.String getCssButtonClassDisabled()

setCssButtonClassDisabled

public void setCssButtonClassDisabled(java.lang.String buttonCssClass)