javax.accessibility
Class AccessibleStateSet

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.accessibility.AccessibleStateSet

public class AccessibleStateSet
extends Object sample code for java.lang.Object definition code for java.lang.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 sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState

Field Summary
protected  Vector sample code for java.util.Vector definition code for java.util.Vector <AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState > states sample code for javax.accessibility.AccessibleStateSet.states definition code for javax.accessibility.AccessibleStateSet.states
          Each entry in the Vector represents an AccessibleState.
 
Constructor Summary
AccessibleStateSet sample code for javax.accessibility.AccessibleStateSet.AccessibleStateSet() definition code for javax.accessibility.AccessibleStateSet.AccessibleStateSet() ()
          Creates a new empty state set.
AccessibleStateSet sample code for javax.accessibility.AccessibleStateSet.AccessibleStateSet(javax.accessibility.AccessibleState[]) definition code for javax.accessibility.AccessibleStateSet.AccessibleStateSet(javax.accessibility.AccessibleState[]) (AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] states)
          Creates a new state with the initial set of states contained in the array of states passed in.
 
Method Summary
 boolean add sample code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState) (AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState  state)
          Adds a new state to the current state set if it is not already present.
 void addAll sample code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[]) definition code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[]) (AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] states)
          Adds all of the states to the existing state set.
 void clear sample code for javax.accessibility.AccessibleStateSet.clear() definition code for javax.accessibility.AccessibleStateSet.clear() ()
          Removes all the states from the current state set.
 boolean contains sample code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState) (AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState  state)
          Checks if the current state is in the state set.
 boolean remove sample code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState) (AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState  state)
          Removes a state from the current state set.
 AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] toArray sample code for javax.accessibility.AccessibleStateSet.toArray() definition code for javax.accessibility.AccessibleStateSet.toArray() ()
          Returns the current state set as an array of AccessibleState
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.accessibility.AccessibleStateSet.toString() definition code for javax.accessibility.AccessibleStateSet.toString() ()
          Creates a localized String representing all the states in the set using the default locale.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

states sample code for javax.accessibility.AccessibleStateSet.states

protected Vector sample code for java.util.Vector definition code for java.util.Vector <AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState > states
Each entry in the Vector represents an AccessibleState.

See Also:
add(javax.accessibility.AccessibleState) sample code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState) , addAll(javax.accessibility.AccessibleState[]) sample code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[]) definition code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[]) , remove(javax.accessibility.AccessibleState) sample code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState) , contains(javax.accessibility.AccessibleState) sample code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState) , toArray() sample code for javax.accessibility.AccessibleStateSet.toArray() definition code for javax.accessibility.AccessibleStateSet.toArray() , clear() sample code for javax.accessibility.AccessibleStateSet.clear() definition code for javax.accessibility.AccessibleStateSet.clear()
Constructor Detail

AccessibleStateSet sample code for javax.accessibility.AccessibleStateSet() definition code for javax.accessibility.AccessibleStateSet()

public AccessibleStateSet()
Creates a new empty state set.


AccessibleStateSet sample code for javax.accessibility.AccessibleStateSet(javax.accessibility.AccessibleState[]) definition code for javax.accessibility.AccessibleStateSet(javax.accessibility.AccessibleState[])

public AccessibleStateSet(AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] states)
Creates a new state with the initial set of states contained in the array of states passed in. Duplicate entries are ignored.

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

add sample code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.add(javax.accessibility.AccessibleState)

public boolean add(AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.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.

Parameters:
state - the state to add to the state set
Returns:
true if state is added to the state set; false if the state set is unchanged

addAll sample code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[]) definition code for javax.accessibility.AccessibleStateSet.addAll(javax.accessibility.AccessibleState[])

public void addAll(AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] states)
Adds all of the states to the existing state set. Duplicate entries are ignored.

Parameters:
states - AccessibleState array describing the state set.

remove sample code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.remove(javax.accessibility.AccessibleState)

public boolean remove(AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.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.

Parameters:
state - the state to remove from the state set
Returns:
true if the state is in the state set; false if the state set will be unchanged

clear sample code for javax.accessibility.AccessibleStateSet.clear() definition code for javax.accessibility.AccessibleStateSet.clear()

public void clear()
Removes all the states from the current state set.


contains sample code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState) definition code for javax.accessibility.AccessibleStateSet.contains(javax.accessibility.AccessibleState)

public boolean contains(AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState  state)
Checks 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

toArray sample code for javax.accessibility.AccessibleStateSet.toArray() definition code for javax.accessibility.AccessibleStateSet.toArray()

public AccessibleState sample code for javax.accessibility.AccessibleState definition code for javax.accessibility.AccessibleState [] toArray()
Returns the current state set as an array of AccessibleState

Returns:
AccessibleState array containing the current state.

toString sample code for javax.accessibility.AccessibleStateSet.toString() definition code for javax.accessibility.AccessibleStateSet.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Creates a localized String representing all the states in the set using the default locale.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
comma separated localized String
See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale) sample code for javax.accessibility.AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale) definition code for javax.accessibility.AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)