Class AccessibleRelationSet
java.lang.Object
javax.accessibility.AccessibleRelationSet
Class
AccessibleRelationSet determines a component's relation set.
The relation set of a component is a set of AccessibleRelation
objects that describe the component's relationships with other components.- Since:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vector<AccessibleRelation> Each entry in theVectorrepresents anAccessibleRelation. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty relation set.AccessibleRelationSet(AccessibleRelation[] relations) Creates a new relation with the initial set of relations contained in the array of relations passed in. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(AccessibleRelation relation) Adds a new relation to the current relation set.voidaddAll(AccessibleRelation[] relations) Adds all of the relations to the existing relation set.voidclear()Removes all the relations from the current relation set.booleanReturns whether the relation set contains a relation that matches the specified key.Returns the relation that matches the specified key.booleanremove(AccessibleRelation relation) Removes a relation from the current relation set.intsize()Returns the number of relations in the relation set.toArray()Returns the current relation set as an array ofAccessibleRelation.toString()Creates a localized string representing all the relations in the set using the default locale.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
relations
Each entry in theVectorrepresents anAccessibleRelation.- See Also:
-
-
Constructor Details
-
AccessibleRelationSet
public AccessibleRelationSet()Creates a new empty relation set. -
AccessibleRelationSet
Creates a new relation with the initial set of relations contained in the array of relations passed in. Duplicate entries are ignored.- Parameters:
relations- an array ofAccessibleRelationdescribing the relation set
-
-
Method Details
-
add
Adds a new relation to the current relation set. If the relation is already in the relation set, the target(s) of the specified relation is merged with the target(s) of the existing relation. Otherwise, the new relation is added to the relation set.- Parameters:
relation- the relation to add to the relation set- Returns:
trueif relation is added to the relation set;falseif the relation set is unchanged
-
addAll
Adds all of the relations to the existing relation set. Duplicate entries are ignored.- Parameters:
relations-AccessibleRelationarray describing the relation set
-
remove
Removes a relation from the current relation set. If the relation is not in the set, the relation set will be unchanged and the return value will befalse. If the relation is in the relation set, it will be removed from the set and the return value will betrue.- Parameters:
relation- the relation to remove from the relation set- Returns:
trueif the relation is in the relation set;falseif the relation set is unchanged
-
clear
public void clear()Removes all the relations from the current relation set. -
size
public int size()Returns the number of relations in the relation set.- Returns:
- the number of relations in the relation set
-
contains
Returns whether the relation set contains a relation that matches the specified key.- Parameters:
key- theAccessibleRelationkey- Returns:
trueif the relation is in the relation set; otherwisefalse
-
get
Returns the relation that matches the specified key.- Parameters:
key- theAccessibleRelationkey- Returns:
- the relation, if one exists, that matches the specified key.
Otherwise,
nullis returned.
-
toArray
Returns the current relation set as an array ofAccessibleRelation.- Returns:
AccessibleRelationarray contacting the current relation
-
toString
-