}
public AccessibleTreeNode createChild (AccessibleTreeNode aParent, int nIndex)
{
AccessibleTreeNode aChild = null;
XAccessibleText xText = null;
if (aParent instanceof AccTreeNode)
xText = ((AccTreeNode)aParent).getText();
try
{
if( xText != null )
{
switch( nIndex )
{
case 0:
aChild = new StringNode (xText.getText(), aParent);
break;
case 1:
aChild = new StringNode ("# chars: " + xText.getCharacterCount(), aParent);
break;
case 2:
aChild = new StringNode (characters( xText ), aParent);
break;
case 3:
aChild = new StringNode ("selection: "
+ "[" + xText.getSelectionStart()
+ "," + xText.getSelectionEnd()
+ "] \"" + xText.getSelectedText() + "\"",
aParent);
break;
case 4:
aChild = new StringNode ("getCaretPosition: " + xText.getCaretPosition(), aParent);
break;
case 5:
{
VectorNode aVec = new VectorNode("portions", aParent);
aChild = aVec;