From fa2fd2a05becdd04138642fbe8f245fcd6e7f154 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 23 May 2003 08:22:14 +0000 Subject: Changed comments --- toolkit/test/accessibility/tools/NameProvider.java | 44 +++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'toolkit/test') 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 AccessibleStateType + 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 AccessibleEventId + 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 AccessibleRole + 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 AccessibleRelationType + 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), -- cgit