|
|||||||||
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.DynaLargeListBox
public class DynaLargeListBox
Allows the user to select one or more items from a list of possible items.
This list is shown in a table. The items being displayed are a list of java
beans (setList(List)
).
When the user has selected one or more java beans from the possible options, the java beans from the original list that were selected will be written to the data binding target of this component.
You can configure this component to allow only a single selection, or to
allow multiple selections (setMultiSelect(boolean)
- by default
false ).
If you allow only one item to be selected, you should bind this component to a property of the type corresponding to the type of the java beans in the list of all possible items.
If on the other hand you do allow multiple selection, than this component should be bound to a property of type java.util.Collection .
Nested Class Summary | |
---|---|
class |
DynaLargeListBox.DefaultValidator
|
Field Summary | |
---|---|
static int |
PERCENT_UNITS
|
static int |
PIXEL_UNITS
|
Constructor Summary | |
---|---|
DynaLargeListBox()
Creates an unbound component. |
|
DynaLargeListBox(java.lang.Class beanClass,
java.lang.String propertyName,
java.lang.String constructionHints,
ConstructionList cl)
Creates a databound component. |
Method Summary | |
---|---|
void |
applyContext()
|
void |
changed(java.util.Collection collection)
|
void |
clear()
|
void |
clearSelection()
Clears any selection on the component. |
Color |
getBorderColor()
Gets the color of the border (between cells). |
java.lang.String |
getClearButtonText()
|
int |
getClearButtonWidth()
|
java.util.Comparator |
getComparator()
|
Decorator |
getDecorator()
Implementation of RebindableComponent |
Color |
getEvenBackgroundColor()
Gets the color that is used for the even rows in the table. |
ImageReference |
getFilteredIcon()
|
Font |
getFont()
Returns the font. |
int |
getHeightUnits()
|
java.lang.String |
getInvalidMessage()
Gets the message key that is added to the screen, when the component is marked as invalid. |
java.lang.String[] |
getLabelNames()
|
java.util.List |
getList()
Gets the list of java beans the user can select from. |
Color |
getOddBackgroundColor()
Gets the color that is used for the odd rows in the table. |
int |
getPreferredRowsPerPage()
|
Color |
getRolloverBackground()
|
int |
getRowHeight(int row)
|
int |
getRowsPerPage()
|
java.lang.String |
getSearchButtonText()
|
int |
getSearchButtonWidth()
|
java.lang.String |
getSearchString()
|
Color |
getSelectionBackground()
|
ImageReference |
getUnfilteredIcon()
|
int |
getWidth()
|
int |
getWidthUnits()
|
boolean |
isFiltered()
|
boolean |
isFilterIconVisible()
Deprecated. Just setSearchable(true/false) |
boolean |
isHeaderVisible()
Gets whether or not this table has a header at the top. |
boolean |
isMultiSelect()
Gets whether or not the listbox allows multiple items to be selected. |
boolean |
isPagerVisible()
Gets whether or not the paging control is shown on the screen. |
boolean |
isReadOnly()
|
boolean |
isRolloverEnabled()
|
boolean |
isRowClickSelection()
|
boolean |
isSearchable()
Gets whether or not this table has a header at the top. |
boolean |
isSelectionHandlesShown()
|
boolean |
isSorterVisible()
|
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 |
search()
|
void |
setActionCommand(java.lang.String command)
Sets the dynamic event handler that will be triggered when a selection is made in the table. |
void |
setBorderColor(Color color)
Sets the color of the border (between cells). |
void |
setClearButtonText(java.lang.String s)
|
void |
setClearButtonWidth(int i)
|
void |
setComparator(java.util.Comparator comparator)
|
void |
setDecorator(Decorator decorator)
Sets the decorator. |
void |
setEvenBackgroundColor(Color evenBackgroundColor)
Sets the color that is used for the even rows in the table. |
void |
setFilteredIcon(ImageReference filteredIcon)
|
void |
setFilterIconVisible(boolean filterIconVisible)
Deprecated. Just use setSearchable(true/false) |
void |
setFocused(boolean focused)
Sets the input focus to this component. |
void |
setFont(Font font)
Sets the font of the component. |
void |
setHeaderVisible(boolean headerVisible)
Sets whether or not this table has a header at the top. |
void |
setHeightUnits(int heightUnits)
|
void |
setInvalidMessage(java.lang.String invalidMessageKey)
Sets the message key that is shown when the component is marked as invalid. |
void |
setList(java.util.List list)
Sets the list of java beans the user can select from. |
void |
setMultiSelect(boolean allowMultiSelect)
Sets whether or not the listbox allows multiple items to be selected. |
void |
setOddBackgroundColor(Color oddBackgroundColor)
Sets the color that is used for the odd rows in the table. |
void |
setPreferredRowsPerPage(int rows)
|
void |
setReadOnly(boolean readOnly)
Mark this component as read-only. |
void |
setRolloverBackground(Color color)
|
void |
setRolloverEnabled(boolean enabled)
Sets whether or not moving your mouse over the rows in the table highlights that row. |
void |
setRowClickSelection(boolean rowClickSelects)
Sets whether or not clicking in a row will select it. |
void |
setRowHeight(int row,
int height)
|
void |
setRowsPerPage(int rows)
|
void |
setSearchable(boolean searchable)
Sets whether or not this table has a header at the top. |
void |
setSearchButtonText(java.lang.String s)
|
void |
setSearchButtonWidth(int i)
|
void |
setSearchString(java.lang.String searchString)
|
void |
setSelectionBackground(Color color)
|
void |
setSelectionHandlesShown(boolean b)
|
void |
setSorterIconName(java.lang.String sorterIconName)
Sets the name of the icon to show on the multi-sort button. |
void |
setSorterVisible(boolean b)
|
void |
setUnfilteredIcon(ImageReference unfilteredIcon)
|
void |
setWidth(int width)
|
void |
setWidthUnits(int widthUnits)
|
void |
sort(int column,
boolean ascending)
Sorts the table ascending/descending on the specified column. |
void |
valueChanged(ListSelectionEvent e)
Invoked when the a lists selection state changes. |
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, setBean, setBeanClass, setNullObject, setProperty, setRequired, setValue, traceValue, validate |
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.databinding.PropertyComponent |
---|
addValidator, getBean, getBeanClass, getProperty, getValidationErrors, getValidators, getValue, isMarkedInvalid, isRequired, isValid, markInvalid, markValid, removeValidator, setBean, setBeanClass, setProperty, setRequired, setValue |
Field Detail |
---|
public static final int PIXEL_UNITS
public static final int PERCENT_UNITS
Constructor Detail |
---|
public DynaLargeListBox()
Creates an unbound component.
public DynaLargeListBox(java.lang.Class beanClass, java.lang.String propertyName, java.lang.String constructionHints, ConstructionList cl)
Creates a databound component.
Method Detail |
---|
public java.util.List getList()
Gets the list of java beans the user can select from.
getList
in interface ListBoxInterface
public void setList(java.util.List list)
Sets the list of java beans the user can select from.
setList
in interface ListBoxInterface
public void search()
public void clear()
public Decorator getDecorator()
CustomComponent
getDecorator
in interface ListBoxInterface
getDecorator
in interface PropertyComponent
getDecorator
in class CustomComponent
public void setDecorator(Decorator decorator)
PropertyComponent
Sets the decorator.
setDecorator
in interface ListBoxInterface
setDecorator
in interface PropertyComponent
setDecorator
in class CustomComponent
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)
.
getInvalidMessage
in interface ListBoxInterface
public void setInvalidMessage(java.lang.String invalidMessageKey)
Sets the message key that is shown when the component is marked as
invalid. Typically the component is marked invalid when you call
in
your code. The value specified for this property is translated through
the i18n support in jZeno (EchoSupport.doValidationRecursively(Component)
i18n.properties
).
setInvalidMessage
in interface ListBoxInterface
public boolean isReadOnly()
isReadOnly
in interface PropertyComponent
isReadOnly
in class CustomComponent
public void setReadOnly(boolean readOnly)
PropertyComponent
Mark this component as read-only.
setReadOnly
in interface PropertyComponent
setReadOnly
in class CustomComponent
public boolean isMultiSelect()
Gets whether or not the listbox allows multiple items to be selected.
isMultiSelect
in interface ListBoxInterface
public void setMultiSelect(boolean allowMultiSelect)
Sets whether or not the listbox allows multiple items to be selected.
setMultiSelect
in interface ListBoxInterface
public void clearSelection()
Clears any selection on the component.
clearSelection
in interface ListBoxInterface
public void setActionCommand(java.lang.String command)
Sets the dynamic event handler that will be triggered when a
selection is made in the table. If you don't want a roundtrip when a
selection is made, set this property to null
(this is also
the default).
setActionCommand
in interface EventSource
setActionCommand
in class CustomComponent
public void setFocused(boolean focused)
Sets the input focus to this component.
setFocused
in interface ListBoxInterface
setFocused
in interface Component
setFocused
in class AbstractComponent
focused
- True if the component is to be focused.public void setComparator(java.util.Comparator comparator)
setComparator
in interface ListBoxInterface
public java.util.Comparator getComparator()
getComparator
in interface ListBoxInterface
public void setWidth(int width)
setWidth
in interface ListBoxInterface
public int getWidth()
getWidth
in interface ListBoxInterface
public void setWidthUnits(int widthUnits)
setWidthUnits
in interface ListBoxInterface
public int getWidthUnits()
getWidthUnits
in interface ListBoxInterface
public java.lang.String getSearchString()
public void setSearchString(java.lang.String searchString)
public void setFont(Font font)
Component
setFont
in interface ListBoxInterface
setFont
in interface Component
setFont
in class AbstractComponent
font
- The new font of the component.public Font getFont()
Component
getFont
in interface ListBoxInterface
getFont
in interface Component
getFont
in class AbstractComponent
public void valueChanged(ListSelectionEvent e)
ListSelectionListener
valueChanged
in interface ListSelectionListener
e
- An event describing the change.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 void setRowsPerPage(int rows)
public int getRowsPerPage()
public void setPreferredRowsPerPage(int rows)
public int getPreferredRowsPerPage()
public boolean isPagerVisible()
Gets whether or not the paging control is shown on the screen.
public void setSorterVisible(boolean b)
public boolean isSorterVisible()
public Color getEvenBackgroundColor()
Gets the color that is used for the even rows in the table.
public void setEvenBackgroundColor(Color evenBackgroundColor)
Sets the color that is used for the even rows in the table.
public Color getOddBackgroundColor()
Gets the color that is used for the odd rows in the table.
public void setOddBackgroundColor(Color oddBackgroundColor)
Sets the color that is used for the odd rows in the table.
public void sort(int column, boolean ascending)
Sorts the table ascending/descending on the specified column.
public void setBorderColor(Color color)
Sets the color of the border (between cells).
public Color getBorderColor()
Gets the color of the border (between cells).
public boolean isHeaderVisible()
Gets whether or not this table has a header at the top.
public void setHeaderVisible(boolean headerVisible)
Sets whether or not this table has a header at the top.
public boolean isSearchable()
Gets whether or not this table has a header at the top.
public void setSearchable(boolean searchable)
Sets whether or not this table has a header at the top.
public void setRowClickSelection(boolean rowClickSelects)
Sets whether or not clicking in a row will select it.
public boolean isRowClickSelection()
public void setSorterIconName(java.lang.String sorterIconName)
Sets the name of the icon to show on the multi-sort button. Specify the name of the png/gif/jpg/.. you want to use. Specify the name of the gif/jpg/png/... image you want to show. Images should be located in the images folder, in the root of your web application.
public int getHeightUnits()
public void setHeightUnits(int heightUnits)
public int getRowHeight(int row)
public void setRowHeight(int row, int height)
public java.lang.String[] getLabelNames()
public void setRolloverBackground(Color color)
public Color getRolloverBackground()
public void setSelectionBackground(Color color)
public Color getSelectionBackground()
public void setRolloverEnabled(boolean enabled)
Sets whether or not moving your mouse over the rows in the table highlights that row.
public boolean isRolloverEnabled()
public void setSelectionHandlesShown(boolean b)
public boolean isSelectionHandlesShown()
public void setSearchButtonWidth(int i)
public int getSearchButtonWidth()
public void setSearchButtonText(java.lang.String s)
public java.lang.String getSearchButtonText()
public void setClearButtonWidth(int i)
public int getClearButtonWidth()
public void setClearButtonText(java.lang.String s)
public java.lang.String getClearButtonText()
public void propagateEvent(ActionEvent event)
propagateEvent
in interface EventPropagator
public ImageReference getFilteredIcon()
public void setFilteredIcon(ImageReference filteredIcon)
public boolean isFilterIconVisible()
public void setFilterIconVisible(boolean filterIconVisible)
public ImageReference getUnfilteredIcon()
public void setUnfilteredIcon(ImageReference unfilteredIcon)
public void preRender()
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.
preRender
in interface PropertyComponent
preRender
in class CustomComponent
public boolean isFiltered()
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 |