office-gobmx/toolkit/test/accessibility/AccessibleEditableTextHandler.java
Vladimir Glazounov 31876ffab1 INTEGRATION: CWS vcl07 (1.3.2); FILE ADDED
2003/04/08 14:28:31 obr 1.3.2.1: re-added accessibility workbench
2003-04-11 16:08:39 +00:00

40 lines
1.2 KiB
Java

import com.sun.star.uno.UnoRuntime;
import drafts.com.sun.star.accessibility.XAccessibleContext;
import drafts.com.sun.star.accessibility.XAccessibleEditableText;
class AccessibleEditableTextHandler extends NodeHandler
{
public NodeHandler createHandler (XAccessibleContext xContext)
{
XAccessibleEditableText xText =
(XAccessibleEditableText) UnoRuntime.queryInterface (
XAccessibleEditableText.class, xContext);
if (xText != null)
return new AccessibleEditableTextHandler (xText);
else
return null;
}
public AccessibleEditableTextHandler ()
{
}
public AccessibleEditableTextHandler (XAccessibleEditableText xText)
{
if (xText != null)
maChildList.setSize (1);
}
protected static XAccessibleEditableText getEText (AccTreeNode aNode)
{
return (XAccessibleEditableText) UnoRuntime.queryInterface (
XAccessibleEditableText.class, aNode.getContext());
}
public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex)
{
return new StringNode ("XAccessibleEditableText is supported", aParent);
}
}