net.sf.jzeno.echo.databinding
Class DynaLargePickList

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

public class DynaLargePickList
extends AbstractDynaPickList
implements EventPropagator, CollectionChangeListener

A component for selecting one or multiple options from a list of many. It visualizes 2 tables, left with options not yet selected, and right with options that were selected. Items can be moved between both tables by using move buttons. This component is recommended when the number of options is large. Search-functionality is enabled by default but can disabled if you want.

A list of java beans that the user can select from can be set on this component using the setList(List) method.

You should bind this component to a property of type java.util.Collection. This collection will be filled with the selected java beans, from the list of possible java beans.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jzeno.echo.databinding.AbstractDynaPickList
AbstractDynaPickList.DefaultValidator
 
Field Summary
static long serialVersionUID
           
 
Fields inherited from class net.sf.jzeno.echo.databinding.AbstractDynaPickList
addAllButton, addButton, allOptions, buttonGrid, cssButtonClass, cssButtonClassDisabled, decorator, invalidMessageKey, leftSelection, leftTitle, leftTitleText, PERCENT_UNITS, PIXEL_UNITS, removeAllButton, removeButton, rightSelection, rightTitle, rightTitleText, selectedTitle, 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
DynaLargePickList()
           Creates an unbound component.
DynaLargePickList(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints, ConstructionList cl)
           Creates a databound component.
DynaLargePickList(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints, ConstructionList leftCl, ConstructionList rightCl)
           Creates a databound component.
 
Method Summary
 void applyContext()
           
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 void changed(java.util.Collection collection)
           
 java.lang.String getClearButtonText()
           
 int getClearButtonWidth()
           
 java.lang.String getFilterTitleExtension()
           
 Color getLeftBorderColor()
           Gets the color of the border (between cells) of the left table.
 Color getLeftEvenBackgroundColor()
           Gets the color that is used for the even rows in the left table.
protected  ListBoxInterface getLeftListBox()
           
 Color getLeftOddBackgroundColor()
           Gets the color that is used for the odd rows in the left table.
 Color getLeftRolloverBackground()
           
 int getLeftTablePreferredRowsPerPage()
           
 int getLeftTableRowsPerPage()
           
 java.util.List getList()
           
 Color getRightBorderColor()
           Gets the color of the border (between cells) of the right table.
 Color getRightEvenBackgroundColor()
           Gets the color that is used for the even rows in the right table.
protected  ListBoxInterface getRightListBox()
           
 Color getRightOddBackgroundColor()
           Gets the color that is used for the odd rows in the right table.
 Color getRightRolloverBackground()
           
 int getRightTablePreferredRowsPerPage()
           
 int getRightTableRowsPerPage()
           
 java.lang.String getSearchButtonText()
           
 int getSearchButtonWidth()
           
 boolean isFireOnSelection()
           
 boolean isLeftListSearchable()
           
 boolean isLeftRolloverEnabled()
           
 boolean isRightListSearchable()
           
 boolean isRightRolloverEnabled()
           
 boolean isSearchable()
          Deprecated. use isLeftListSearchable
 boolean isSelectionHandlesShown()
           
 void preRender()
           Make changes to the visual representation of this component before Echo starts rendering the component.
 void propagateEvent(ActionEvent event)
           
 void rebind()
           This operation causes the component to reset it's content to that of the domain model.
 void setClearButtonText(java.lang.String text)
           
 void setClearButtonWidth(int width)
           
 void setFilterTitleExtension(java.lang.String filterTitleExtension)
           
 void setFireOnSelection(boolean fireOnSelection)
           
 void setLeftBorderColor(Color color)
           Sets the color of the border (between cells) of the left table.
 void setLeftEvenBackgroundColor(Color leftEvenBackgroundColor)
           Sets the color that is used for the even rows in the left table.
 void setLeftListSearchable(boolean searchable)
           
 void setLeftOddBackgroundColor(Color leftOddBackgroundColor)
           Sets the color that is used for the odd rows in the left table.
 void setLeftRolloverBackground(Color c)
           
 void setLeftRolloverEnabled(boolean b)
           
 void setLeftTablePreferredRowsPerPage(int i)
           
 void setLeftTableRowsPerPage(int i)
           
 void setList(java.util.List allOptions)
           
 void setRightBorderColor(Color color)
           Sets the color of the border (between cells) of the right table.
 void setRightEvenBackgroundColor(Color rightEvenBackgroundColor)
           Sets the color that is used for the even rows in the right table.
 void setRightListSearchable(boolean searchable)
           
 void setRightOddBackgroundColor(Color rightOddBackgroundColor)
           Sets the color that is used for the odd rows in the right table.
 void setRightRolloverBackground(Color c)
           
 void setRightRolloverEnabled(boolean b)
           
 void setRightTablePreferredRowsPerPage(int i)
           
 void setRightTableRowsPerPage(int i)
           
 void setSearchable(boolean searchable)
          Deprecated. use setLeftListSearchable
 void setSearchButtonText(java.lang.String text)
           
 void setSearchButtonWidth(int width)
           
 void setSelectionHandlesShown(boolean b)
           
 void setUnselectedTitle(java.lang.String unselectedTitle)
           Sets the title string appearing above the left dynaTable.
 
