GNU Classpath (0.95) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.accessibility.AccessibleContext
java.awt.Component.AccessibleAWTComponent
java.awt.Container.AccessibleAWTContainer
javax.swing.JComponent.AccessibleJComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent
public class JTextComponent.AccessibleJTextComponent
extends JComponent.AccessibleJComponent
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.Container.AccessibleAWTContainer | |
Container.AccessibleAWTContainer.AccessibleContainerHandler |
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.Container.AccessibleAWTContainer | |
accessibleContainerHandler |
Fields inherited from class java.awt.Component.AccessibleAWTComponent | |
accessibleAWTComponentHandler , accessibleAWTFocusHandler |
Fields inherited from interface javax.accessibility.AccessibleAction | |
DECREMENT , INCREMENT , TOGGLE_EXPAND |
Fields inherited from interface javax.accessibility.AccessibleText | |
CHARACTER , SENTENCE , WORD |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
boolean |
|
int |
|
String |
|
AccessibleEditableText |
|
AccessibleRole |
|
AccessibleStateSet |
|
AccessibleText |
|
String |
|
String |
|
String |
|
int |
|
int |
|
AttributeSet |
|
Rectangle |
|
int |
|
String |
|
int |
|
int |
|
String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class java.awt.Container.AccessibleAWTContainer | |
getAccessibleAt , getAccessibleChild , getAccessibleChildrenCount |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void caretUpdate(CaretEvent e)
Handle a change in the caret position and fire any applicable property change events.
- Specified by:
- caretUpdate in interface CaretListener
- Parameters:
e
- - the caret update event
public void changedUpdate(DocumentEvent e)
Handle a text change event and fire an AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change event.
- Specified by:
- changedUpdate in interface DocumentListener
- Parameters:
e
- - text change event
public void cut(int start, int end)
Cuts the text between two indexes. The text is put into the system clipboard.
- Specified by:
- cut in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)
public void delete(int start, int end)
Deletes the text between two indexes.
- Specified by:
- delete in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)
public boolean doAccessibleAction(int i)
Performs the i-th action. Nothing happens if i is out of bounds.
- Specified by:
- doAccessibleAction in interface AccessibleAction
- Parameters:
i
- - the action to perform
- Returns:
- true if the action was performed successfully
public int getAccessibleActionCount()
Returns the number of actions for this object. The zero-th object represents the default action.
- Specified by:
- getAccessibleActionCount in interface AccessibleAction
- Returns:
- the number of actions (0-based).
public String getAccessibleActionDescription(int i)
Returns the description of the i-th action. Null is returned if i is out of bounds.
- Specified by:
- getAccessibleActionDescription in interface AccessibleAction
- Parameters:
i
- - the action to get the description for
- Returns:
- description of the i-th action
public AccessibleEditableText getAccessibleEditableText()
Retrieve an AccessibleEditableText object that controls this text component.
- Overrides:
- getAccessibleEditableText in interface AccessibleContext
- Returns:
- this
public AccessibleRole getAccessibleRole()
Retrieve the accessible role of this component.
- Overrides:
- getAccessibleRole in interface JComponent.AccessibleJComponent
- Returns:
- the accessible role of this component
- See Also:
AccessibleRole
public AccessibleStateSet getAccessibleStateSet()
Retreive the accessible state set of this component.
- Overrides:
- getAccessibleStateSet in interface JComponent.AccessibleJComponent
- Returns:
- the accessible state set of this component
public AccessibleText getAccessibleText()
Retrieve an AccessibleText object that controls this text component.
- Overrides:
- getAccessibleText in interface AccessibleContext
- Returns:
- this
- See Also:
AccessibleText
public String getAfterIndex(int part, int index)
Gets the text located after index. null is returned if the index or part is invalid.
- Specified by:
- getAfterIndex in interface AccessibleText
- Parameters:
part
- -AccessibleText.CHARACTER
,AccessibleText.WORD
, orAccessibleText.SENTENCE
index
- - index after the part
- Returns:
- the part of text after that index, or null
public String getAtIndex(int part, int index)
Gets the text located at index. null is returned if the index or part is invalid.
- Specified by:
- getAtIndex in interface AccessibleText
- Parameters:
part
- -AccessibleText.CHARACTER
,AccessibleText.WORD
, orAccessibleText.SENTENCE
index
- - index of the part
- Returns:
- the part of text at that index, or null
public String getBeforeIndex(int part, int index)
Gets the text located before index. null is returned if the index or part is invalid.
- Specified by:
- getBeforeIndex in interface AccessibleText
- Parameters:
part
- -AccessibleText.CHARACTER
,AccessibleText.WORD
, orAccessibleText.SENTENCE
index
- - index before the part
- Returns:
- the part of text before that index, or null
public int getCaretPosition()
Retrieve the current caret position. The index of the first caret position is 0.
- Specified by:
- getCaretPosition in interface AccessibleText
- Returns:
- caret position
public int getCharCount()
Return the length of the text in this text component.
- Specified by:
- getCharCount in interface AccessibleText
- Returns:
- a character length
public AttributeSet getCharacterAttribute(int index)
Gets the character attributes of the character at index. If the index is out of bounds, null is returned.
- Specified by:
- getCharacterAttribute in interface AccessibleText
- Parameters:
index
- - index of the character
- Returns:
- the character's attributes
public Rectangle getCharacterBounds(int index)
Calculate the bounding box of the character at the given index. The returned x and y co-ordinates are relative to this text component's top-left corner. If the index is invalid this method returns null.
- Specified by:
- getCharacterBounds in interface AccessibleText
- Parameters:
index
- - the character index
- Returns:
- a character's bounding box, or null
public int getIndexAtPoint(Point p)
Get the index of the character at the given point, in component pixel co-ordinates. If the point argument is invalid this method returns -1.
- Specified by:
- getIndexAtPoint in interface AccessibleText
- Parameters:
p
- - a point in component pixel co-ordinates
- Returns:
- a character index, or -1
public String getSelectedText()
Retrieve the current text selection. If no text is selected this method returns null.
- Specified by:
- getSelectedText in interface AccessibleText
- Returns:
- the currently selected text or null
public int getSelectionEnd()
Retrieve the index of the last character in the current text selection. If there is no text in the text component, this method returns 0. If there is text in the text component, but there is no selection, this method returns the current caret position.
- Specified by:
- getSelectionEnd in interface AccessibleText
- Returns:
- the index of the last character in the selection, the current caret position or 0
public int getSelectionStart()
Retrieve the index of the first character in the current text selection. If there is no text in the text component, this method returns 0. If there is text in the text component, but there is no selection, this method returns the current caret position.
- Specified by:
- getSelectionStart in interface AccessibleText
- Returns:
- the index of the first character in the selection, the current caret position or 0
public String getTextRange(int start, int end)
Gets the text between two indexes.
- Specified by:
- getTextRange in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)
public void insertTextAtIndex(int index, String s)
Inserts the text at the given index.
- Specified by:
- insertTextAtIndex in interface AccessibleEditableText
- Parameters:
index
- - the index to insert the new text at.s
- - the new text
public void insertUpdate(DocumentEvent e)
Handle a text insertion event and fire an AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change event.
- Specified by:
- insertUpdate in interface DocumentListener
- Parameters:
e
- - the insertion event
public void paste(int start)
Pastes the text from the system clipboard to the given index.
- Specified by:
- paste in interface AccessibleEditableText
- Parameters:
start
- - the starting index
public void removeUpdate(DocumentEvent e)
Handle a text removal event and fire an AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change event.
- Specified by:
- removeUpdate in interface DocumentListener
- Parameters:
e
- - the removal event
public void replaceText(int start, int end, String s)
Replaces the text between two indexes with the given text.
- Specified by:
- replaceText in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)s
- - the text to paste
public void selectText(int start, int end)
Selects the text between two indexes.
- Specified by:
- selectText in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)
public void setAttributes(int start, int end, AttributeSet s)
Sets the attributes of all the text between two indexes.
- Specified by:
- setAttributes in interface AccessibleEditableText
- Parameters:
start
- - the starting index (inclusive)end
- - the ending index (exclusive)s
- - the new attribute set for the text in the range
public void setTextContents(String s)
Sets the text contents.
- Specified by:
- setTextContents in interface AccessibleEditableText
- Parameters:
s
- - the new text contents.
GNU Classpath (0.95) |