| 
 | |||||||||
| 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.DynaCompletionBox
public class DynaCompletionBox
Editor that edits a string and allows the user to use auto-completion from a pre-defined list of possible entries.
The method setList(List options) should be invoked with a list of objects that will be matched on their labelProperty to the entered text (case-insensitive). If no labelProperty is given the object's toString() method will be used to get a string representation of the given objects.
By default the component does not require an exact match in order to be valid. You can change that behaviour by setting the exactMatch property to true.
| Field Summary | |
|---|---|
| static int | CHARACTER_UNITS | 
| static int | LEFT | 
| static int | PERCENT_UNITS | 
| static int | PIXEL_UNITS | 
| static int | RIGHT | 
| static long | serialVersionUID | 
| Constructor Summary | |
|---|---|
| DynaCompletionBox()Creates an unbound component. | |
| DynaCompletionBox(java.lang.Class beanClass,
                  java.lang.String propertyName,
                  java.lang.String constructionHints)Creates a bound component. | |
| Method Summary | |
|---|---|
|  void | applyContext() | 
|  void | changed(java.util.Collection collection) | 
|  void | close() | 
|  Color | getBackground()Returns the background color of the component. | 
|  int | getBorderSize() | 
|  int | getDelay() | 
|  int | getExactLength() | 
|  Font | getFont()Returns the font. | 
|  Color | getForeground()Returns the foreground of the component. | 
|  java.lang.String | getInvalidMessage() | 
|  java.lang.String | getLabelProperty() | 
|  java.util.List | getList() | 
|  int | getListWidth() | 
|  int | getListWidthUnits() | 
|  int | getMaximumCompletionMatches() | 
|  int | getMaximumLength() | 
|  java.lang.String | getNullValue() | 
|  java.lang.String | getSelected() | 
|  java.lang.String | getText() | 
|  java.lang.String | getToolTipText() | 
|  int | getWidth() | 
|  int | getWidthUnits() | 
|  void | goToList() | 
|  boolean | isAutoTrim() | 
|  boolean | isConvertToLowerCase() | 
|  boolean | isConvertToUpperCase() | 
|  boolean | isFocused()Returns true if the component is focused. | 
|  boolean | isReadOnly() | 
|  boolean | isRequired()Query if the editor is required to be filled in. | 
|  void | lookup() | 
|  void | lookupExplicit() | 
|  void | select() | 
|  void | setAutoTrim(boolean autoTrim) | 
|  void | setBackground(Color background)Sets the background color of the component. | 
|  void | setBorderSize(int size) | 
|  void | setConvertToLowerCase(boolean convertToLowerCase) | 
|  void | setConvertToUpperCase(boolean convertToUpperCase) | 
|  void | setDelay(int delay) | 
|  void | setExactLength(int exactLength) | 
|  void | setFocused(boolean newValue)Sets whether the component is focused. | 
|  void | setFont(Font font)Sets the font of the component. | 
|  void | setForeground(Color foreground)Sets the foreground color of the component. | 
|  void | setHorizontalAlignment(int newValue) | 
|  void | setInvalidMessage(java.lang.String invalidMessageKey) | 
|  void | setLabelProperty(java.lang.String labelProperty) | 
|  void | setList(java.util.List options) | 
|  void | setListWidth(int width) | 
|  void | setListWidthUnits(int units) | 
|  void | setMaximumCompletionMatches(int maximumCompletionMatches) | 
|  void | setMaximumLength(int maxLength) | 
|  void | setNullValue(java.lang.String nullValue) | 
|  void | setReadOnly(boolean readOnly)Mark this component as read-only. | 
|  void | setRequired(boolean required)Determine if the editor is required to be filled in. | 
|  void | setSelected(java.lang.String selected) | 
|  void | setText(java.lang.String text) | 
|  void | setToolTipText(java.lang.String toolTipText) | 
|  void | setVisible(boolean newValue)Sets the component visible or invisible. | 
|  void | setWidth(int width) | 
|  void | setWidthUnits(int units) | 
| 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, isValid, markInvalid, markValid, preRender, rebind, removeValidator, setActionCommand, setBean, setBeanClass, setDecorator, 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
public static final int CHARACTER_UNITS
public static final int PIXEL_UNITS
public static final int PERCENT_UNITS
public static final int RIGHT
public static final int LEFT
| Constructor Detail | 
|---|
public DynaCompletionBox()
Creates an unbound component.
public DynaCompletionBox(java.lang.Class beanClass,
                         java.lang.String propertyName,
                         java.lang.String constructionHints)
 Creates a bound component. Bind it to a String property.
 