Methods inherited from class net.sf.jzeno.echo.databinding.AbstractDynaPickList
addAll, addOne, getAddAllLabel, getAddLabel, getButtonHeight, getButtonWidth, getCssButtonClass, getCssButtonClassDisabled, getDecorator, getFont, getInvalidMessage, getInvalidMessageKey, getLeftComparator, getLeftSelection, getLeftWidth, getLeftWidthUnits, getRemoveAllLabel, getRemoveLabel, getRightComparator, getRightSelection, getRightWidth, getRightWidthUnits, getSelectedTitle, getUnselectedTitle, isReadOnly, removeAll, removeOne, setAddAllLabel, setAddLabel, setButtonHeight, setButtonWidth, setCssButtonClass, setCssButtonClassDisabled, setDecorator, setFocused, setFont, setInvalidMessage, setInvalidMessageKey, setLeftComparator, setLeftSelection, setLeftWidth, setLeftWidthUnits, setReadOnly, setRemoveAllLabel, setRemoveLabel, setRightComparator, setRightSelection, setRightWidth, setRightWidthUnits, setSelectedTitle
 
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, 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
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DynaLargePickList

public DynaLargePickList()

Creates an unbound component.


DynaLargePickList

public DynaLargePickList(java.lang.Class beanClass,
                         java.lang.String propertyName,
                         java.lang.String constructionHints,
                         ConstructionList cl)

Creates a databound component. Assigns the same construction list to both the left and the right table.


DynaLargePickList

public DynaLargePickList(java.lang.Class beanClass,
                         java.lang.String propertyName,
                         java.lang.String constructionHints,
                         ConstructionList leftCl,
                         ConstructionList rightCl)

Creates a databound component.

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

getList

public java.util.List getList()
Specified by:
getList in class AbstractDynaPickList

setList

public void setList(java.util.List allOptions)

propagateEvent

public void propagateEvent(ActionEvent event)
Specified by:
propagateEvent in interface EventPropagator

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 AbstractDynaPickList
Parameters:
style - The style object from which to retrieve properties for this Component.

setSelectionHandlesShown

public void setSelectionHandlesShown(boolean b)

isSelectionHandlesShown

public boolean isSelectionHandlesShown()

setLeftRolloverEnabled

public void setLeftRolloverEnabled(boolean b)

isLeftRolloverEnabled

public boolean isLeftRolloverEnabled()

setRightRolloverEnabled

public void setRightRolloverEnabled(boolean b)

isRightRolloverEnabled

public boolean isRightRolloverEnabled()

setLeftRolloverBackground

public void setLeftRolloverBackground(Color c)

getLeftRolloverBackground

public Color getLeftRolloverBackground()

setRightRolloverBackground

public void setRightRolloverBackground(Color c)

getRightRolloverBackground

public Color getRightRolloverBackground()

setLeftTableRowsPerPage

public void setLeftTableRowsPerPage(int i)

getLeftTableRowsPerPage

public int getLeftTableRowsPerPage()

setRightTableRowsPerPage

