protected class JLabel.AccessibleJLabel extends JComponent.AccessibleJComponent implements AccessibleText, AccessibleExtendedComponent
JLabel
component.JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandlerComponent.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandleraccessibleContainerHandler, accessibleFocusHandleraccessibleAWTComponentHandler, accessibleAWTFocusHandlerACCESSIBLE_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, accessibleParentCHARACTER, SENTENCE, WORD| Modifier | Constructor and Description |
|---|---|
protected |
JLabel.AccessibleJLabel() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleStateSet, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListenergetAccessibleAtaddFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisiblefirePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessibleKeyBinding, getTitledBorderText, getToolTipTextaddFocusListener, 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, setVisibleprotected JLabel.AccessibleJLabel()
public String getAccessibleName()
getAccessibleName in class JComponent.AccessibleJComponentAccessibleContext.setAccessibleName(String)public AccessibleRole getAccessibleRole()
JLabel component.getAccessibleRole in class JComponent.AccessibleJComponentAccessibleRole.LABEL.AccessibleRolepublic String getSelectedText()
getSelectedText in interface AccessibleTextnull because JLabels cannot have selected textpublic int getSelectionStart()
getSelectionStart in interface AccessibleTextpublic int getSelectionEnd()
getSelectionEnd in interface AccessibleTextpublic 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 AccessibleTextindex - the index of the characterAttributeSet 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 AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic String getAfterIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence after the index.getAfterIndex in interface AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic String getBeforeIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence before the index.getBeforeIndex in interface AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic int getCaretPosition()
getCaretPosition in interface AccessibleTextpublic int getCharCount()
getCharCount in interface AccessibleTextpublic Rectangle getCharacterBounds(int index)
getCharacterBounds in interface AccessibleTextindex - the index of the character that we return the
bounds forpublic int getIndexAtPoint(Point point)
getIndexAtPoint in interface AccessibleTextpoint - the location that we lookup the character for