1 2 import com.sun.star.uno.UnoRuntime; 3 import com.sun.star.accessibility.XAccessibleContext; 4 import com.sun.star.accessibility.XAccessibleHyperlink; 5 6 7 class AccessibleHyperlinkHandler extends AccessibleTreeHandler 8 { 9 public NodeHandler createHandler (XAccessibleContext xContext) 10 { 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; 18 } 19 20 public AccessibleHyperlinkHandler () 21 { 22 } 23 24 public AccessibleHyperlinkHandler (XAccessibleHyperlink xLink) 25 { 26 if (xLink != null) 27 maChildList.setSize (1); 28 } 29 30 protected XAccessibleHyperlink getHyperlink(Object aObject) 31 { 32 XAccessibleHyperlink xHyperlink = 33 (XAccessibleHyperlink) UnoRuntime.queryInterface ( 34 XAccessibleHyperlink.class, aObject); 35 return xHyperlink; 36 } 37 38 public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex) 39 { 40 return new StringNode ("interface XAccessibleHyperlink is supported", aParent); 41 } 42 } 43