|
|||||||||
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.JLabel.AccessibleJLabel
protected class JLabel.AccessibleJLabel
Provides the accessibility features for the JLabel
component.
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.AccessibleText |
---|
CHARACTER, SENTENCE, WORD |
Constructor Summary | |
---|---|
protected |
JLabel.AccessibleJLabel()
|
Method Summary | |
---|---|
String |
getAccessibleName()
Returns the accessible name. |
AccessibleRole |
getAccessibleRole()
Returns the accessible role for the JLabel component. |
String |
getAfterIndex(int part,
int index)
Returns the character, word or sentence after the specified index. |
String |
getAtIndex(int part,
int index)
Returns the character, word or sentence at the specified index. |
String |
getBeforeIndex(int part,
int index)
Returns the character, word or sentence before the specified index. |
int |
getCaretPosition()
Returns the caret position. |
AttributeSet |
getCharacterAttribute(int index)
Returns an AttributeSet that reflects the text attributes of
the specified character. |
Rectangle |
getCharacterBounds(int index)
Returns the bounding box of the character at the specified index. |
int |
getCharCount()
Returns the number of characters that are displayed by the JLabel. |
int |
getIndexAtPoint(Point point)
Returns the index of the character that is located at the specified point. |
String |
getSelectedText()
Returns the selected text. |
int |
getSelectionEnd()
Returns the end index of the selected text. |
int |
getSelectionStart()
Returns the start index of the selected text. |
Methods inherited from class java.awt.Container.AccessibleAWTContainer |
---|
getAccessibleAt |
Methods inherited from class javax.accessibility.AccessibleContext |
---|
firePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, 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.AccessibleExtendedComponent |
---|
getAccessibleKeyBinding, getTitledBorderText, getToolTipText |
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 |
---|
protected JLabel.AccessibleJLabel()
Method Detail |
---|
public String getAccessibleName()
getAccessibleName
in class JComponent.AccessibleJComponent
AccessibleContext.setAccessibleName(String)
public AccessibleRole getAccessibleRole()
JLabel
component.
getAccessibleRole
in class JComponent.AccessibleJComponent
AccessibleRole.LABEL
.AccessibleRole
public String getSelectedText()
getSelectedText
in interface AccessibleText
null
because JLabels cannot have selected textpublic int getSelectionStart()
getSelectionStart
in interface AccessibleText
public int getSelectionEnd()
getSelectionEnd
in interface AccessibleText
public AttributeSet getCharacterAttribute(int index)
AttributeSet
that reflects the text attributes of
the specified character. We return an empty
AttributeSet
here, because JLabels don't support text
attributes (at least not yet).
getCharacterAttribute
in interface AccessibleText
index
- the index of the character
AttributeSet
that reflects the text attributes of
the specified characterpublic String getAtIndex(int part, int index)
part
parameter determines what is returned, the character,
word or sentence after the index.
getAtIndex
in interface AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the index
index
public String getAfterIndex(int part, int index)
part
parameter determines what is returned, the character,
word or sentence after the index.
getAfterIndex
in interface AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the index
index
public String getBeforeIndex(int part, int index)
part
parameter determines what is returned, the character,
word or sentence before the index.
getBeforeIndex
in interface AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the index
index
public int getCaretPosition()
getCaretPosition
in interface AccessibleText
public int getCharCount()
getCharCount
in interface AccessibleText
public Rectangle getCharacterBounds(int index)
getCharacterBounds
in interface AccessibleText
index
- the index of the character that we return the
bounds for
public int getIndexAtPoint(Point point)
getIndexAtPoint
in interface AccessibleText
point
- the location that we lookup the character for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |