AccessibleEditableText
interface should be implemented by all
classes that present editable textual information on the display. Along with
the AccessibleText
interface, this interface provides the standard
mechanism for an assistive technology to access that text via its content,
attributes, and spatial location. Applications can determine if an object
supports the AccessibleEditableText
interface by first obtaining its
AccessibleContext
(see Accessible
) and then calling the
AccessibleContext#getAccessibleEditableText
method of
AccessibleContext
. If the return value is not null
, the
object supports this interface.
Accessible
, Accessible#getAccessibleContext
, AccessibleContext
, AccessibleContext#getAccessibleText
, AccessibleContext#getAccessibleEditableText
Modifier and Type | Method and Description |
---|---|
public void | cut(int
the starting index in the text startIndex, int the ending index in the text endIndex)Cuts the text between two indices into the system clipboard. |
public void | delete(int
the starting index in the text startIndex, int the ending index in the text endIndex)Deletes the text between two indices. |
public String | Returns: the text string between the indicesthe starting index in the text startIndex, int the ending index in the text endIndex)Returns the text string between two indices. |
public void | insertTextAtIndex(int
the index in the text where the string will be inserted index, String the string to insert in the text s)Inserts the specified string at the given index. |
public void | paste(int
the starting index in the text startIndex)Pastes the text from the system clipboard into the text starting at the specified index. |
public void | replaceText(int
the starting index in the text startIndex, int the ending index in the text endIndex, String the string to replace the text between two indices s)Replaces the text between two indices with the specified string. |
public void | selectText(int
the starting index in the text startIndex, int the ending index in the text endIndex)Selects the text between two indices. |
public void | setAttributes(int
the starting index in the text startIndex, int the ending index in the text endIndex, AttributeSet the attribute set as)Sets attributes for the text between two indices. |
public void | setTextContents(String
the string to set the text contents s)Sets the text contents to the specified string. |
cut | back to summary |
---|---|
public void cut(int startIndex, int endIndex) Cuts the text between two indices into the system clipboard.
|
delete | back to summary |
---|---|
public void delete(int startIndex, int endIndex) Deletes the text between two indices.
|
getTextRange | back to summary |
---|---|
public String getTextRange(int startIndex, int endIndex) Returns the text string between two indices.
|
insertTextAtIndex | back to summary |
---|---|
public void insertTextAtIndex(int index, String s) Inserts the specified string at the given index.
|
paste | back to summary |
---|---|
public void paste(int startIndex) Pastes the text from the system clipboard into the text starting at the specified index.
|
replaceText | back to summary |
---|---|
public void replaceText(int startIndex, int endIndex, String s) Replaces the text between two indices with the specified string.
|
selectText | back to summary |
---|---|
public void selectText(int startIndex, int endIndex) Selects the text between two indices.
|
setAttributes | back to summary |
---|---|
public void setAttributes(int startIndex, int endIndex, AttributeSet as) Sets attributes for the text between two indices.
|
setTextContents | back to summary |
---|---|
public void setTextContents(String s) Sets the text contents to the specified string.
|