All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.accessibility.AccessibleStateSet

java.lang.Object
   |
   +----com.sun.java.accessibility.AccessibleStateSet

public class AccessibleStateSet
extends Object

Class used to determine the state set of a component. The state set of a component is a set of AccessibleState objects and describes the current overall state of the object, such as whether it is enabled, has focus, etc.


Variable Index

 o states
Each entry in the Vector represents an AccessibleState.

Constructor Index

 o AccessibleStateSet()
Create a new empty state set.
 o AccessibleStateSet(AccessibleState[])
Create a new state with the initial set of states contained in the array of states passed in.

Method Index

 o add(AccessibleState)
Add a new state to the current state set if it is not already present.
 o addAll(AccessibleState[])
Add all of the states to the existing state set.
 o clear()
Remove all the states from the current state set.
 o contains(AccessibleState)
See if the current state is in the state set.
 o remove(AccessibleState)
Remove a state from the current state set.
 o toArray()
Returns the current state set as an array of AccessibleState
 o toString()
Return a comma separated localized String representing all the modes set in the state using the default locale.

Variables

 o states
 protected Vector states
Each entry in the Vector represents an AccessibleState.

See Also:
add, addAll, remove, contains, toArray, clear

Constructors

 o AccessibleStateSet
 public AccessibleStateSet()
Create a new empty state set.

 o AccessibleStateSet
 public AccessibleStateSet(AccessibleState states[])
Create a new state with the initial set of states contained in the array of states passed in. Duplicate entries are ignored.

Parameters:
state - an array of AccessibleState describing the state set.

Methods

 o add
 public boolean add(AccessibleState state)
Add 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.

Parameters:
state - the state to add to the state set
 o addAll
 public void addAll(AccessibleState states[])
Add all of the states to the existing state set. Duplicate entries are ignored.

Parameters:
state - an array of AccessibleState describing the state set.
 o remove
 public boolean remove(AccessibleState state)
Remove 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.

Parameters:
state - the state to remove from the state set
 o clear
 public void clear()
Remove all the states from the current state set.

 o contains
 public boolean contains(AccessibleState state)
See if the current state is in the state set.

Parameters:
state - the state
Returns:
true if the state is in the state set; otherwise false
 o toArray
 public AccessibleState[] toArray()
Returns the current state set as an array of AccessibleState

Returns:
the current state as an array of AccessibleState.
 o toString
 public String toString()
Return a comma separated localized String representing all the modes set in the state using the default locale.

Overrides:
toString in class Object
See Also:
toDisplayString

All Packages  Class Hierarchy  This Package  Previous  Next  Index