getAccessibleDescription
public String getAccessibleDescription()
Gets the accessibleDescription property of this object. If this
property isn't set, returns the content type of this
JEditorPane instead (e.g. "plain/text", "html/text").
- getAccessibleDescription in interface AccessibleContext
- the localized description of the object;
null
if this object does not have a description
AccessibleHTML.TextElementInfo.TextAccessibleContext
getAccessibleName
public String getAccessibleName()
Gets the accessibleName property of this object. The accessibleName
property of an object is a localized String that designates the purpose
of the object. For example, the accessibleName property of a label
or button might be the text of the label or button itself. In the
case of an object that doesn't display its name, the accessibleName
should still be set. For example, in the case of a text field used
to enter the name of a city, the accessibleName for the en_US locale
could be 'city.'
- getAccessibleName in interface AccessibleContext
- the localized name of the object; null if this
object does not have a name
AccessibleHTML.TextElementInfo.TextAccessibleContext
getAccessibleRole
public AccessibleRole getAccessibleRole()
Gets the role of this object. The role of the object is the generic
purpose or use of the class of this object. For example, the role
of a push button is AccessibleRole.PUSH_BUTTON. The roles in
AccessibleRole are provided so component developers can pick from
a set of predefined roles. This enables assistive technologies to
provide a consistent interface to various tweaked subclasses of
components (e.g., use AccessibleRole.PUSH_BUTTON for all components
that act like a push button) as well as distinguish between sublasses
that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
and AccessibleRole.RADIO_BUTTON for radio buttons).
Note that the AccessibleRole class is also extensible, so
custom component developers can define their own AccessibleRole's
if the set of predefined roles is inadequate.
- getAccessibleRole in interface AccessibleContext
- an instance of AccessibleRole describing the role of the object
getCaretPosition
public int getCaretPosition()
Return the zero-based offset of the caret.
Note: That to the right of the caret will have the same index
value as the offset (the caret is between two characters).
- getCaretPosition in interface AccessibleText
- the zero-based offset of the caret.
getCharacterBounds
public Rectangle getCharacterBounds(int i)
Determine the bounding box of the character at the given
index into the string. The bounds are returned in local
coordinates. If the index is invalid an empty rectangle is
returned.
- getCharacterBounds in interface AccessibleText
i - the index into the String
- the screen coordinates of the character's the bounding box,
if index is invalid returns an empty rectangle.
getIndexAtPoint
public int getIndexAtPoint(Point p)
Given a point in local coordinates, return the zero-based index
of the character under that Point. If the point is invalid,
this method returns -1.
- getIndexAtPoint in interface AccessibleText
p - the Point in local coordinates
- the zero-based index of the character under Point p; if
Point is invalid returns -1.
getSelectionEnd
public int getSelectionEnd()
Returns the end offset within the selected text.
If there is no selection, but there is
a caret, the start and end offsets will be the same.
- getSelectionEnd in interface AccessibleText
- the index into teh text of the end of the selection
getSelectionStart
public int getSelectionStart()
Returns the start offset within the selected text.
If there is no selection, but there is
a caret, the start and end offsets will be the same.
- getSelectionStart in interface AccessibleText
- the index into the text of the start of the selection