| Method Detail | 
|---|
public void lookup()
public void lookupExplicit()
public void goToList()
public void select()
public void close()
public void applyContext()
applyContext in interface Precreationpublic void setText(java.lang.String text)
public java.lang.String getText()
public void setList(java.util.List options)
public java.util.List getList()
public void changed(java.util.Collection collection)
changed in interface CollectionChangeListenerpublic Color getBackground()
Component
getBackground in interface ComponentgetBackground in class AbstractComponentpublic int getBorderSize()
public int getExactLength()
public Font getFont()
Component
getFont in interface ComponentgetFont in class AbstractComponentpublic Color getForeground()
Component
getForeground in interface ComponentgetForeground in class AbstractComponentpublic java.lang.String getInvalidMessage()
public int getMaximumLength()
public java.lang.String getNullValue()
public java.lang.String getToolTipText()
public int getWidth()
public int getWidthUnits()
public int getListWidth()
public int getListWidthUnits()
public boolean isAutoTrim()
public boolean isConvertToLowerCase()
public boolean isConvertToUpperCase()
public boolean isFocused()
Component
isFocused in interface ComponentisFocused in class AbstractComponentpublic boolean isReadOnly()
isReadOnly in interface PropertyComponentisReadOnly in class CustomComponentpublic boolean isRequired()
PropertyComponentQuery if the editor is required to be filled in.
isRequired in interface PropertyComponentisRequired in class CustomComponentpublic void setAutoTrim(boolean autoTrim)
public void setBackground(Color background)
Component
setBackground in interface ComponentsetBackground in class AbstractComponentbackground - The new background color of the component.public void setBorderSize(int size)
public void setConvertToLowerCase(boolean convertToLowerCase)
public void setConvertToUpperCase(boolean convertToUpperCase)
public void setExactLength(int exactLength)
public void setFocused(boolean newValue)
Component
setFocused in interface ComponentsetFocused in class AbstractComponentnewValue - True if the component is to be focused.public void setFont(Font font)
Component
setFont in interface ComponentsetFont in class AbstractComponentfont - The new font of the component.public void setForeground(Color foreground)
Component
setForeground in interface ComponentsetForeground in class AbstractComponentforeground - The new foreground color of the component.public void setHorizontalAlignment(int newValue)
public void setInvalidMessage(java.lang.String invalidMessageKey)
public void setMaximumLength(int maxLength)
public void setNullValue(java.lang.String nullValue)
public void setReadOnly(boolean readOnly)
PropertyComponentMark this component as read-only.
setReadOnly in interface PropertyComponentsetReadOnly in class CustomComponentpublic void setRequired(boolean required)
PropertyComponentDetermine if the editor is required to be filled in.
setRequired in interface PropertyComponentsetRequired in class CustomComponentpublic void setToolTipText(java.lang.String toolTipText)
public void setVisible(boolean newValue)
Component
setVisible in interface ComponentsetVisible in class AbstractComponentnewValue - The new visibility state of the component.public void setWidth(int width)
public void setWidthUnits(int units)
public void setListWidth(int width)
public void setListWidthUnits(int units)
public java.lang.String getLabelProperty()
public void setLabelProperty(java.lang.String labelProperty)
public int getMaximumCompletionMatches()
public void setMaximumCompletionMatches(int maximumCompletionMatches)
public java.lang.String getSelected()
public void setSelected(java.lang.String selected)
public void setDelay(int delay)
public int getDelay()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||