|
|||||||||
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.DynaQuickSelectField
public class DynaQuickSelectField
Entry field that allows a user to select an object from a list of possibilities by entering a code corresponding to the object to select in an input field , or select the code from a list of possibilities in a dialog .
This component allways selects a single java bean from a list of possible beans. You should bind this component to a property that is the same type as the java beans in the list of possibilities.
Nested Class Summary | |
---|---|
class |
DynaQuickSelectField.DefaultValidator
|
Field Summary | |
---|---|
static int |
CHARACTER_UNITS
|
static int |
PERCENT_UNITS
|
static int |
PIXEL_UNITS
|
Constructor Summary | |
---|---|
DynaQuickSelectField()
Creates an unbound component. |
|
DynaQuickSelectField(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
Creates a bound component. |
Method Summary | |
---|---|
void |
applyContext()
|
void |
changed(java.util.Collection collection)
|
void |
close(ActionEvent event)
Closes the dialog with all possible java beans. |
Color |
getBackground()
Returns the background color of the component. |
java.util.Comparator |
getComparator()
|
Decorator |
getDecorator()
Gets the instance that is used to
determine the label values that the user must enter in the input field. |
Decorator |
getDialogDecorator()
Gets the decorator implementation that is used in the listbox on the dialog part of this component. |
java.lang.String |
getDialogLabelProperty()
Gets the label property that is used in the dialog. |
java.lang.String |
getDialogTitle()
Gets the title of the dialog. |
int |
getDialogWidth()
|
Font |
getFont()
Returns the font. |
Color |
getForeground()
Returns the foreground of the component. |
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.lang.String |
getLabelProperty()
Gets the property of the java beans, in the list of possibilities, of which the value must be entered by the user in the input field. |
java.util.List |
getList()
Gets the list of possible java beans the user can select from. |
int |
getMaximumLength()
Gets the maximum number of characters the user can enter in the input field. |
java.lang.String |
getNullLabel()
Gets the label, corresponding to the data binding target value null . |
java.lang.Object |
getSelectedObject()
Gets the java bean that is currently selected from the list of possible beans. |
java.lang.String |
getText()
Gets the currently entered value by the user. |
java.lang.String |
getToolTipText()
|
int |
getWidth()
Gets the width of the text field. |
int |
getWidthUnits()
Gets the units in which width is specified. |
boolean |
isConvertToLowerCase()
|
boolean |
isConvertToUpperCase()
|
boolean |
isReadOnly()
|
boolean |
isRequired()
Query if the editor is required to be filled in. |
void |
open()
Opens the dialog to allow the user to select from a list of possible java beans. |
void |
rebind()
This operation causes the component to reset it's content to that of the domain model. |
void |
setActionCommand(java.lang.String command)
|
void |
setBackground(Color background)
Sets the background color of the component. |
void |
setColumns(int columns)
Deprecated. |
void |
setComparator(java.util.Comparator comparator)
|
void |
setConvertToLowerCase(boolean convertToLowerCase)
|
void |
setConvertToUpperCase(boolean convertToUpperCase)
|
void |
setDecorator(Decorator decorator)
Sets the instance that is used to
determine the label values that the user must enter in the input field. |
void |
setDialogDecorator(Decorator decorator)
Sets a decorator implementation that is used in the listbox on the dialog part of this component. |
void |
setDialogLabelProperty(java.lang.String labelProperty)
Sets the label property that is used in the dialog. |
void |
setDialogTitle(java.lang.String title)
Sets the title of the dialog. |
void |
setDialogWidth(int i)
|
void |
setFocused(boolean newValue)
Sets whether or not this component has input focus. |
void |
setFont(Font font)
Sets the font of the component. |
void |
setForeground(Color foreground)
Sets the foreground color of the component. |
void |
setInvalidMessage(java.lang.String errorMessage)
Sets the message key that is shown when the component is marked as invalid. |
void |
setInvalidMessageKey(java.lang.String errorMessage)
Deprecated. |
void |
setLabelProperty(java.lang.String labelProperty)
Sets the property of the java beans, in the list of possibilities, of which the value must be entered by the user in the input field. |
void |
setList(java.util.List data)
Sets the list of possible java beans the user can select from. |
void |
setMaximumLength(int maxLength)
Sets the maximum number of characters the user can enter in the input field. |
void |
setNullLabel(java.lang.String nullLabel)
Sets the label, corresponding to the data binding target value null . |
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 |
setSelectedObject(java.lang.Object selectedObject)
Sets the java bean that is currently selected. |
void |
setText(java.lang.String text)
Sets the value in the input field. |
void |
setToolTipText(java.lang.String toolTipText)
|
void |
setWidth(int width)
Sets the width of the text field. |
void |
setWidthUnits(int units)
Sets the units in which width is specified. |
void |
valueChange(ActionEvent event)
|
Methods inherited from class net.sf.jzeno.echo.components.CustomComponent |
---|
addValidator, fireActionEvent, fireActionEvent, fireActionEvent, getActionCommand, getBean, getBeanClass, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isValid, markInvalid, markValid, preRender, removeValidator, 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 int CHARACTER_UNITS
public static final int PIXEL_UNITS
public static final int PERCENT_UNITS
Constructor Detail |
---|
public DynaQuickSelectField()
Creates an unbound component.
public DynaQuickSelectField(java.lang.Class beanClass, java.lang.String property, java.lang.String constructionHints)
Creates a bound component. Bind this componen to a property of type
java.util.collection
.
Method Detail |
---|
public void open()
Opens the dialog to allow the user to select from a list of possible java beans.
public void valueChange(ActionEvent event)
public void close(ActionEvent event)
Closes the dialog with all possible java beans.
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 setList(java.util.List data)
Sets the list of possible java beans the user can select from.
public java.util.List getList()
Gets the list of possible java beans the user can select from.
public int getMaximumLength()
Gets the maximum number of characters the user can enter in the input field.
public void setMaximumLength(int maxLength)
Sets the maximum number of characters the user can enter in the input field.
public void setColumns(int columns)
Sets the width of the input field. Specified in characters on screen.
public void setWidth(int width)
Sets the width of the text field.
public int getWidth()
Gets the width of the text field.
public void setWidthUnits(int units)
Sets the units in which width is specified.
public int getWidthUnits()
Gets the units in which width is specified.
public boolean isRequired()
PropertyComponent
Query if the editor is required to be filled in.
isRequired
in interface PropertyComponent
isRequired
in class CustomComponent
public void setRequired(boolean required)
PropertyComponent
Determine if the editor is required to be filled in.
setRequired
in interface PropertyComponent
setRequired
in class CustomComponent
public java.lang.String getText()
Gets the currently entered value by the user.
public void setText(java.lang.String text)
Sets the value in the input field.
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)
.
public java.lang.String getInvalidMessageKey()
public void setInvalidMessage(java.lang.String errorMessage)
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
).
public void setInvalidMessageKey(java.lang.String errorMessage)
public void setNullLabel(java.lang.String nullLabel)
Sets the label, corresponding to the data binding target value
null
. If the user selects this label (which will appear
at the top of the list), the value null
will be written to
the data binding target. If the data binding target is null
this label will be selected on the screen. If you don't want a selection
corresponding to null
, set this property to
null
(this is also the default).
public java.lang.String getNullLabel()
Gets the label, corresponding to the data binding target value
null
. Also see setNullLabel(String)
.
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 void setFocused(boolean newValue)
Sets whether or not this component has input focus.
setFocused
in interface Component
setFocused
in class AbstractComponent
newValue
- True if the component is to be focused.public java.lang.Object getSelectedObject()
Gets the java bean that is currently selected from the list of possible beans.
public void setSelectedObject(java.lang.Object selectedObject)
Sets the java bean that is currently selected.
public void setDialogDecorator(Decorator decorator)
Sets a decorator implementation that is used in the listbox on the dialog part of this component. This allows you to provide a more complex label in the dialog.
public Decorator getDialogDecorator()
Gets the decorator implementation that is used in the listbox on the dialog part of this component.
public void setDialogLabelProperty(java.lang.String labelProperty)
Sets the label property that is used in the dialog. This allows you to have a different label property used to determine user input in the input field, than in the dialog.
public java.lang.String getDialogLabelProperty()
Gets the label property that is used in the dialog.
public void setDialogTitle(java.lang.String title)
Sets the title of the dialog.
public java.lang.String getDialogTitle()
Gets the title of the dialog.
public Decorator getDecorator()
Gets the
instance that is used to
determine the label values that the user must enter in the input field.
Decorator
getDecorator
in interface PropertyComponent
getDecorator
in class CustomComponent
public void setDecorator(Decorator decorator)
Sets the
instance that is used to
determine the label values that the user must enter in the input field.
Decorator
setDecorator
in interface PropertyComponent
setDecorator
in class CustomComponent
public java.lang.String getLabelProperty()
Gets the property of the java beans, in the list of possibilities, of which the value must be entered by the user in the input field.
public void setLabelProperty(java.lang.String labelProperty)
Sets the property of the java beans, in the list of possibilities, of which the value must be entered by the user in the input field.
public void setComparator(java.util.Comparator comparator)
public java.util.Comparator getComparator()
public void setBackground(Color background)
Component
setBackground
in interface Component
setBackground
in class AbstractComponent
background
- The new background color of the component.public Color getBackground()
Component
getBackground
in interface Component
getBackground
in class AbstractComponent
public void setForeground(Color foreground)
Component
setForeground
in interface Component
setForeground
in class AbstractComponent
foreground
- The new foreground color of the component.public Color getForeground()
Component
getForeground
in interface Component
getForeground
in class AbstractComponent
public void setDialogWidth(int i)
public int getDialogWidth()
public void applyContext()
applyContext
in interface Precreation
public java.lang.String getToolTipText()
public void setToolTipText(java.lang.String toolTipText)
public void setFont(Font font)
Component
setFont
in interface Component
setFont
in class AbstractComponent
font
- The new font of the component.public Font getFont()
Component
getFont
in interface Component
getFont
in class AbstractComponent
public void changed(java.util.Collection collection)
changed
in interface CollectionChangeListener
public boolean isConvertToLowerCase()
public boolean isConvertToUpperCase()
public void setConvertToLowerCase(boolean convertToLowerCase)
public void setConvertToUpperCase(boolean convertToUpperCase)
public void setActionCommand(java.lang.String command)
setActionCommand
in interface EventSource
setActionCommand
in class CustomComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |