javax.accessibility

Interface AccessibleEditableText

public interface AccessibleEditableText extends AccessibleText

Objects which present editable textual information on the display should implement this interface. Accessibility software can use the implementations of this interface to change the content, attributes, and spacial location of the text.

The AccessibleContext.getAccessibleEditableText() method should return null if an object does not implement this interface.

Since: 1.2

See Also: Accessible AccessibleContext getAccessibleText getAccessibleEditableText

UNKNOWN: updated to 1.4, except for javax.swing support

Method Summary
voidcut(int start, int end)
Cut the text between two points to the system clipboard.
voiddelete(int start, int end)
Delete the text between two points.
StringgetTextRange(int start, int end)
Return the text between two points.
voidinsertTextAtIndex(int index, String s)
Inserts the given string at the specified location.
voidpaste(int start)
Paste the text from the system clipboard at the given index.
voidreplaceText(int start, int end, String s)
Replace the text between two points with the given string.
voidselectText(int start, int stop)
Select the text between two points.
voidsetAttributes(int start, int end, AttributeSet s)
Set the attributes of text between two points.
voidsetTextContents(String s)
Set the text contents to the given string.

Method Detail

cut

public void cut(int start, int end)
Cut the text between two points to the system clipboard.

Parameters: start the start position, inclusive end the end position, exclusive

delete

public void delete(int start, int end)
Delete the text between two points.

Parameters: start the start position, inclusive end the end position, exclusive

getTextRange

public String getTextRange(int start, int end)
Return the text between two points.

Parameters: start the start position, inclusive end the end position, exclusive

insertTextAtIndex

public void insertTextAtIndex(int index, String s)
Inserts the given string at the specified location.

Parameters: index the index for insertion s the new text

paste

public void paste(int start)
Paste the text from the system clipboard at the given index.

Parameters: start the start position

replaceText

public void replaceText(int start, int end, String s)
Replace the text between two points with the given string.

Parameters: start the start position, inclusive end the end position, exclusive s the string to paste

selectText

public void selectText(int start, int stop)
Select the text between two points.

Parameters: start the start position, inclusive end the end position, exclusive

setAttributes

public void setAttributes(int start, int end, AttributeSet s)
Set the attributes of text between two points.

Parameters: start the start position, inclusive end the end position, exclusive s the new attribute set for the range

setTextContents

public void setTextContents(String s)
Set the text contents to the given string.

Parameters: s the new text