public void setRightTableRowsPerPage(int i)

getRightTableRowsPerPage

public int getRightTableRowsPerPage()

setLeftTablePreferredRowsPerPage

public void setLeftTablePreferredRowsPerPage(int i)

getLeftTablePreferredRowsPerPage

public int getLeftTablePreferredRowsPerPage()

setRightTablePreferredRowsPerPage

public void setRightTablePreferredRowsPerPage(int i)

getRightTablePreferredRowsPerPage

public int getRightTablePreferredRowsPerPage()

getLeftEvenBackgroundColor

public Color getLeftEvenBackgroundColor()

Gets the color that is used for the even rows in the left table.


setLeftEvenBackgroundColor

public void setLeftEvenBackgroundColor(Color leftEvenBackgroundColor)

Sets the color that is used for the even rows in the left table.


getLeftOddBackgroundColor

public Color getLeftOddBackgroundColor()

Gets the color that is used for the odd rows in the left table.


setLeftOddBackgroundColor

public void setLeftOddBackgroundColor(Color leftOddBackgroundColor)

Sets the color that is used for the odd rows in the left table.


setLeftBorderColor

public void setLeftBorderColor(Color color)

Sets the color of the border (between cells) of the left table.


getLeftBorderColor

public Color getLeftBorderColor()

Gets the color of the border (between cells) of the left table.


getRightEvenBackgroundColor

public Color getRightEvenBackgroundColor()

Gets the color that is used for the even rows in the right table.


setRightEvenBackgroundColor

public void setRightEvenBackgroundColor(Color rightEvenBackgroundColor)

Sets the color that is used for the even rows in the right table.


getRightOddBackgroundColor

public Color getRightOddBackgroundColor()

Gets the color that is used for the odd rows in the right table.


setRightOddBackgroundColor

public void setRightOddBackgroundColor(Color rightOddBackgroundColor)

Sets the color that is used for the odd rows in the right table.


setRightBorderColor

public void setRightBorderColor(Color color)

Sets the color of the border (between cells) of the right table.


getRightBorderColor

public Color getRightBorderColor()

Gets the color of the border (between cells) of the right table.


setSearchable

public void setSearchable(boolean searchable)
Deprecated. use setLeftListSearchable

Parameters:
searchable -

isSearchable

public boolean isSearchable()
Deprecated. use isLeftListSearchable


setLeftListSearchable

public void setLeftListSearchable(boolean searchable)
Parameters:
searchable -

isLeftListSearchable

public boolean isLeftListSearchable()

setRightListSearchable

public void setRightListSearchable(boolean searchable)
Parameters:
searchable -

isRightListSearchable

public boolean isRightListSearchable()

setSearchButtonWidth

public void setSearchButtonWidth(int width)

getSearchButtonWidth

public int getSearchButtonWidth()

setSearchButtonText

public void setSearchButtonText(java.lang.String text)

getSearchButtonText

public java.lang.String getSearchButtonText()

setClearButtonWidth

public void setClearButtonWidth(int width)

getClearButtonWidth

public int getClearButtonWidth()

setClearButtonText

public void setClearButtonText(java.lang.String text)

getClearButtonText

public java.lang.String getClearButtonText()

isFireOnSelection

public boolean isFireOnSelection()

setFireOnSelection

public void setFireOnSelection(boolean fireOnSelection)

getLeftListBox

protected ListBoxInterface getLeftListBox()
Specified by:
getLeftListBox in class AbstractDynaPickList

getRightListBox

protected ListBoxInterface getRightListBox()
Specified by:
getRightListBox in class AbstractDynaPickList

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 AbstractDynaPickList

getFilterTitleExtension

public java.lang.String getFilterTitleExtension()

setFilterTitleExtension

public void setFilterTitleExtension(java.lang.String filterTitleExtension)

setUnselectedTitle

public void setUnselectedTitle(java.lang.String unselectedTitle)
Description copied from class: AbstractDynaPickList

Sets the title string appearing above the left dynaTable.

Overrides:
setUnselectedTitle in class AbstractDynaPickList

applyContext

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

changed

public void changed(java.util.Collection collection)
Specified by:
changed in interface CollectionChangeListener