office-gobmx/toolkit/test/accessibility/AccessibleHypertextHandler.java
Vladimir Glazounov 7da89d9f3b INTEGRATION: CWS vcl07 (1.3.2); FILE ADDED
2003/04/08 14:28:33 obr 1.3.2.1: re-added accessibility workbench
2003-04-11 16:09:06 +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.XAccessibleHypertext;
class AccessibleHypertextHandler extends AccessibleTreeHandler
{
public NodeHandler createHandler (XAccessibleContext xContext)
{
XAccessibleHypertext xText =
(XAccessibleHypertext) UnoRuntime.queryInterface (
XAccessibleHypertext.class, xContext);
if (xText != null)
return new AccessibleHypertextHandler (xText);
else
return null;
}
public AccessibleHypertextHandler ()
{
}
public AccessibleHypertextHandler (XAccessibleHypertext xText)
{
if (xText != null)
maChildList.setSize (1);
}
protected static XAccessibleHypertext getHypertext (AccTreeNode aNode)
{
XAccessibleHypertext xHypertext =
(XAccessibleHypertext) UnoRuntime.queryInterface (
XAccessibleHypertext.class, aNode.getContext());
return xHypertext;
}
public AccessibleTreeNode getChild (AccessibleTreeNode aParent, int nIndex)
{
return new StringNode ("interface XAccessibleHypertext is supported", aParent);
}
}