|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo2.app.Component nextapp.echo2.app.text.TextComponent
public abstract class TextComponent
Abstract base class for text-entry components.
Field Summary | |
---|---|
static java.lang.String |
ACTION_LISTENERS_CHANGED_PROPERTY
|
static java.lang.String |
DOCUMENT_CHANGED_PROPERTY
|
static java.lang.String |
INPUT_ACTION
|
static java.lang.String |
PROPERTY_ACTION_COMMAND
|
static java.lang.String |
PROPERTY_ALIGNMENT
|
static java.lang.String |
PROPERTY_BACKGROUND_IMAGE
|
static java.lang.String |
PROPERTY_BORDER
|
static java.lang.String |
PROPERTY_DISABLED_BACKGROUND
|
static java.lang.String |
PROPERTY_DISABLED_BACKGROUND_IMAGE
|
static java.lang.String |
PROPERTY_DISABLED_BORDER
|
static java.lang.String |
PROPERTY_DISABLED_FONT
|
static java.lang.String |
PROPERTY_DISABLED_FOREGROUND
|
static java.lang.String |
PROPERTY_HEIGHT
|
static java.lang.String |
PROPERTY_HORIZONTAL_SCROLL
|
static java.lang.String |
PROPERTY_INSETS
|
static java.lang.String |
PROPERTY_MAXIMUM_LENGTH
|
static java.lang.String |
PROPERTY_TOOL_TIP_TEXT
|
static java.lang.String |
PROPERTY_VERTICAL_SCROLL
|
static java.lang.String |
PROPERTY_WIDTH
|
static java.lang.String |
TEXT_CHANGED_PROPERTY
|
Constructor Summary | |
---|---|
TextComponent(Document document)
Creates a new TextComponent with the specified
Document as its model. |
Method Summary | |
---|---|
void |
addActionListener(ActionListener l)
Adds an ActionListener to the TextField . |
java.lang.String |
getActionCommand()
Returns the action command which will be provided in ActionEvent s fired by this TextField . |
Alignment |
getAlignment()
Returns the alignment of the text component. |
FillImage |
getBackgroundImage()
Returns the default background image of the text component. |
Border |
getBorder()
Returns the border of the text component. |
Color |
getDisabledBackground()
Returns the background color displayed when the text component is disabled. |
FillImage |
getDisabledBackgroundImage()
Returns the background image displayed when the text component is disabled. |
Border |
getDisabledBorder()
Returns the border displayed when the text component is disabled. |
Font |
getDisabledFont()
Returns the font displayed when the text component is disabled. |
Color |
getDisabledForeground()
Returns the foreground color displayed when the text component is disabled. |
Document |
getDocument()
Returns the model associated with this TextComponent . |
Extent |
getHeight()
Returns the height of the text component. |
Extent |
getHorizontalScroll()
Returns the horizontal scroll bar position. |
Insets |
getInsets()
Returns the insets of the text component. |
int |
getMaximumLength()
Returns the maximum length (in characters) of the text which may be entered into the component. |
java.lang.String |
getText()
Returns the text contained in the Document model of
this text component. |
java.lang.String |
getToolTipText()
Returns the tool tip text (displayed when the mouse cursor is hovered over the component). |
Extent |
getVerticalScroll()
Returns the vertical scroll bar position. |
Extent |
getWidth()
Returns the width of the text component. |
boolean |
hasActionListeners()
Determines the any ActionListener s are registered. |
boolean |
isValidChild(Component component)
This component does not support children. |
void |
processInput(java.lang.String inputName,
java.lang.Object inputValue)
Processes client input specific to the Component
received from the UpdateManager . |
void |
removeActionListener(ActionListener l)
Removes an ActionListener from the TextField . |
void |
setActionCommand(java.lang.String newValue)
Sets the action command which will be provided in ActionEvent s fired by this TextField . |
void |
setAlignment(Alignment newValue)
Sets the alignment of the text component. |
void |
setBackgroundImage(FillImage newValue)
Sets the default background image of the text component. |
void |
setBorder(Border newValue)
Sets the border of the text component. |
void |
setDisabledBackground(Color newValue)
Sets the background color displayed when the component is disabled. |
void |
setDisabledBackgroundImage(FillImage newValue)
Sets the background image displayed when the component is disabled. |
void |
setDisabledBorder(Border newValue)
Sets the border displayed when the component is disabled. |
void |
setDisabledFont(Font newValue)
Sets the font displayed when the component is disabled. |
void |
setDisabledForeground(Color newValue)
Sets the foreground color displayed when the component is disabled. |
void |
setDocument(Document newValue)
Sets the model associated with this TextComponent . |
void |
setHeight(Extent newValue)
Sets the height of the text component. |
void |
setHorizontalScroll(Extent newValue)
Sets the horizontal scroll bar position. |
void |
setInsets(Insets newValue)
Sets the insets of the text component. |
void |
setMaximumLength(int newValue)
Sets the maximum length (in characters) of the text which may be entered into the component. |
void |
setText(java.lang.String newValue)
Sets the text of document model of this text component. |
void |
setToolTipText(java.lang.String newValue)
Sets the tool tip text (displayed when the mouse cursor is hovered over the component). |
void |
setVerticalScroll(Extent newValue)
Sets the vertical scroll bar position. |
void |
setWidth(Extent newValue)
Sets the width of the text component. |
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 INPUT_ACTION
public static final java.lang.String PROPERTY_ACTION_COMMAND
public static final java.lang.String PROPERTY_ALIGNMENT
public static final java.lang.String PROPERTY_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_BORDER
public static final java.lang.String PROPERTY_DISABLED_BACKGROUND
public static final java.lang.String PROPERTY_DISABLED_BACKGROUND_IMAGE
public static final java.lang.String PROPERTY_DISABLED_BORDER
public static final java.lang.String PROPERTY_DISABLED_FONT
public static final java.lang.String PROPERTY_DISABLED_FOREGROUND
public static final java.lang.String PROPERTY_HEIGHT
public static final java.lang.String PROPERTY_HORIZONTAL_SCROLL
public static final java.lang.String PROPERTY_INSETS
public static final java.lang.String PROPERTY_MAXIMUM_LENGTH
public static final java.lang.String PROPERTY_TOOL_TIP_TEXT
public static final java.lang.String PROPERTY_VERTICAL_SCROLL
public static final java.lang.String PROPERTY_WIDTH
public static final java.lang.String ACTION_LISTENERS_CHANGED_PROPERTY
public static final java.lang.String DOCUMENT_CHANGED_PROPERTY
public static final java.lang.String TEXT_CHANGED_PROPERTY
Constructor Detail |
---|
public TextComponent(Document document)
TextComponent
with the specified
Document
as its model.
document
- the desired modelMethod Detail |
---|
public void addActionListener(ActionListener l)
ActionListener
to the TextField
.
The ActionListener
will be invoked when the user
presses the ENTER key in the field.
l
- the ActionListener
to addpublic java.lang.String getActionCommand()
ActionEvent
s fired by this TextField
.
public Alignment getAlignment()
public FillImage getBackgroundImage()
public Border getBorder()
public Color getDisabledBackground()
public FillImage getDisabledBackgroundImage()
public Border getDisabledBorder()
public Font getDisabledFont()
public Color getDisabledForeground()
public Document getDocument()
TextComponent
.
public Extent getHeight()
Extent
s with
fixed (i.e., not percent) units.
public Extent getHorizontalScroll()
public Insets getInsets()
public int getMaximumLength()
public java.lang.String getText()
Document
model of
this text component.
public java.lang.String getToolTipText()
public Extent getVerticalScroll()
public Extent getWidth()
Extent
s with
either fixed or percentage-based units.
public boolean hasActionListeners()
ActionListener
s are registered.
public boolean isValidChild(Component component)
isValidChild
in class Component
component
- the Component
to evaluate as a child
Component
is a valid childComponent.isValidChild(nextapp.echo2.app.Component)
public void processInput(java.lang.String inputName, java.lang.Object inputValue)
Component
Component
received from the UpdateManager
.
Derivative implementations should take care to invoke
super.processInput()
.
processInput
in class Component
inputName
- the name of the inputinputValue
- the value of the inputComponent.processInput(java.lang.String, java.lang.Object)
public void removeActionListener(ActionListener l)
ActionListener
from the TextField
.
l
- the ActionListener
to removepublic void setActionCommand(java.lang.String newValue)
ActionEvent
s fired by this TextField
.
newValue
- the new action commandpublic void setAlignment(Alignment newValue)
newValue
- the new alignmentpublic void setBackgroundImage(FillImage newValue)
newValue
- the new background imagepublic void setBorder(Border newValue)
newValue
- the new borderpublic void setDisabledBackground(Color newValue)
newValue
- the new Color
public void setDisabledBackgroundImage(FillImage newValue)
newValue
- the new background imagepublic void setDisabledBorder(Border newValue)
newValue
- the new borderpublic void setDisabledFont(Font newValue)
newValue
- the new Font
public void setDisabledForeground(Color newValue)
newValue
- the new Color
public void setDocument(Document newValue)
TextComponent
.
newValue
- the new model (may not be null)public void setHeight(Extent newValue)
Extent
s with
fixed (i.e., not percent) units.
newValue
- the new heightpublic void setHorizontalScroll(Extent newValue)
Extent
value must be in pixel units.
newValue
- the new scroll bar positionpublic void setInsets(Insets newValue)
newValue
- the new insetspublic void setMaximumLength(int newValue)
newValue
- the new maximum length, or -1 if to specify an
unlimited lengthpublic void setText(java.lang.String newValue)
newValue
- the new textpublic void setToolTipText(java.lang.String newValue)
newValue
- the new tool tip textpublic void setVerticalScroll(Extent newValue)
Extent
value must be in pixel units.
newValue
- the new scroll bar positionpublic void setWidth(Extent newValue)
Extent
s with
either fixed or percentage-based units.
newValue
- the new width
|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |