7da89d9f3b
2003/04/08 14:28:33 obr 1.3.2.1: re-added accessibility workbench
42 lines
1.2 KiB
Java
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);
|
|
}
|
|
}
|