office-gobmx/toolkit/test/accessibility/AccessibleHyperlinkHandler.java
Vladimir Glazounov a8a2b889e3 INTEGRATION: CWS vcl07 (1.3.2); FILE ADDED
2003/04/08 14:28:32 obr 1.3.2.1: re-added accessibility workbench
2003-04-11 16:08:57 +00:00

42 lines
1.2 KiB
Java

import com.sun.star.uno.UnoRuntime;
import drafts.com.sun.star.accessibility.XAccessibleContext;
import drafts.com.sun.star.accessibility.XAccessibleHyperlink;
class AccessibleHyperlinkHandler extends AccessibleTreeHandler
{
public NodeHandler createHandler (XAccessibleContext xContext)
{
XAccessibleHyperlink xLink =
(XAccessibleHyperlink) UnoRuntime.queryInterface (
XAccessibleHyperlink.class, xContext);
if (xLink != null)
return new AccessibleHyperlinkHandler (xLink);
else
return null;
}
public AccessibleHyperlinkHandler ()
{
}
public AccessibleHyperlinkHandler (XAccessibleHyperlink xLink)
{
if (xLink != null)
maChildList.setSize (1);
}
protected XAccessibleHyperlink getHyperlink(Object aObject)
{
XAccessibleHyperlink xHyperlink =
(XAccessibleHyperlink) UnoRuntime.queryInterface (
XAccessibleHyperlink.class, aObject);
return xHyperlink;
}
public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
{
return new StringNode ("interface XAccessibleHyperlink is supported", aParent);
}
}