|
|||||||||
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.editor.StringEditor
public final class StringEditor
Default editor for Strings in the domain editor.
Field Summary | |
---|---|
static int |
CHARACTER_UNITS
|
static int |
PERCENT_UNITS
|
static int |
PIXEL_UNITS
|
Constructor Summary | |
---|---|
StringEditor()
|
|
StringEditor(java.lang.Class beanClass,
java.lang.String prop,
java.lang.String constructionHints)
|
Method Summary | |
---|---|
void |
applyContext()
|
Color |
getBackground()
Gets the background color. |
int |
getColumns()
|
int |
getExactLength()
Gets the exact length the user input should be. |
Color |
getForeground()
Gets the foreground (text) color. |
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. |
int |
getMaximumLength()
Gets the maximum number of characters the user may enter. |
java.lang.String |
getNullValue()
Gets the input value that corresponds to a data binding property value null . |
java.lang.String |
getText()
Sets the current value inside the input box. |
java.lang.String |
getToolTipText()
Gets the tooltip that is shown when the user hoovers over this component. |
int |
getWidth()
Gets the width of the text field. |
int |
getWidthUnits()
Gets the units in which width is specified. |
boolean |
isAutoTrim()
Gets whether or not this component trims the input from the user. |
boolean |
isConvertToLowerCase()
|
boolean |
isConvertToUpperCase()
|
boolean |
isReadOnly()
|
boolean |
isRequired()
Query if the editor is required to be filled in. |
void |
setAutoTrim(boolean autoTrim)
Sets whether or not this component trims the input from the user. |
void |
setBackground(Color background)
Sets the background color. |
void |
setColumns(int columns)
Deprecated. |
void |
setConvertToLowerCase(boolean convertToLowerCase)
|
void |
setConvertToUpperCase(boolean convertToUpperCase)
|
void |
setExactLength(int exactLength)
Sets the exact length the user input should be. |
void |
setFocused(boolean newValue)
Sets the input focus to this component. |
void |
setForeground(Color foreground)
Sets the foreground (text) color. |
void |
setInvalidMessage(java.lang.String invalidMessage)
Sets the message key that is shown when the component is marked as invalid. |
void |
setInvalidMessageKey(java.lang.String invalidMessageKey)
Deprecated. |
void |
setMaximumLength(int maxLength)
Sets the maximum number of characters the user may enter. |
void |
setNullValue(java.lang.String nullValue)
Sets the input value that corresponds to a data binding property 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 |
setText(java.lang.String text)
Sets the text in the component. |
void |
setToolTipText(java.lang.String toolTipText)
Sets the tooltip that is shown when the user hoovers over this component. |
void |
setWidth(int width)
Sets the width of the text field. |
void |
setWidthUnits(int units)
Sets the units in which width is specified. |
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 int PIXEL_UNITS
public static final int CHARACTER_UNITS
public static final int PERCENT_UNITS
Constructor Detail |
---|
public StringEditor()
public StringEditor(java.lang.Class beanClass, java.lang.String prop, java.lang.String constructionHints)
Method Detail |
---|
public java.lang.String getNullValue()
Gets the input value that corresponds to a data binding property value
null
.
public void setNullValue(java.lang.String nullValue)
Sets the input value that corresponds to a data binding property value
null
public java.lang.String getToolTipText()
Gets the tooltip that is shown when the user hoovers over this component.
public void setToolTipText(java.lang.String toolTipText)
Sets the tooltip that is shown when the user hoovers over this component.
public java.lang.String getInvalidMessageKey()
public void setInvalidMessageKey(java.lang.String invalidMessageKey)
public java.lang.String getInvalidMessage()
Gets the message key that is added to the screen, when the component is
marked as invalid. Also see setInvalidMessageKey(String)
.
public void setInvalidMessage(java.lang.String invalidMessage)
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 int getExactLength()
Gets the exact length the user input should be.
public void setExactLength(int exactLength)
Sets the exact length the user input should be.
public boolean isAutoTrim()
Gets whether or not this component trims the input from the user. This means that any leading and/or trailing spaces are removed from the input.
public void setAutoTrim(boolean autoTrim)
Sets whether or not this component trims the input from the user. This means that any leading and/or trailing spaces are removed from the input.
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 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 void setColumns(int columns)
Sets the width of the input field. Specified in characters on screen.
public int getColumns()
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 void setMaximumLength(int maxLength)
Sets the maximum number of characters the user may enter.
public int getMaximumLength()
Gets the maximum number of characters the user may enter.
public Color getBackground()
Gets the background color.
getBackground
in interface Component
getBackground
in class AbstractComponent
public void setBackground(Color background)
Sets the background color.
setBackground
in interface Component
setBackground
in class AbstractComponent
background
- The new background color of the component.public Color getForeground()
Gets the foreground (text) color.
getForeground
in interface Component
getForeground
in class AbstractComponent
public void setForeground(Color foreground)
Sets the foreground (text) color.
setForeground
in interface Component
setForeground
in class AbstractComponent
foreground
- The new foreground color of the component.public java.lang.String getText()
Sets the current value inside the input box. Handy if you are using this component unbound.
public void setText(java.lang.String text)
Sets the text in the component.
public void setFocused(boolean newValue)
Sets the input focus to this component.
setFocused
in interface Component
setFocused
in class AbstractComponent
newValue
- True if the component is to be focused.public boolean isConvertToLowerCase()
public void setConvertToLowerCase(boolean convertToLowerCase)
public boolean isConvertToUpperCase()
public void setConvertToUpperCase(boolean convertToUpperCase)
public void applyContext()
applyContext
in interface Precreation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |