javax.accessibility
Interface AccessibleEditableText

All Superinterfaces:
AccessibleText sample code for javax.accessibility.AccessibleText definition code for javax.accessibility.AccessibleText
All Known Implementing Classes:
JEditorPane.AccessibleJEditorPane sample code for javax.swing.JEditorPane.AccessibleJEditorPane definition code for javax.swing.JEditorPane.AccessibleJEditorPane , JEditorPane.AccessibleJEditorPaneHTML sample code for javax.swing.JEditorPane.AccessibleJEditorPaneHTML definition code for javax.swing.JEditorPane.AccessibleJEditorPaneHTML , JEditorPane.JEditorPaneAccessibleHypertextSupport sample code for javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport definition code for javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport , JPasswordField.AccessibleJPasswordField sample code for javax.swing.JPasswordField.AccessibleJPasswordField definition code for javax.swing.JPasswordField.AccessibleJPasswordField , JSpinner.AccessibleJSpinner sample code for javax.swing.JSpinner.AccessibleJSpinner definition code for javax.swing.JSpinner.AccessibleJSpinner , JTextArea.AccessibleJTextArea sample code for javax.swing.JTextArea.AccessibleJTextArea definition code for javax.swing.JTextArea.AccessibleJTextArea , JTextComponent.AccessibleJTextComponent sample code for javax.swing.text.JTextComponent.AccessibleJTextComponent definition code for javax.swing.text.JTextComponent.AccessibleJTextComponent , JTextField.AccessibleJTextField sample code for javax.swing.JTextField.AccessibleJTextField definition code for javax.swing.JTextField.AccessibleJTextField

public interface AccessibleEditableText
extends AccessibleText sample code for javax.accessibility.AccessibleText definition code for javax.accessibility.AccessibleText

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 sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible ) and then calling the AccessibleContext.getAccessibleEditableText() sample code for javax.accessibility.AccessibleContext.getAccessibleEditableText() definition code for javax.accessibility.AccessibleContext.getAccessibleEditableText() method of AccessibleContext. If the return value is not null, the object supports this interface.

See Also:
Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , Accessible.getAccessibleContext() sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() , AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext , AccessibleContext.getAccessibleText() sample code for javax.accessibility.AccessibleContext.getAccessibleText() definition code for javax.accessibility.AccessibleContext.getAccessibleText() , AccessibleContext.getAccessibleEditableText() sample code for javax.accessibility.AccessibleContext.getAccessibleEditableText() definition code for javax.accessibility.AccessibleContext.getAccessibleEditableText()

Field Summary
 
Fields inherited from interface javax.accessibility.AccessibleText sample code for javax.accessibility.AccessibleText definition code for javax.accessibility.AccessibleText
CHARACTER sample code for javax.accessibility.AccessibleText.CHARACTER definition code for javax.accessibility.AccessibleText.CHARACTER , SENTENCE sample code for javax.accessibility.AccessibleText.SENTENCE definition code for javax.accessibility.AccessibleText.SENTENCE , WORD sample code for javax.accessibility.AccessibleText.WORD definition code for javax.accessibility.AccessibleText.WORD
 
Method Summary
 void cut sample code for javax.accessibility.AccessibleEditableText.cut(int, int) definition code for javax.accessibility.AccessibleEditableText.cut(int, int) (int startIndex, int endIndex)
          Cuts the text between two indices into the system clipboard.
 void delete sample code for javax.accessibility.AccessibleEditableText.delete(int, int) definition code for javax.accessibility.AccessibleEditableText.delete(int, int) (int startIndex, int endIndex)
          Deletes the text between two indices
 String sample code for java.lang.String definition code for java.lang.String getTextRange sample code for javax.accessibility.AccessibleEditableText.getTextRange(int, int) definition code for javax.accessibility.AccessibleEditableText.getTextRange(int, int) (int startIndex, int endIndex)
          Returns the text string between two indices.
 void insertTextAtIndex sample code for javax.accessibility.AccessibleEditableText.insertTextAtIndex(int, java.lang.String) definition code for javax.accessibility.AccessibleEditableText.insertTextAtIndex(int, java.lang.String) (int index, String sample code for java.lang.String definition code for java.lang.String  s)
          Inserts the specified string at the given index/
 void paste sample code for javax.accessibility.AccessibleEditableText.paste(int) definition code for javax.accessibility.AccessibleEditableText.paste(int) (int startIndex)
          Pastes the text from the system clipboard into the text starting at the specified index.
 void replaceText sample code for javax.accessibility.AccessibleEditableText.replaceText(int, int, java.lang.String) definition code for javax.accessibility.AccessibleEditableText.replaceText(int, int, java.lang.String) (int startIndex, int endIndex, String sample code for java.lang.String definition code for java.lang.String  s)
          Replaces the text between two indices with the specified string.
 void selectText sample code for javax.accessibility.AccessibleEditableText.selectText(int, int) definition code for javax.accessibility.AccessibleEditableText.selectText(int, int) (int startIndex, int endIndex)
          Selects the text between two indices.
 void setAttributes sample code for javax.accessibility.AccessibleEditableText.setAttributes(int, int, javax.swing.text.AttributeSet) definition code for javax.accessibility.AccessibleEditableText.setAttributes(int, int, javax.swing.text.AttributeSet) (int startIndex, int endIndex, AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  as)
          Sets attributes for the text between two indices.
 void setTextContents sample code for javax.accessibility.AccessibleEditableText.setTextContents(java.lang.String) definition code for javax.accessibility.AccessibleEditableText.setTextContents(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  s)
          Sets the text contents to the specified string.
 
