/** Baseclassforalltreenodes.
*/ abstractclass AccessibleTreeNode
{ /// The parent node. It is null for the root node. private AccessibleTreeNode maParent;
/// The object to be displayed. privatefinal Object maDisplayObject;
/** Create a path to this node by first asking the parent for its path andthenappendingthisobject.
*/ publicvoid createPath (java.util.List<AccessibleTreeNode> aPath)
{ if (maParent != null)
maParent.createPath (aPath);
aPath.add (this);
}
public Object[] createPath ()
{
ArrayList<AccessibleTreeNode> aPath = new ArrayList<AccessibleTreeNode> (1);
createPath (aPath); return aPath.toArray();
}
publicboolean isLeaf()
{ returntrue;
}
@Override public String toString()
{ return maDisplayObject.toString();
}
/** get names of supported actions */ public String[] getActions ()
{ returnnew String[] {};
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.