1 2 import com.sun.star.uno.UnoRuntime; 3 import com.sun.star.accessibility.XAccessibleContext; 4 import com.sun.star.accessibility.XAccessibleEditableText; 5 6 7 class AccessibleEditableTextHandler extends NodeHandler 8 { 9 public NodeHandler createHandler (XAccessibleContext xContext) 10 { 11 XAccessibleEditableText xText = 12 (XAccessibleEditableText) UnoRuntime.queryInterface ( 13 XAccessibleEditableText.class, xContext); 14 if (xText != null) 15 return new AccessibleEditableTextHandler (xText); 16 else 17 return null; 18 } 19 20 public AccessibleEditableTextHandler () 21 { 22 } 23 24 public AccessibleEditableTextHandler (XAccessibleEditableText xText) 25 { 26 if (xText != null) 27 maChildList.setSize (1); 28 } 29 30 protected static XAccessibleEditableText getEText (AccTreeNode aNode) 31 { 32 return (XAccessibleEditableText) UnoRuntime.queryInterface ( 33 XAccessibleEditableText.class, aNode.getContext()); 34 } 35 36 public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex) 37 { 38 return new StringNode ("XAccessibleEditableText is supported", aParent); 39 } 40 } 41