|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.TextComponent
common abstract base class for TextArea and TextField
| Constructor Summary | |
TextComponent()
|
|
| Method Summary | |
void |
addTextListener(TextListener tl)
Sets the textListener for this TextComponent. |
void |
dispatchEvent(AWTEvent event)
Performs the action associated with the given KeyEvent |
int |
getCaretPosition()
Returns the current caret position |
java.lang.String |
getSelectedText()
returns the selected substring of the text content. |
int |
getSelectionEnd()
returns the end position of the current selection. |
int |
getSelectionStart()
returns the start position of the current selection. |
java.lang.String |
getText()
Returns the String content of this text component |
boolean |
isEditable()
Returns true if the Textfield is editable, false otherwise. |
boolean |
isFocusTraversable()
Returns if the textfield can be reached by focus traversal. |
void |
removeTextListener(TextListener tl)
Removes the given TextListener from this TextArea. |
void |
select(int start,
int end)
Selects the text at the given positon |
void |
selectAll()
Selects the whole text content. |
void |
setCaretPosition(int cp)
Sets the current cursor position |
void |
setEditable(boolean ed)
Sets the text content to editable or not editable. |
void |
setSelectionEnd(int i)
Sets the end position of the current selection. |
void |
setSelectionStart(int i)
Sets the start position of the current selection. |
void |
setText(java.lang.String newText)
Sets the text content to the given String |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextComponent()
| Method Detail |
public void addTextListener(TextListener tl)
public int getCaretPosition()
public void dispatchEvent(AWTEvent event)
dispatchEvent in class Componentpublic java.lang.String getSelectedText()
public int getSelectionStart()
public int getSelectionEnd()
public java.lang.String getText()
public boolean isEditable()
public boolean isFocusTraversable()
isFocusTraversable in class Componentpublic void removeTextListener(TextListener tl)
public void select(int start,
int end)
public void selectAll()
public void setEditable(boolean ed)
public void setCaretPosition(int cp)
public void setSelectionStart(int i)
public void setSelectionEnd(int i)
public void setText(java.lang.String newText)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||