- java.lang.Object
-
- javax.accessibility.AccessibleRelationSet
-
public class AccessibleRelationSet extends Object
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:
AccessibleRelation
-
-
Field Summary
Fields Modifier and Type Field and Description protected Vector<AccessibleRelation>
relations
Each entry in the Vector represents an AccessibleRelation.
-
Constructor Summary
Constructors Constructor and Description AccessibleRelationSet()
Creates 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
Methods Modifier and Type Method and Description boolean
add(AccessibleRelation relation)
Adds a new relation to the current relation set.void
addAll(AccessibleRelation[] relations)
Adds all of the relations to the existing relation set.void
clear()
Removes all the relations from the current relation set.boolean
contains(String key)
Returns whether the relation set contains a relation that matches the specified key.AccessibleRelation
get(String key)
Returns the relation that matches the specified key.boolean
remove(AccessibleRelation relation)
Removes a relation from the current relation set.int
size()
Returns the number of relations in the relation set.AccessibleRelation[]
toArray()
Returns the current relation set as an array of AccessibleRelationString
toString()
Creates a localized String representing all the relations in the set using the default locale.
-
-
-
Field Detail
-
relations
protected Vector<AccessibleRelation> relations
Each entry in the Vector represents an AccessibleRelation.
-
-
Constructor Detail
-
AccessibleRelationSet
public AccessibleRelationSet()
Creates a new empty relation set.
-
AccessibleRelationSet
public AccessibleRelationSet(AccessibleRelation[] relations)
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 of AccessibleRelation describing the relation set.
-
-
Method Detail
-
add
public boolean add(AccessibleRelation relation)
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:
- true if relation is added to the relation set; false if the relation set is unchanged
-
addAll
public void addAll(AccessibleRelation[] relations)
Adds all of the relations to the existing relation set. Duplicate entries are ignored.- Parameters:
relations
- AccessibleRelation array describing the relation set.
-
remove
public boolean remove(AccessibleRelation relation)
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 be false. If the relation is in the relation set, it will be removed from the set and the return value will be true.- Parameters:
relation
- the relation to remove from the relation set- Returns:
- true if the relation is in the relation set; false if 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.
-
contains
public boolean contains(String key)
Returns whether the relation set contains a relation that matches the specified key.- Parameters:
key
- the AccessibleRelation key- Returns:
- true if the relation is in the relation set; otherwise false
-
get
public AccessibleRelation get(String key)
Returns the relation that matches the specified key.- Parameters:
key
- the AccessibleRelation key- Returns:
- the relation, if one exists, that matches the specified key. Otherwise, null is returned.
-
toArray
public AccessibleRelation[] toArray()
Returns the current relation set as an array of AccessibleRelation- Returns:
- AccessibleRelation array contacting the current relation.
-
toString
public String toString()
Creates a localized String representing all the relations in the set using the default locale.- Overrides:
toString
in classObject
- Returns:
- comma separated localized String
- See Also:
AccessibleBundle.toDisplayString(java.lang.String, java.util.Locale)
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
22/12/2024 10:16:03 Cette version de la page est en cache (à la date du 22/12/2024 10:16:03) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 01/09/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/accessibility/AccessibleRelationSet.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.