AccessibleStateSet (Java SE 15 & JDK 15) (original) (raw)


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.

See Also:

AccessibleState

Fields

Modifier and Type Field Description
protected Vector<AccessibleState> states Each entry in the Vector represents an AccessibleState.

Constructors

Constructor Description
AccessibleStateSet() Creates a new empty state set.
AccessibleStateSet​(AccessibleState[] states) 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​(AccessibleState state) Adds a new state to the current state set if it is not already present.
void addAll​(AccessibleState[] states) Adds all of the states to the existing state set.
void clear() Removes all the states from the current state set.
boolean contains​(AccessibleState state) Checks if the current state is in the state set.
boolean remove​(AccessibleState state) 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.