|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.accessibility.AccessibleContext
java.awt.Component.AccessibleAWTComponent
java.awt.Container.AccessibleAWTContainer
javax.swing.JComponent.AccessibleJComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent
public class JTextComponent.AccessibleJTextComponent
AccessibleJTextComponent implements accessibility hooks for JTextComponent. It allows an accessibility driver to read and manipulate the text component's contents as well as update UI elements such as the caret.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent.AccessibleJComponent |
|---|
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler |
| Nested classes/interfaces inherited from class java.awt.Component.AccessibleAWTComponent |
|---|
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent.AccessibleJComponent |
|---|
accessibleContainerHandler, accessibleFocusHandler |
| Fields inherited from class java.awt.Component.AccessibleAWTComponent |
|---|
accessibleAWTComponentHandler, accessibleAWTFocusHandler |
| Fields inherited from interface javax.accessibility.AccessibleAction |
|---|
CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP |
| Fields inherited from interface javax.accessibility.AccessibleText |
|---|
CHARACTER, SENTENCE, WORD |
| Constructor Summary | |
|---|---|
JTextComponent.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. |
| Methods inherited from class javax.swing.JComponent.AccessibleJComponent |
|---|
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleName, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListener |
| Methods inherited from class java.awt.Container.AccessibleAWTContainer |
|---|
getAccessibleAt |
| Methods inherited from class javax.accessibility.AccessibleContext |
|---|
firePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.accessibility.AccessibleComponent |
|---|
addFocusListener, contains, getAccessibleAt, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible |
| Constructor Detail |
|---|
public JTextComponent.AccessibleJTextComponent()
| Method Detail |
|---|
public int getCaretPosition()
getCaretPosition in interface AccessibleTextpublic String getSelectedText()
getSelectedText in interface AccessibleTextpublic int getSelectionStart()
getSelectionStart in interface AccessibleTextpublic int getSelectionEnd()
getSelectionEnd in interface AccessibleTextpublic void caretUpdate(CaretEvent e)
caretUpdate in interface CaretListenere - - the caret update eventpublic AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet in class JComponent.AccessibleJComponentAccessibleStatepublic AccessibleRole getAccessibleRole()
getAccessibleRole in class JComponent.AccessibleJComponentAccessibleRolepublic AccessibleEditableText getAccessibleEditableText()
getAccessibleEditableText in class AccessibleContextAccessibleEditableTextpublic AccessibleText getAccessibleText()
getAccessibleText in class AccessibleContextAccessibleTextpublic void insertUpdate(DocumentEvent e)
insertUpdate in interface DocumentListenere - - the insertion eventpublic void removeUpdate(DocumentEvent e)
removeUpdate in interface DocumentListenere - - the removal eventpublic void changedUpdate(DocumentEvent e)
changedUpdate in interface DocumentListenere - - text change eventpublic int getIndexAtPoint(Point p)
getIndexAtPoint in interface AccessibleTextp - - a point in component pixel co-ordinates
public Rectangle getCharacterBounds(int index)
getCharacterBounds in interface AccessibleTextindex - - the character index
public int getCharCount()
getCharCount in interface AccessibleTextpublic AttributeSet getCharacterAttribute(int index)
getCharacterAttribute in interface AccessibleTextindex - - index of the character
public String getAtIndex(int part,
int index)
getAtIndex in interface AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index of the part
public String getAfterIndex(int part,
int index)
getAfterIndex in interface AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index after the part
public String getBeforeIndex(int part,
int index)
getBeforeIndex in interface AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index before the part
public int getAccessibleActionCount()
getAccessibleActionCount in interface AccessibleActionpublic String getAccessibleActionDescription(int i)
getAccessibleActionDescription in interface AccessibleActioni - - the action to get the description for
public boolean doAccessibleAction(int i)
doAccessibleAction in interface AccessibleActioni - - the action to perform
public void setTextContents(String s)
setTextContents in interface AccessibleEditableTexts - - the new text contents.
public void insertTextAtIndex(int index,
String s)
insertTextAtIndex in interface AccessibleEditableTextindex - - the index to insert the new text at.s - - the new text
public String getTextRange(int start,
int end)
getTextRange in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)
public void delete(int start,
int end)
delete in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)
public void cut(int start,
int end)
cut in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)public void paste(int start)
paste in interface AccessibleEditableTextstart - - the starting index
public void replaceText(int start,
int end,
String s)
replaceText in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)s - - the text to paste
public void selectText(int start,
int end)
selectText in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)
public void setAttributes(int start,
int end,
AttributeSet s)
setAttributes in interface AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)s - - the new attribute set for the text in the range
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||