|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
proper.database.TableTreeNode
public class TableTreeNode
A specialized TreeNode class that handles Table-Objects and provides some methods for conveniencs.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
TableTreeNode()
initializes the node with no table |
|
TableTreeNode(java.lang.Object o)
initializes the node with the given table name (= String) or table (= Table) |
Method Summary | |
---|---|
java.util.Vector |
getAllNodes()
returns all the nodes in the subtree including this node (depth-first) |
java.util.Vector |
getAllTables()
returns a vector with all the tables in the subtree, including this node (depth-first) |
Table |
getChildTableAt(int index)
returns the table of the specified child |
Table |
getTable()
returns the Table object of this node |
java.util.Vector |
getTablesAlongPath()
returns all the tables that are along the path to the root |
boolean |
isInPath(Table t)
checks whether the given table is somewhere on the path to the root |
static TableTreeNode |
parseTreeString(java.lang.String tree)
parses the given tree in string representation and returns it in a TreeNode Structure, e.g.: |
void |
setTable(java.lang.Object o)
sets the Table, either a name (= String) or an object (= Table) |
java.lang.String |
toString()
returns the name of the table |
java.lang.String |
toString(boolean all)
returns either the whole subtree (including itself) as a string representation (= TRUE) or only the table (= FALSE) |
java.lang.String |
toTreeString()
returns itself and the subtree underneath in a string representation that can be parsed with the parseTree(String) method |
java.lang.String |
toTreeString(boolean includeSizes)
returns itself and the subtree underneath in a string representation that can be parsed with the parseTree(String) method |
static java.lang.String |
toTreeString(TableTreeNode node)
returns the node and the subtree underneath in a string representation that can be parsed with the parseTree(String) method |
static java.lang.String |
toTreeString(TableTreeNode node,
boolean includeSizes)
returns the node and the subtree underneath in a string representation that can be parsed with the parseTree(String) method |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableTreeNode()
public TableTreeNode(java.lang.Object o)
Method Detail |
---|
public void setTable(java.lang.Object o)
public Table getTable()
public Table getChildTableAt(int index)
public boolean isInPath(Table t)
public java.util.Vector getTablesAlongPath()
public java.util.Vector getAllNodes()
public java.util.Vector getAllTables()
public static TableTreeNode parseTreeString(java.lang.String tree)
a[b,c[d,e]]represents the following tree:
a |-b |-c | |-d | |-eIt is also possible to include the sizes in the string (if a specific) ordering is desired, e.g.
a(10)[b(2),c(12)[d(3),e(1)]]
toTreeString()
,
toTreeString(boolean)
public java.lang.String toTreeString()
parseTree(String)
method
parseTreeString(String)
public java.lang.String toTreeString(boolean includeSizes)
parseTree(String)
method
includeSizes
- whether to include the sizes, too (in parentheses)parseTreeString(String)
public static java.lang.String toTreeString(TableTreeNode node)
parseTree(String)
method
node
- the node to represent in String notationparseTreeString(String)
public static java.lang.String toTreeString(TableTreeNode node, boolean includeSizes)
parseTree(String)
method
node
- the node to get the string notation fromincludeSizes
- whether to include the sizes, too (in parentheses)parseTreeString(String)
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String toString(boolean all)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |