ImageIcon.AccessibleImageIcon (Java SE 15 & JDK 15) (original) (raw)
All Implemented Interfaces:
[Serializable](../../../java.base/java/io/Serializable.html "interface in java.io")
, [AccessibleIcon](../accessibility/AccessibleIcon.html "interface in javax.accessibility")
Enclosing class:
protected class ImageIcon.AccessibleImageIcon extends AccessibleContext implements AccessibleIcon, Serializable
This class implements accessibility support for theImageIcon
class. It provides an implementation of the Java Accessibility API appropriate to image icon user-interface elements.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans
package. Please see XMLEncoder.
Since:
1.3
Field Summary
Fields declared in class javax.accessibility.AccessibleContext
[ACCESSIBLE_ACTION_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FACTION%5FPROPERTY), [ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FACTIVE%5FDESCENDANT%5FPROPERTY), [ACCESSIBLE_CARET_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FCARET%5FPROPERTY), [ACCESSIBLE_CHILD_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FCHILD%5FPROPERTY), [ACCESSIBLE_COMPONENT_BOUNDS_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FCOMPONENT%5FBOUNDS%5FCHANGED), [ACCESSIBLE_DESCRIPTION_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FDESCRIPTION%5FPROPERTY), [ACCESSIBLE_HYPERTEXT_OFFSET](../accessibility/AccessibleContext.html#ACCESSIBLE%5FHYPERTEXT%5FOFFSET), [ACCESSIBLE_INVALIDATE_CHILDREN](../accessibility/AccessibleContext.html#ACCESSIBLE%5FINVALIDATE%5FCHILDREN), [ACCESSIBLE_NAME_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FNAME%5FPROPERTY), [ACCESSIBLE_SELECTION_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FSELECTION%5FPROPERTY), [ACCESSIBLE_STATE_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FSTATE%5FPROPERTY), [ACCESSIBLE_TABLE_CAPTION_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FCAPTION%5FCHANGED), [ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FCOLUMN%5FDESCRIPTION%5FCHANGED), [ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FCOLUMN%5FHEADER%5FCHANGED), [ACCESSIBLE_TABLE_MODEL_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FMODEL%5FCHANGED), [ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FROW%5FDESCRIPTION%5FCHANGED), [ACCESSIBLE_TABLE_ROW_HEADER_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FROW%5FHEADER%5FCHANGED), [ACCESSIBLE_TABLE_SUMMARY_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTABLE%5FSUMMARY%5FCHANGED), [ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTEXT%5FATTRIBUTES%5FCHANGED), [ACCESSIBLE_TEXT_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FTEXT%5FPROPERTY), [ACCESSIBLE_VALUE_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FVALUE%5FPROPERTY), [ACCESSIBLE_VISIBLE_DATA_PROPERTY](../accessibility/AccessibleContext.html#ACCESSIBLE%5FVISIBLE%5FDATA%5FPROPERTY), [accessibleDescription](../accessibility/AccessibleContext.html#accessibleDescription), [accessibleName](../accessibility/AccessibleContext.html#accessibleName), [accessibleParent](../accessibility/AccessibleContext.html#accessibleParent)
Constructor Summary
Constructors
Modifier | Constructor | Description |
---|---|---|
protected | AccessibleImageIcon() |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
Accessible | getAccessibleChild(int i) | Returns the nth Accessible child of the object. |
int | getAccessibleChildrenCount() | Returns the number of accessible children in the object. |
String | getAccessibleIconDescription() | Gets the description of the icon. |
int | getAccessibleIconHeight() | Gets the height of the icon. |
int | getAccessibleIconWidth() | Gets the width of the icon. |
int | getAccessibleIndexInParent() | Gets the index of this object in its accessible parent. |
Accessible | getAccessibleParent() | Gets the Accessible parent of this object. |
AccessibleRole | getAccessibleRole() | Gets the role of this object. |
AccessibleStateSet | getAccessibleStateSet() | Gets the state of this object. |
Locale | getLocale() | Returns the locale of this object. |
void | setAccessibleIconDescription(String description) | Sets the description of the icon. |
Methods declared in class javax.accessibility.AccessibleContext
[addPropertyChangeListener](../accessibility/AccessibleContext.html#addPropertyChangeListener%28java.beans.PropertyChangeListener%29), [firePropertyChange](../accessibility/AccessibleContext.html#firePropertyChange%28java.lang.String,java.lang.Object,java.lang.Object%29), [getAccessibleAction](../accessibility/AccessibleContext.html#getAccessibleAction%28%29), [getAccessibleComponent](../accessibility/AccessibleContext.html#getAccessibleComponent%28%29), [getAccessibleDescription](../accessibility/AccessibleContext.html#getAccessibleDescription%28%29), [getAccessibleEditableText](../accessibility/AccessibleContext.html#getAccessibleEditableText%28%29), [getAccessibleIcon](../accessibility/AccessibleContext.html#getAccessibleIcon%28%29), [getAccessibleName](../accessibility/AccessibleContext.html#getAccessibleName%28%29), [getAccessibleRelationSet](../accessibility/AccessibleContext.html#getAccessibleRelationSet%28%29), [getAccessibleSelection](../accessibility/AccessibleContext.html#getAccessibleSelection%28%29), [getAccessibleTable](../accessibility/AccessibleContext.html#getAccessibleTable%28%29), [getAccessibleText](../accessibility/AccessibleContext.html#getAccessibleText%28%29), [getAccessibleValue](../accessibility/AccessibleContext.html#getAccessibleValue%28%29), [removePropertyChangeListener](../accessibility/AccessibleContext.html#removePropertyChangeListener%28java.beans.PropertyChangeListener%29), [setAccessibleDescription](../accessibility/AccessibleContext.html#setAccessibleDescription%28java.lang.String%29), [setAccessibleName](../accessibility/AccessibleContext.html#setAccessibleName%28java.lang.String%29), [setAccessibleParent](../accessibility/AccessibleContext.html#setAccessibleParent%28javax.accessibility.Accessible%29)
Methods declared in class java.lang.Object
[clone](../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../java.base/java/lang/Object.html#wait%28long,int%29)
Constructor Details
AccessibleImageIcon
protected AccessibleImageIcon()
Method Details
getAccessibleRole
Gets the role of this object.
Specified by:
[getAccessibleRole](../accessibility/AccessibleContext.html#getAccessibleRole%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
an instance of AccessibleRole describing the role of the object
See Also:
AccessibleRolegetAccessibleStateSet
Gets the state of this object.
Specified by:
[getAccessibleStateSet](../accessibility/AccessibleContext.html#getAccessibleStateSet%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
an instance of AccessibleStateSet containing the current state set of the object
See Also:
AccessibleStategetAccessibleParent
Gets the Accessible parent of this object. If the parent of this object implements Accessible, this method should simply return getParent().
Overrides:
[getAccessibleParent](../accessibility/AccessibleContext.html#getAccessibleParent%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
the Accessible parent of this object -- can be null if this object does not have an Accessible parentgetAccessibleIndexInParent
public int getAccessibleIndexInParent()
Gets the index of this object in its accessible parent.
Specified by:
[getAccessibleIndexInParent](../accessibility/AccessibleContext.html#getAccessibleIndexInParent%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
the index of this object in its parent; -1 if this object does not have an accessible parent.
See Also:
getAccessibleParent()getAccessibleChildrenCount
public int getAccessibleChildrenCount()
Returns the number of accessible children in the object. If all of the children of this object implement Accessible, than this method should return the number of children of this object.
Specified by:
[getAccessibleChildrenCount](../accessibility/AccessibleContext.html#getAccessibleChildrenCount%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
the number of accessible children in the object.getAccessibleChild
public Accessible getAccessibleChild(int i)
Returns the nth Accessible child of the object.
Specified by:
[getAccessibleChild](../accessibility/AccessibleContext.html#getAccessibleChild%28int%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Parameters:
i
- zero-based index of child
Returns:
the nth Accessible child of the object
See Also:
AccessibleContext.getAccessibleChildrenCount()getLocale
Returns the locale of this object.
Specified by:
[getLocale](../accessibility/AccessibleContext.html#getLocale%28%29)
in class[AccessibleContext](../accessibility/AccessibleContext.html "class in javax.accessibility")
Returns:
the locale of this object
Throws:
[IllegalComponentStateException](../../java/awt/IllegalComponentStateException.html "class in java.awt")
- If the component does not have its own locale and has not yet been added to a containment hierarchy such that the locale can be determined from the containing parentgetAccessibleIconDescription
public String getAccessibleIconDescription()
Gets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Specified by:
[getAccessibleIconDescription](../accessibility/AccessibleIcon.html#getAccessibleIconDescription%28%29)
in interface[AccessibleIcon](../accessibility/AccessibleIcon.html "interface in javax.accessibility")
Returns:
the description of the iconsetAccessibleIconDescription
public void setAccessibleIconDescription(String description)
Sets the description of the icon. This is meant to be a brief textual description of the object. For example, it might be presented to a blind user to give an indication of the purpose of the icon.
Specified by:
[setAccessibleIconDescription](../accessibility/AccessibleIcon.html#setAccessibleIconDescription%28java.lang.String%29)
in interface[AccessibleIcon](../accessibility/AccessibleIcon.html "interface in javax.accessibility")
Parameters:
description
- the description of the icongetAccessibleIconHeight
public int getAccessibleIconHeight()
Gets the height of the icon.
Specified by:
[getAccessibleIconHeight](../accessibility/AccessibleIcon.html#getAccessibleIconHeight%28%29)
in interface[AccessibleIcon](../accessibility/AccessibleIcon.html "interface in javax.accessibility")
Returns:
the height of the icongetAccessibleIconWidth
public int getAccessibleIconWidth()
Gets the width of the icon.
Specified by:
[getAccessibleIconWidth](../accessibility/AccessibleIcon.html#getAccessibleIconWidth%28%29)
in interface[AccessibleIcon](../accessibility/AccessibleIcon.html "interface in javax.accessibility")
Returns:
the width of the icon
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2020, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.