merged tag ooo/DEV300_m102
[LibreOffice.git] / toolkit / test / accessibility / AccessibleHyperlinkHandler.java
blob674331317f7e09dc4ee718cfd3c0430d98879c04
2 import com.sun.star.uno.UnoRuntime;
3 import com.sun.star.accessibility.XAccessibleContext;
4 import com.sun.star.accessibility.XAccessibleHyperlink;
7 class AccessibleHyperlinkHandler extends AccessibleTreeHandler
9 public NodeHandler createHandler (XAccessibleContext xContext)
11 XAccessibleHyperlink xLink =
12 (XAccessibleHyperlink) UnoRuntime.queryInterface (
13 XAccessibleHyperlink.class, xContext);
14 if (xLink != null)
15 return new AccessibleHyperlinkHandler (xLink);
16 else
17 return null;
20 public AccessibleHyperlinkHandler ()
24 public AccessibleHyperlinkHandler (XAccessibleHyperlink xLink)
26 if (xLink != null)
27 maChildList.setSize (1);
30 protected XAccessibleHyperlink getHyperlink(Object aObject)
32 XAccessibleHyperlink xHyperlink =
33 (XAccessibleHyperlink) UnoRuntime.queryInterface (
34 XAccessibleHyperlink.class, aObject);
35 return xHyperlink;
38 public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
40 return new StringNode ("interface XAccessibleHyperlink is supported", aParent);