Methods inherited from interface javax.accessibility.AccessibleText sample code for javax.accessibility.AccessibleText definition code for javax.accessibility.AccessibleText
getAfterIndex sample code for javax.accessibility.AccessibleText.getAfterIndex(int, int) definition code for javax.accessibility.AccessibleText.getAfterIndex(int, int) , getAtIndex sample code for javax.accessibility.AccessibleText.getAtIndex(int, int) definition code for javax.accessibility.AccessibleText.getAtIndex(int, int) , getBeforeIndex sample code for javax.accessibility.AccessibleText.getBeforeIndex(int, int) definition code for javax.accessibility.AccessibleText.getBeforeIndex(int, int) , getCaretPosition sample code for javax.accessibility.AccessibleText.getCaretPosition() definition code for javax.accessibility.AccessibleText.getCaretPosition() , getCharacterAttribute sample code for javax.accessibility.AccessibleText.getCharacterAttribute(int) definition code for javax.accessibility.AccessibleText.getCharacterAttribute(int) , getCharacterBounds sample code for javax.accessibility.AccessibleText.getCharacterBounds(int) definition code for javax.accessibility.AccessibleText.getCharacterBounds(int) , getCharCount sample code for javax.accessibility.AccessibleText.getCharCount() definition code for javax.accessibility.AccessibleText.getCharCount() , getIndexAtPoint sample code for javax.accessibility.AccessibleText.getIndexAtPoint(java.awt.Point) definition code for javax.accessibility.AccessibleText.getIndexAtPoint(java.awt.Point) , getSelectedText sample code for javax.accessibility.AccessibleText.getSelectedText() definition code for javax.accessibility.AccessibleText.getSelectedText() , getSelectionEnd sample code for javax.accessibility.AccessibleText.getSelectionEnd() definition code for javax.accessibility.AccessibleText.getSelectionEnd() , getSelectionStart sample code for javax.accessibility.AccessibleText.getSelectionStart() definition code for javax.accessibility.AccessibleText.getSelectionStart()
 

Method Detail

setTextContents sample code for javax.accessibility.AccessibleEditableText.setTextContents(java.lang.String) definition code for javax.accessibility.AccessibleEditableText.setTextContents(java.lang.String)

void setTextContents(String sample code for java.lang.String definition code for java.lang.String  s)
Sets the text contents to the specified string.

Parameters:
s - the string to set the text contents

insertTextAtIndex sample code for javax.accessibility.AccessibleEditableText.insertTextAtIndex(int, java.lang.String) definition code for javax.accessibility.AccessibleEditableText.insertTextAtIndex(int, java.lang.String)

void insertTextAtIndex(int index,
                       String sample code for java.lang.String definition code for java.lang.String  s)
Inserts the specified string at the given index/

Parameters:
index - the index in the text where the string will be inserted
s - the string to insert in the text

getTextRange sample code for javax.accessibility.AccessibleEditableText.getTextRange(int, int) definition code for javax.accessibility.AccessibleEditableText.getTextRange(int, int)

String sample code for java.lang.String definition code for java.lang.String  getTextRange(int startIndex,
                    int endIndex)
Returns the text string between two indices.

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text
Returns:
the text string between the indices

delete sample code for javax.accessibility.AccessibleEditableText.delete(int, int) definition code for javax.accessibility.AccessibleEditableText.delete(int, int)

void delete(int startIndex,
            int endIndex)
Deletes the text between two indices

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text

cut sample code for javax.accessibility.AccessibleEditableText.cut(int, int) definition code for javax.accessibility.AccessibleEditableText.cut(int, int)

void cut(int startIndex,
         int endIndex)
Cuts the text between two indices into the system clipboard.

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text

paste sample code for javax.accessibility.AccessibleEditableText.paste(int) definition code for javax.accessibility.AccessibleEditableText.paste(int)

void paste(int startIndex)
Pastes the text from the system clipboard into the text starting at the specified index.

Parameters:
startIndex - the starting index in the text

replaceText sample code for javax.accessibility.AccessibleEditableText.replaceText(int, int, java.lang.String) definition code for javax.accessibility.AccessibleEditableText.replaceText(int, int, java.lang.String)

void replaceText(int startIndex,
                 int endIndex,
                 String sample code for java.lang.String definition code for java.lang.String  s)
Replaces the text between two indices with the specified string.

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text
s - the string to replace the text between two indices

selectText sample code for javax.accessibility.AccessibleEditableText.selectText(int, int) definition code for javax.accessibility.AccessibleEditableText.selectText(int, int)

void selectText(int startIndex,
                int endIndex)
Selects the text between two indices.

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text

setAttributes sample code for javax.accessibility.AccessibleEditableText.setAttributes(int, int, javax.swing.text.AttributeSet) definition code for javax.accessibility.AccessibleEditableText.setAttributes(int, int, javax.swing.text.AttributeSet)

void setAttributes(int startIndex,
                   int endIndex,
                   AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  as)
Sets attributes for the text between two indices.

Parameters:
startIndex - the starting index in the text
endIndex - the ending index in the text
as - the attribute set
See Also:
AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet