javax.swing.text
public class JTextComponent.AccessibleJTextComponent extends AccessibleJComponent implements AccessibleText, CaretListener, DocumentListener, AccessibleAction, AccessibleEditableText
Constructor Summary | |
---|---|
AccessibleJTextComponent()
Construct an AccessibleJTextComponent. |
Method Summary | |
---|---|
void | caretUpdate(CaretEvent e)
Handle a change in the caret position and fire any applicable
property change events.
|
void | changedUpdate(DocumentEvent e)
Handle a text change event and fire an
AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
event.
|
void | cut(int start, int end)
Cuts the text between two indexes. |
void | delete(int start, int end)
Deletes the text between two indexes.
|
boolean | doAccessibleAction(int i)
Performs the i-th action. |
int | getAccessibleActionCount()
Returns the number of actions for this object. |
String | getAccessibleActionDescription(int i)
Returns the description of the i-th action. |
AccessibleEditableText | getAccessibleEditableText()
Retrieve an AccessibleEditableText object that controls this
text component.
|
AccessibleRole | getAccessibleRole()
Retrieve the accessible role of this component.
|
AccessibleStateSet | getAccessibleStateSet()
Retreive the accessible state set of this component.
|
AccessibleText | getAccessibleText()
Retrieve an AccessibleText object that controls this text
component.
|
String | getAfterIndex(int part, int index)
Gets the text located after index. null is returned if the index
or part is invalid.
|
String | getAtIndex(int part, int index)
Gets the text located at index. null is returned if the index
or part is invalid.
|
String | getBeforeIndex(int part, int index)
Gets the text located before index. null is returned if the index
or part is invalid.
|
int | getCaretPosition()
Retrieve the current caret position. |
AttributeSet | getCharacterAttribute(int index)
Gets the character attributes of the character at index. |
Rectangle | getCharacterBounds(int index)
Calculate the bounding box of the character at the given index.
|
int | getCharCount()
Return the length of the text in this text component.
|
int | getIndexAtPoint(Point p)
Get the index of the character at the given point, in component
pixel co-ordinates. |
String | getSelectedText()
Retrieve the current text selection. |
int | getSelectionEnd()
Retrieve the index of the last character in the current text
selection. |
int | getSelectionStart()
Retrieve the index of the first character in the current text
selection. |
String | getTextRange(int start, int end)
Gets the text between two indexes.
|
void | insertTextAtIndex(int index, String s)
Inserts the text at the given index.
|
void | insertUpdate(DocumentEvent e)
Handle a text insertion event and fire an
AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
event.
|
void | paste(int start)
Pastes the text from the system clipboard to the given index.
|
void | removeUpdate(DocumentEvent e)
Handle a text removal event and fire an
AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
event.
|
void | replaceText(int start, int end, String s)
Replaces the text between two indexes with the given text.
|
void | selectText(int start, int end)
Selects the text between two indexes.
|
void | setAttributes(int start, int end, AttributeSet s)
Sets the attributes of all the text between two indexes.
|
void | setTextContents(String s)
Sets the text contents.
|
Parameters: e - the caret update event
Parameters: e - text change event
Parameters: start - the starting index (inclusive) end - the ending index (exclusive)
Parameters: start - the starting index (inclusive) end - the ending index (exclusive)
Parameters: i - the action to perform
Returns: true if the action was performed successfully
Returns: the number of actions (0-based).
Parameters: i - the action to get the description for
Returns: description of the i-th action
Returns: this
Returns: the accessible role of this component
See Also: AccessibleRole
Returns: the accessible state set of this component
Returns: this
See Also: AccessibleText
Parameters: part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE} index - index after the part
Returns: the part of text after that index, or null
Parameters: part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE} index - index of the part
Returns: the part of text at that index, or null
Parameters: part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE} index - index before the part
Returns: the part of text before that index, or null
Returns: caret position
Parameters: index - index of the character
Returns: the character's attributes
Parameters: index - the character index
Returns: a character's bounding box, or null
Returns: a character length
Parameters: p - a point in component pixel co-ordinates
Returns: a character index, or -1
Returns: the currently selected text or null
Returns: the index of the last character in the selection, the current caret position or 0
Returns: the index of the first character in the selection, the current caret position or 0
Parameters: start - the starting index (inclusive) end - the ending index (exclusive)
Parameters: index - the index to insert the new text at. s - the new text
Parameters: e - the insertion event
Parameters: start - the starting index
Parameters: e - the removal event
Parameters: start - the starting index (inclusive) end - the ending index (exclusive) s - the text to paste
Parameters: start - the starting index (inclusive) end - the ending index (exclusive)
Parameters: start - the starting index (inclusive) end - the ending index (exclusive) s - the new attribute set for the text in the range
Parameters: s - the new text contents.