|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Component
pivot.wtk.TextInput
public class TextInput
A component that allows a user to enter a single line of unformatted text.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class pivot.wtk.Component |
---|
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
TextInput()
|
Method Summary | |
---|---|
void |
copy()
|
void |
cut()
|
void |
delete(Direction direction)
|
int |
getMaximumLength()
Returns the maximum length of the text input's text content. |
String |
getPrompt()
Returns the text input's prompt. |
String |
getSelectedText()
Returns the currently selected text. |
int |
getSelectionLength()
Returns the length of the selection. |
Span |
getSelectionRange()
Returns a span representing the current selection. |
int |
getSelectionStart()
Returns the starting index of the selection. |
String |
getText()
|
ListenerList<TextInputCharacterListener> |
getTextInputCharacterListeners()
Returns the text input character listener list. |
ListenerList<TextInputListener> |
getTextInputListeners()
Returns the text input listener list. |
ListenerList<TextInputSelectionListener> |
getTextInputSelectionListeners()
Returns the text input selection listener list. |
ListenerList<TextInputTextListener> |
getTextInputTextListeners()
Returns the text input text listener list. |
String |
getTextKey()
Returns the text input's text key. |
TextNode |
getTextNode()
|
int |
getTextSize()
Returns the text size. |
Validator |
getValidator()
Gets the validator associated with this text input. |
void |
insertText(char character,
int index)
Inserts a single character into the text input's content. |
void |
insertText(String text,
int index)
Inserts text into the text input's content. |
boolean |
isPassword()
Returns the password flag. |
boolean |
isTextValid()
Tells whether or not this text input's text is currently valid as defined by its validator. |
void |
load(Dictionary<String,?> context)
Copies bound values from the bind context to the component. |
void |
paste()
|
void |
redo()
|
void |
setMaximumLength(int maximumLength)
Sets the maximum length of the text input's text content. |
void |
setPassword(boolean password)
Sets or clears the password flag. |
void |
setPrompt(String prompt)
Sets the text input's prompt. |
void |
setSelection(int selectionStart,
int selectionLength)
Sets the selection. |
void |
setText(String text)
|
void |
setTextKey(String textKey)
Sets the text input's text key. |
void |
setTextNode(TextNode textNode)
|
void |
setTextSize(int textSize)
Sets the text size. |
void |
setValidator(Validator validator)
Sets the validator associated with this text input. |
void |
store(Dictionary<String,?> context)
Copies bound values from the component to the bind context. |
void |
undo()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextInput()
Method Detail |
---|
public TextNode getTextNode()
public void setTextNode(TextNode textNode)
public String getText()
public void setText(String text)
public void insertText(char character, int index)
character
- The character to insert.index
- The index of the insertion point within the existing text. If equal to
the current character count, the new text is appended to the existing
content.public void insertText(String text, int index)
text
- The text to insert.index
- The index of the insertion point within the existing text. If equal to
the current character count, the new text is appended to the existing
content.public void delete(Direction direction)
public void cut()
public void copy()
public void paste()
public void undo()
public void redo()
public int getSelectionStart()
public int getSelectionLength()
public void setSelection(int selectionStart, int selectionLength)
selectionStart
- The starting index of the selection.selectionLength
- The length of the selection.public Span getSelectionRange()
public String getSelectedText()
public int getTextSize()
public void setTextSize(int textSize)
textSize
- The number of characters to display in the text input.public int getMaximumLength()
public void setMaximumLength(int maximumLength)
maximumLength
- The maximum length of the text input's text content.public boolean isPassword()
public void setPassword(boolean password)
password
- true if this is a password text input; false,
otherwise.public String getPrompt()
public void setPrompt(String prompt)
prompt
- The prompt text, or null for no prompt.public String getTextKey()
public void setTextKey(String textKey)
textKey
- The text key, or null to clear the binding.public void load(Dictionary<String,?> context)
Component
load
in class Component
public void store(Dictionary<String,?> context)
Component
store
in class Component
public boolean isTextValid()
public Validator getValidator()
public void setValidator(Validator validator)
validator
- The validator to use, or null to use no validator.public ListenerList<TextInputListener> getTextInputListeners()
public ListenerList<TextInputTextListener> getTextInputTextListeners()
public ListenerList<TextInputCharacterListener> getTextInputCharacterListeners()
public ListenerList<TextInputSelectionListener> getTextInputSelectionListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |