Top Description Fields Methods
javax.accessibility

public Interface AccessibleEditableText

extends AccessibleText
Known Direct Implementers
javax.swing.JSpinner.AccessibleJSpinner, javax.swing.text.JTextComponent.AccessibleJTextComponent
Imports
javax.swing.text.AttributeSet

The 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.
Author
Lynn Monsanto
Since
1.4
See Also
Accessible, Accessible#getAccessibleContext, AccessibleContext, AccessibleContext#getAccessibleText, AccessibleContext#getAccessibleEditableText

Field Summary

Inherited from javax.accessibility.AccessibleText:
CHARACTERSENTENCEWORD

Method Summary

Modifier and TypeMethod 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 indices
getTextRange
(int
the 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.

Inherited from javax.accessibility.AccessibleText:
getAfterIndexgetAtIndexgetBeforeIndexgetCaretPositiongetCharacterAttributegetCharacterBoundsgetCharCountgetIndexAtPointgetSelectedTextgetSelectionEndgetSelectionStart

Method Detail

cutback to summary
public void cut(int startIndex, int endIndex)

Cuts the text between two indices into the system clipboard.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

deleteback to summary
public void delete(int startIndex, int endIndex)

Deletes the text between two indices.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

getTextRangeback to summary
public String getTextRange(int startIndex, int endIndex)

Returns the text string between two indices.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

Returns:String

the text string between the indices

insertTextAtIndexback to summary
public void insertTextAtIndex(int index, String s)

Inserts the specified string at the given index.

Parameters
index:int

the index in the text where the string will be inserted

s:String

the string to insert in the text

pasteback to summary
public void paste(int startIndex)

Pastes the text from the system clipboard into the text starting at the specified index.

Parameters
startIndex:int

the starting index in the text

replaceTextback to summary
public void replaceText(int startIndex, int endIndex, String s)

Replaces the text between two indices with the specified string.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

s:String

the string to replace the text between two indices

selectTextback to summary
public void selectText(int startIndex, int endIndex)

Selects the text between two indices.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

setAttributesback to summary
public void setAttributes(int startIndex, int endIndex, AttributeSet as)

Sets attributes for the text between two indices.

Parameters
startIndex:int

the starting index in the text

endIndex:int

the ending index in the text

as:AttributeSet

the attribute set

See Also
AttributeSet
setTextContentsback to summary
public void setTextContents(String s)

Sets the text contents to the specified string.

Parameters
s:String

the string to set the text contents