summaryrefslogtreecommitdiff
path: root/toolkit/test
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/test')
-rw-r--r--toolkit/test/accessibility/tools/NameProvider.java44
1 files changed, 43 insertions, 1 deletions
diff --git a/toolkit/test/accessibility/tools/NameProvider.java b/toolkit/test/accessibility/tools/NameProvider.java
index 918e2e1cd9a2..615c00f6dded 100644
--- a/toolkit/test/accessibility/tools/NameProvider.java
+++ b/toolkit/test/accessibility/tools/NameProvider.java
@@ -11,26 +11,66 @@ import com.sun.star.accessibility.AccessibleRelationType;
*/
public class NameProvider
{
+ /** Return the name of the specified state.
+ @param nStateId
+ Id of the state for which to return its name. This is one of
+ the ids listed in the <type>AccessibleStateType</const>
+ constants group.
+ @return
+ Returns the name of the specified state or an empty string if an
+ invalid / unknown state id was given.
+ */
public static String getStateName (int nStateId)
{
return (String)maStateMap.get (new Integer(nStateId));
}
+
+ /** Return the name of the specified event.
+ @param nEventId
+ Id of the event type for which to return its name. This is one
+ of the ids listed in the <type>AccessibleEventId</const>
+ constants group.
+ @return
+ Returns the name of the specified event type or an empty string
+ if an invalid / unknown event id was given.
+ */
public static String getEventName (int nEventId)
{
return (String)maEventMap.get (new Integer(nEventId));
}
+
+ /** Return the name of the specified role.
+ @param nRole
+ Id of the role for which to return its name. This is one of
+ the ids listed in the <type>AccessibleRole</const>
+ constants group.
+ @return
+ Returns the name of the specified role or an empty string if an
+ invalid / unknown role id was given.
+ */
public static String getRoleName (int nRole)
{
return (String)maRoleMap.get (new Integer(nRole));
}
+
+ /** Return the name of the specified relation.
+ @param nRelation
+ Id of the relation for which to return its name. This is one of
+ the ids listed in the <type>AccessibleRelationType</const>
+ constants group.
+ @return
+ Returns the name of the specified relation type or an empty
+ string if an invalid / unknown role id was given.
+ */
public static String getRelationName (int nRelation)
{
return (String)maRelationMap.get (new Integer(nRelation));
}
+
private static HashMap maStateMap = new HashMap();
private static HashMap maEventMap = new HashMap();
private static HashMap maRoleMap = new HashMap();
@@ -67,7 +107,9 @@ public class NameProvider
maStateMap.put (new Integer (AccessibleStateType.TRANSIENT), "TRANSIENT");
maStateMap.put (new Integer (AccessibleStateType.VERTICAL), "VERTICAL");
maStateMap.put (new Integer (AccessibleStateType.VISIBLE), "VISIBLE");
- maStateMap.put (new Integer (AccessibleStateType.MANAGES_DESCENDANTS),"MANAGES_DESCENDANTS");
+ maStateMap.put (new Integer (AccessibleStateType.MANAGES_DESCENDANTS),
+ "MANAGES_DESCENDANTS");
+ // maStateMap.put (new Integer (AccessibleStateType.INCONSISTENT),"INCONSISTENT");
maEventMap.put (new Integer (0),