TextComponent.
The peer interfaces are intended only for use in porting
the AWT. They are not intended for use by application
developers, and developers should not implement peers
nor invoke any of the peer methods directly on the peer
instances.
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public InputMethodRequests | |
| public int | Returns: the end index of the current selectionReturns the end index of the current selection. |
| public int | Returns: the start index of the current selectionReturns the start index of the current selection. |
| public String | Returns: the current content of the text componentReturns the current content of the text component. |
| public void | select(int
the start index of the new selection selStart, int the end index of the new selection selEnd)Selects an area of the text component. |
| public void | |
| public void | setEditable(boolean
true for editable text components,
false for non-editable text componentsSets if the text component should be editable or not. |
| public void |
| getCaretPosition | back to summary |
|---|---|
| public int getCaretPosition() Returns the current caret position.
| |
| getInputMethodRequests | back to summary |
|---|---|
| public InputMethodRequests getInputMethodRequests() Returns the input method requests.
| |
| getSelectionEnd | back to summary |
|---|---|
| public int getSelectionEnd() Returns the end index of the current selection.
| |
| getSelectionStart | back to summary |
|---|---|
| public int getSelectionStart() Returns the start index of the current selection.
| |
| getText | back to summary |
|---|---|
| public String getText() Returns the current content of the text component.
| |
| select | back to summary |
|---|---|
| public void select(int selStart, int selEnd) Selects an area of the text component.
| |
| setCaretPosition | back to summary |
|---|---|
| public void setCaretPosition(int pos) Sets the caret position of the text component.
| |
| setEditable | back to summary |
|---|---|
| public void setEditable(boolean editable) Sets if the text component should be editable or not.
| |
| setText | back to summary |
|---|---|
| public void setText(String text) Sets the content for the text component.
| |