|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
net.sf.jzeno.echo.components.CustomComponent
net.sf.jzeno.echo.databinding.AbstractDynaPickList
net.sf.jzeno.echo.databinding.DynaPickList
public final class DynaPickList
A component for selecting one or multiple options from a list of many. It visualizes 2 lists, left with options not yet selected, and right with options that were selected. Items can be moved between both lists by using move buttons.
A list of java beans that the user can select from can be set on this
component using the
method.
setList(List)
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.
The label used to visualize the java beans on the screen can be configured
with the
method.
setLabelProperty(String)
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 |
Constructor Summary | |
---|---|
DynaPickList()
Creates an unbound component. |
|
DynaPickList(java.lang.Class beanClass,
java.lang.String propertyName,
java.lang.String constructionHints)
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 |
getEmptySelectionLabel()
Gets the label that is shown when no item is selected (in the right-hand listbox on the screen). |
java.lang.String |
getLabelProperty()
Gets the property that is shown on the screen to select. |
protected ListBoxInterface |
getLeftListBox()
|
java.util.List |
getList()
Gets the list of java beans that the user can select from. |
Color |
getListBackground()
Gets the background color for the listboxes. |
java.lang.String |
getListCssClass()
|
Color |
getListForeground()
Gets the foreground (text) color for the listboxes. |
int |
getListVisibleRowCount()
Gets the number of items shown in the listboxes. |
protected ListBoxInterface |
getRightListBox()
|
void |
rebind()
This operation causes the component to reset it's content to that of the domain model. |
void |
setEmptySelectionLabel(java.lang.String emptySelectionLabel)
Sets the label that is shown when no item is selected (in the right-hand listbox on the screen). |
void |
setLabelProperty(java.lang.String labelProperty)
Sets the property that is shown on the screen to select. |
void |
setList(java.util.List allOptions)
Sets the list of java beans that the user can select from. |
void |
setListBackground(Color backGroundForBothLists)
Sets the background color for the listboxes. |
void |
setListCssClass(java.lang.String newValue)
|
void |
setListForeground(Color foreground)
Sets the foreground (text) color for the listboxes. |
void |
setListVisibleRowCount(int numberOfRowsToShow)
Sets the number of items shown in the listboxes. |
void |
setReadOnly(boolean readOnly)
Mark this component as read-only. |
void |
setRequired(boolean required)
Determine if the editor is required to be filled in. |
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, setValue, traceValue, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public DynaPickList()
Creates an unbound component.
public DynaPickList(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints)
Creates a databound component.
Method Detail |
---|
public void rebind()
RebindableComponent
This operation causes the component to reset it's content to that of the domain model.
rebind
in interface RebindableComponent
rebind
in class CustomComponent
public java.util.List getList()
Gets the list of java beans that the user can select from.
getList
in class AbstractDynaPickList
public void setList(java.util.List allOptions)
Sets the list of java beans that the user can select from.
public java.lang.String getLabelProperty()
Gets the property that is shown on the screen to select. Also see
.
setLabelProperty(String)
public void setLabelProperty(java.lang.String labelProperty)
Sets the property that is shown on the screen to select. This property
(path) is specified relative to the individual java beans, specified in
the list (
.
setList(List)
)
public java.lang.String getEmptySelectionLabel()
Gets the label that is shown when no item is selected (in the right-hand listbox on the screen).
public void setEmptySelectionLabel(java.lang.String emptySelectionLabel)
Sets the label that is shown when no item is selected (in the right-hand listbox on the screen).
public void setReadOnly(boolean readOnly)
PropertyComponent
Mark this component as read-only.
setReadOnly
in interface PropertyComponent
setReadOnly
in class AbstractDynaPickList
public java.lang.String getListCssClass()
public void setListCssClass(java.lang.String newValue)
public void setListBackground(Color backGroundForBothLists)
Sets the background color for the listboxes.
public Color getListBackground()
Gets the background color for the listboxes.
public void setListForeground(Color foreground)
Sets the foreground (text) color for the listboxes.
public Color getListForeground()
Gets the foreground (text) color for the listboxes.
public void setListVisibleRowCount(int numberOfRowsToShow)
Sets the number of items shown in the listboxes. If more items are available scrollbars appear.
public int getListVisibleRowCount()
Gets the number of items shown in the listboxes.
public void applyStyle(Style style)
Component
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.
applyStyle
in interface Component
applyStyle
in class AbstractDynaPickList
style
- The style object from which to retrieve properties for this
Component
.public void setRequired(boolean required)
PropertyComponent
Determine if the editor is required to be filled in.
setRequired
in interface PropertyComponent
setRequired
in class CustomComponent
protected ListBoxInterface getLeftListBox()
getLeftListBox
in class AbstractDynaPickList
protected ListBoxInterface getRightListBox()
getRightListBox
in class AbstractDynaPickList
public void applyContext()
applyContext
in interface Precreation
public void changed(java.util.Collection collection)
changed
in interface CollectionChangeListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |