public class JTextComponent.AccessibleJTextComponent extends javax.swing.JComponent.AccessibleJComponent implements javax.accessibility.AccessibleText, javax.swing.event.CaretListener, javax.swing.event.DocumentListener, javax.accessibility.AccessibleAction, javax.accessibility.AccessibleEditableText
accessibleContainerHandler, accessibleFocusHandlerACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent| Constructor and Description |
|---|
JTextComponent.AccessibleJTextComponent()
Construct an AccessibleJTextComponent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
caretUpdate(javax.swing.event.CaretEvent e)
Handle a change in the caret position and fire any applicable
property change events.
|
void |
changedUpdate(javax.swing.event.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.
|
java.lang.String |
getAccessibleActionDescription(int i)
Returns the description of the i-th action.
|
javax.accessibility.AccessibleEditableText |
getAccessibleEditableText()
Retrieve an AccessibleEditableText object that controls this
text component.
|
javax.accessibility.AccessibleRole |
getAccessibleRole()
Retrieve the accessible role of this component.
|
javax.accessibility.AccessibleStateSet |
getAccessibleStateSet()
Retreive the accessible state set of this component.
|
javax.accessibility.AccessibleText |
getAccessibleText()
Retrieve an AccessibleText object that controls this text
component.
|
java.lang.String |
getAfterIndex(int part,
int index)
Gets the text located after index. null is returned if the index
or part is invalid.
|
java.lang.String |
getAtIndex(int part,
int index)
Gets the text located at index. null is returned if the index
or part is invalid.
|
java.lang.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.
|
java.awt.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(java.awt.Point p)
Get the index of the character at the given point, in component
pixel co-ordinates.
|
java.lang.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.
|
java.lang.String |
getTextRange(int start,
int end)
Gets the text between two indexes.
|
void |
insertTextAtIndex(int index,
java.lang.String s)
Inserts the text at the given index.
|
void |
insertUpdate(javax.swing.event.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(javax.swing.event.DocumentEvent e)
Handle a text removal event and fire an
AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
event.
|
void |
replaceText(int start,
int end,
java.lang.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(java.lang.String s)
Sets the text contents.
|
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleName, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListenerfirePropertyChange, getAccessibleAction, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFocusListener, 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, setVisiblepublic JTextComponent.AccessibleJTextComponent()
public int getCaretPosition()
getCaretPosition in interface javax.accessibility.AccessibleTextpublic java.lang.String getSelectedText()
getSelectedText in interface javax.accessibility.AccessibleTextpublic int getSelectionStart()
getSelectionStart in interface javax.accessibility.AccessibleTextpublic int getSelectionEnd()
getSelectionEnd in interface javax.accessibility.AccessibleTextpublic void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate in interface javax.swing.event.CaretListenere - - the caret update eventpublic javax.accessibility.AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet in class javax.swing.JComponent.AccessibleJComponentAccessibleStatepublic javax.accessibility.AccessibleRole getAccessibleRole()
getAccessibleRole in class javax.swing.JComponent.AccessibleJComponentAccessibleRolepublic javax.accessibility.AccessibleEditableText getAccessibleEditableText()
getAccessibleEditableText in class javax.accessibility.AccessibleContextAccessibleEditableTextpublic javax.accessibility.AccessibleText getAccessibleText()
getAccessibleText in class javax.accessibility.AccessibleContextAccessibleTextpublic void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate in interface javax.swing.event.DocumentListenere - - the insertion eventpublic void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate in interface javax.swing.event.DocumentListenere - - the removal eventpublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate in interface javax.swing.event.DocumentListenere - - text change eventpublic int getIndexAtPoint(java.awt.Point p)
getIndexAtPoint in interface javax.accessibility.AccessibleTextp - - a point in component pixel co-ordinatespublic java.awt.Rectangle getCharacterBounds(int index)
getCharacterBounds in interface javax.accessibility.AccessibleTextindex - - the character indexpublic int getCharCount()
getCharCount in interface javax.accessibility.AccessibleTextpublic AttributeSet getCharacterAttribute(int index)
getCharacterAttribute in interface javax.accessibility.AccessibleTextindex - - index of the characterpublic java.lang.String getAtIndex(int part, int index)
getAtIndex in interface javax.accessibility.AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index of the partpublic java.lang.String getAfterIndex(int part, int index)
getAfterIndex in interface javax.accessibility.AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index after the partpublic java.lang.String getBeforeIndex(int part, int index)
getBeforeIndex in interface javax.accessibility.AccessibleTextpart - - AccessibleText.CHARACTER, AccessibleText.WORD, or AccessibleText.SENTENCEindex - - index before the partpublic int getAccessibleActionCount()
getAccessibleActionCount in interface javax.accessibility.AccessibleActionpublic java.lang.String getAccessibleActionDescription(int i)
getAccessibleActionDescription in interface javax.accessibility.AccessibleActioni - - the action to get the description forpublic boolean doAccessibleAction(int i)
doAccessibleAction in interface javax.accessibility.AccessibleActioni - - the action to performpublic void setTextContents(java.lang.String s)
setTextContents in interface javax.accessibility.AccessibleEditableTexts - - the new text contents.public void insertTextAtIndex(int index, java.lang.String s)
insertTextAtIndex in interface javax.accessibility.AccessibleEditableTextindex - - the index to insert the new text at.s - - the new textpublic java.lang.String getTextRange(int start, int end)
getTextRange in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)public void delete(int start, int end)
delete in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)public void cut(int start, int end)
cut in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)public void paste(int start)
paste in interface javax.accessibility.AccessibleEditableTextstart - - the starting indexpublic void replaceText(int start, int end, java.lang.String s)
replaceText in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)s - - the text to pastepublic void selectText(int start, int end)
selectText in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)public void setAttributes(int start, int end, AttributeSet s)
setAttributes in interface javax.accessibility.AccessibleEditableTextstart - - the starting index (inclusive)end - - the ending index (exclusive)s - - the new attribute set for the text in the range