protected class JLabel.AccessibleJLabel extends JComponent.AccessibleJComponent implements javax.accessibility.AccessibleText, javax.accessibility.AccessibleExtendedComponent
JLabel
component.JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandleraccessibleContainerHandler, 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| Modifier | Constructor and Description |
|---|---|
protected |
JLabel.AccessibleJLabel() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAccessibleName()
Returns the accessible name.
|
javax.accessibility.AccessibleRole |
getAccessibleRole()
Returns the accessible role for the
JLabel component. |
java.lang.String |
getAfterIndex(int part,
int index)
Returns the character, word or sentence after the specified index.
|
java.lang.String |
getAtIndex(int part,
int index)
Returns the character, word or sentence at the specified index.
|
java.lang.String |
getBeforeIndex(int part,
int index)
Returns the character, word or sentence before the specified index.
|
int |
getCaretPosition()
Returns the caret position.
|
javax.swing.text.AttributeSet |
getCharacterAttribute(int index)
Returns an
AttributeSet that reflects the text attributes of
the specified character. |
java.awt.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(java.awt.Point point)
Returns the index of the character that is located at the specified
point.
|
java.lang.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, removePropertyChangeListenerfirePropertyChange, 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 java.lang.String getAccessibleName()
getAccessibleName in class JComponent.AccessibleJComponentAccessibleContext.setAccessibleName(String)public javax.accessibility.AccessibleRole getAccessibleRole()
JLabel component.getAccessibleRole in class JComponent.AccessibleJComponentAccessibleRole.LABEL.AccessibleRolepublic java.lang.String getSelectedText()
getSelectedText in interface javax.accessibility.AccessibleTextnull because JLabels cannot have selected textpublic int getSelectionStart()
getSelectionStart in interface javax.accessibility.AccessibleTextpublic int getSelectionEnd()
getSelectionEnd in interface javax.accessibility.AccessibleTextpublic javax.swing.text.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 javax.accessibility.AccessibleTextindex - the index of the characterAttributeSet that reflects the text attributes of
the specified characterpublic java.lang.String getAtIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence after the index.getAtIndex in interface javax.accessibility.AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic java.lang.String getAfterIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence after the index.getAfterIndex in interface javax.accessibility.AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic java.lang.String getBeforeIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence before the index.getBeforeIndex in interface javax.accessibility.AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic int getCaretPosition()
getCaretPosition in interface javax.accessibility.AccessibleTextpublic int getCharCount()
getCharCount in interface javax.accessibility.AccessibleTextpublic java.awt.Rectangle getCharacterBounds(int index)
getCharacterBounds in interface javax.accessibility.AccessibleTextindex - the index of the character that we return the
bounds forpublic int getIndexAtPoint(java.awt.Point point)
getIndexAtPoint in interface javax.accessibility.AccessibleTextpoint - the location that we lookup the character for