Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
javax.accessibility

Class AccessibleStateSet

java.lang.Object
|
+--javax.accessibility.AccessibleStateSet


public class AccessibleStateSet

extends Object

Describes all elements of an accessible object's state. For example, an object may be enabled and have focus.

Since:Author:See Also:

Field Summary

java.util.Vectorstates

The list of states, should be instances of AccessibleState.

Constructor Summary

AccessibleStateSet()

Create an empty state set.
AccessibleStateSet(javax.accessibility.AccessibleState[] states)

Create a state set initialized with the given states, duplicates are ignored.

Method Summary

booleanadd(javax.accessibility.AccessibleState state)

Add a new state to the current set.
voidaddAll(javax.accessibility.AccessibleState[] array)

Add all of the states to the current set.
voidclear()

Clear all states in the set.
booleancontains(javax.accessibility.AccessibleState state)

Check if the current state is in the set.
booleanremove(javax.accessibility.AccessibleState state)

Remove a state from the set.
javax.accessibility.AccessibleState[]toArray()

Return the state set as an array.
java.lang.StringtoString()

Return a localized, comma-separated string representing all states in the set.

Field Details

states

protected Vector states

The list of states, should be instances of AccessibleState. Don't set this to null.

See Also:


Constructor Details

AccessibleStateSet

public AccessibleStateSet()

Create an empty state set.


AccessibleStateSet

public AccessibleStateSet(javax.accessibility.AccessibleState[] states)

Create a state set initialized with the given states, duplicates are ignored.

Parameters:

Throws:


Method Details

add

public boolean add(javax.accessibility.AccessibleState state)

Add a new state to the current set. Return true if the state was added, as duplicates are ignored. Entering a null state will cause problems later, so don't do it.

Parameters:

Returns:


addAll

public void addAll(javax.accessibility.AccessibleState[] array)

Add all of the states to the current set. Duplicates are ignored. Entering a null state will cause problems later, so don't do it.

Parameters:

Throws:


clear

public void clear()

Clear all states in the set.


contains

public boolean contains(javax.accessibility.AccessibleState state)

Check if the current state is in the set.

Parameters:

Returns:


remove

public boolean remove(javax.accessibility.AccessibleState state)

Remove a state from the set. If a state was removed, return true.

Parameters:

Returns:


toArray

public AccessibleState[] toArray()

Return the state set as an array.

Returns:


toString

public String toString()

Return a localized, comma-separated string representing all states in the set. This is in arbitrary order.

Returns:

See Also: