public class AccessibleStateSet extends Object
Class 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.
AccessibleState
protected Vector<AccessibleState> states
Each entry in the Vector represents an AccessibleState.
public AccessibleStateSet()
Creates a new empty state set.
public AccessibleStateSet(AccessibleState[] states)
Creates a new state with the initial set of states contained in the array of states passed in. Duplicate entries are ignored.
states
- an array of AccessibleState describing the state set.
public boolean add(AccessibleState state)
Adds a new state to the current state set if it is not already present. If the state is already in the state set, the state set is unchanged and the return value is false. Otherwise, the state is added to the state set and the return value is true.
state
- the state to add to the state set
public void addAll(AccessibleState[] states)
Adds all of the states to the existing state set. Duplicate entries are ignored.
states
- AccessibleState array describing the state set.
public boolean remove(AccessibleState state)
Removes a state from the current state set. If the state is not in the set, the state set will be unchanged and the return value will be 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 set
public void clear()
Removes all the states from the current state set.
public boolean contains(AccessibleState state)
Checks if the current state is in the state set.
state
- the state
public AccessibleState[] toArray()
Returns the current state set as an array of AccessibleState
public String toString()
Creates a localized String representing all the states in the set using the default locale.
toString
in class Object
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4