public class AccessibleStateSet extends Object
AccessibleStateSet
determines a component's state set. The state set of a component is a set of AccessibleState
objects and descriptions. E.G., The current overall state of the object, such as whether it is enabled, has focus, etc.Modifier and Type | Field | Description |
---|---|---|
protected Vector |
states |
Each entry in the Vector represents an AccessibleState . |
Constructor | Description |
---|---|
AccessibleStateSet() |
Creates a new empty state set. |
AccessibleStateSet |
Creates a new state with the initial set of states contained in the array of states passed in. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
add |
Adds a new state to the current state set if it is not already present. |
void |
addAll |
Adds all of the states to the existing state set. |
void |
clear() |
Removes all the states from the current state set. |
boolean |
contains |
Checks if the current state is in the state set. |
boolean |
remove |
Removes a state from the current state set. |
AccessibleState[] |
toArray() |
Returns the current state set as an array of AccessibleState . |
String |
toString() |
Creates a localized string representing all the states in the set using the default locale. |
protected Vector<AccessibleState> states
Vector
represents an AccessibleState
.public AccessibleStateSet()
public AccessibleStateSet(AccessibleState[] states)
states
- an array of AccessibleState
describing the state setpublic boolean add(AccessibleState state)
false
. Otherwise, the state is added to the state set and the return value is true
.state
- the state to add to the state settrue
if state is added to the state set; false
if the state set is unchangedpublic void addAll(AccessibleState[] states)
states
- AccessibleState
array describing the state setpublic boolean remove(AccessibleState state)
false
. If the state is in the state set, it will be removed from the set and the return value will be true
.state
- the state to remove from the state settrue
if the state is in the state set; false
if the state set will be unchangedpublic void clear()
public boolean contains(AccessibleState state)
state
- the statetrue
if the state is in the state set; otherwise false
public AccessibleState[] toArray()
AccessibleState
.AccessibleState
array containing the current statepublic String toString()
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/accessibility/AccessibleStateSet.html