|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.AbstractComponent
nextapp.echo.text.TextComponent
nextapp.echo.TextField
public class TextField
A single line text-entry field.
Field Summary | |
---|---|
static java.lang.String |
ACTION_COMMAND_CHANGED_PROPERTY
|
static java.lang.String |
COLUMN_UNITS_CHANGED_PROPERTY
|
static java.lang.String |
COLUMNS_CHANGED_PROPERTY
|
static java.lang.String |
KEY_ACTION_COMMAND_CHANGED_PROPERTY
|
static java.lang.String |
MAXIMUM_LENGTH_CHANGED_PROPERTY
|
static java.lang.String |
RETURN_KEY_ACTION_COMMAND_CHANGED_PROPERTY
|
static java.lang.String |
STYLE_MAXIMUM_LENGTH
A style constant for the Maximum Length property. |
Fields inherited from interface nextapp.echo.ToolTipSupport |
---|
TOOL_TIP_TEXT_CHANGED_PROPERTY |
Constructor Summary | |
---|---|
TextField()
Creates a new text field. |
|
TextField(Document document)
Creates a new text field with the given document model, text and number of columns. |
|
TextField(Document document,
java.lang.String text,
int columns)
Creates a new text field with the given document model, text and number of columns. |
|
TextField(int columns)
Creates a new text field with the given number of columns. |
|
TextField(java.lang.String text)
Creates a new text field with the given text. |
|
TextField(java.lang.String text,
int columns)
Creates a new text field with the given text and number of columns. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener to the text field. |
void |
addKeyActionListener(ActionListener l)
Adds an ActionListener to the text field. |
void |
addReturnActionListener(ActionListener l)
Adds an ActionListener to the text field. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
void |
fireActionEvent()
Fires an action event to all listeners. |
void |
fireKeyActionEvent()
Deprecated. |
void |
fireReturnActionEvent()
Deprecated. |
java.lang.String |
getActionCommand()
Returns the action command for this textField. |
int |
getColumns()
Returns the columns of the text field. |
int |
getColumnUnits()
Returns the units of the columns property. |
java.lang.String |
getKeyActionCommand()
Deprecated. Returns the action command for this textField. |
int |
getMaximumLength()
Returns the maximum number of characters that may be entered into the text field. |
java.lang.String |
getReturnActionCommand()
Deprecated. |
boolean |
hasActionListeners()
Returns true if the text field has one or more action listeners. |
boolean |
hasKeyActionListeners()
Returns true if the text field has one or more action listeners. |
boolean |
hasReturnActionListeners()
Returns true if the text field has one or more action listeners. |
boolean |
isAsync()
|
boolean |
isConvertToLowerCase()
|
boolean |
isConvertToUpperCase()
|
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the text field. |
void |
removeKeyActionListener(ActionListener l)
Removes an ActionListener from the text field. |
void |
removeReturnActionListener(ActionListener l)
Removes an ActionListener from the text field. |
void |
setActionCommand(java.lang.String newValue)
Sets the text field's action command. |
void |
setAsync(boolean async)
|
void |
setColumns(int newValue)
Sets the columns of the text field. |
void |
setColumnUnits(int newValue)
Sets the units for the columns property. |
void |
setConvertToLowerCase(boolean convertToLowerCase)
|
void |
setConvertToUpperCase(boolean convertToUpperCase)
|
void |
setKeyActionCommand(java.lang.String newValue)
Deprecated. |
void |
setMaximumLength(int newValue)
Sets the maximum number of characters that may be entered into the text field. |
void |
setReturnActionCommand(java.lang.String newValue)
Deprecated. |
Methods inherited from class nextapp.echo.text.TextComponent |
---|
getBorderColor, getBorderSize, getBorderStyle, getCssClass, getDocument, getHorizontalAlignment, getText, getToolTipText, isEditable, setBorderColor, setBorderSize, setBorderStyle, setCssClass, setDocument, setEditable, setHorizontalAlignment, setText, setToolTipText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STYLE_MAXIMUM_LENGTH
public static final java.lang.String ACTION_COMMAND_CHANGED_PROPERTY
public static final java.lang.String KEY_ACTION_COMMAND_CHANGED_PROPERTY
public static final java.lang.String RETURN_KEY_ACTION_COMMAND_CHANGED_PROPERTY
public static final java.lang.String COLUMNS_CHANGED_PROPERTY
public static final java.lang.String COLUMN_UNITS_CHANGED_PROPERTY
public static final java.lang.String MAXIMUM_LENGTH_CHANGED_PROPERTY
Constructor Detail |
---|
public TextField()
public TextField(java.lang.String text)
text
- The initial text in the text field.public TextField(int columns)
columns
- The number of columns that will be displayed in the text
field.public TextField(java.lang.String text, int columns)
text
- The initial text in the text field.columns
- The number of columns that will be displayed in the text
field.public TextField(Document document)
document
- The model for this text field.public TextField(Document document, java.lang.String text, int columns)
document
- The model for this text field.text
- The initial text in the text field.columns
- The number of columns that will be displayed in the text
field.Method Detail |
---|
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 TextComponent
style
- The style object from which to retrieve properties for this
Component
.Component.applyStyle(Style)
public void fireActionEvent()
public void fireKeyActionEvent()
public void fireReturnActionEvent()
public java.lang.String getKeyActionCommand()
public java.lang.String getActionCommand()
public int getColumns()
public int getColumnUnits()
TextArea.UNITS_CHARACTER
(the default)TextArea.UNITS_PIXEL
TextArea.UNITS_PERCENT
public int getMaximumLength()
public void addActionListener(ActionListener l)
ActionListener
to the text field.
l
- The ActionListener
to be added.public boolean hasActionListeners()
public void removeActionListener(ActionListener l)
ActionListener
from the text field.
l
- The ActionListener
to be removed.public void addKeyActionListener(ActionListener l)
ActionListener
to the text field.
l
- The ActionListener
to be added.public boolean hasKeyActionListeners()
public void removeKeyActionListener(ActionListener l)
ActionListener
from the text field.
l
- The ActionListener
to be removed.public void addReturnActionListener(ActionListener l)
ActionListener
to the text field.
l
- The ActionListener
to be added.public boolean hasReturnActionListeners()
public void removeReturnActionListener(ActionListener l)
ActionListener
from the text field.
l
- The ActionListener
to be removed.public void setActionCommand(java.lang.String newValue)
newValue
- The new action command for this text field.public void setKeyActionCommand(java.lang.String newValue)
newValue
- The new action command for this text field.public void setReturnActionCommand(java.lang.String newValue)
newValue
- The new action command for this text field.public void setColumns(int newValue)
newValue
- The number of columns that will be displayed in the
text field.public void setColumnUnits(int newValue)
newValue
- The new units for the columns property, one of the
following values:
TextArea.UNITS_CHARACTER
(the default)TextArea.UNITS_PIXEL
TextArea.UNITS_PERCENT
public void setMaximumLength(int newValue)
newValue
- The maximum length.public boolean isConvertToLowerCase()
public void setConvertToLowerCase(boolean convertToLowerCase)
public boolean isConvertToUpperCase()
public void setConvertToUpperCase(boolean convertToUpperCase)
public boolean isAsync()
public void setAsync(boolean async)
public java.lang.String getReturnActionCommand()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |