diff options
author | Andre Fischer <af@openoffice.org> | 2003-05-23 08:22:14 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2003-05-23 08:22:14 +0000 |
commit | fa2fd2a05becdd04138642fbe8f245fcd6e7f154 (patch) | |
tree | e6645c6e25dea51b8d4bb29f1f22d85249305c5c /toolkit/test | |
parent | e003f69e7c6a06deb9f66d2695eb52e69c93292a (diff) |
Changed comments
Diffstat (limited to 'toolkit/test')
-rw-r--r-- | toolkit/test/accessibility/tools/NameProvider.java | 44 |
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), |