|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
proper.database.ColumnTreeNode
public class ColumnTreeNode
A specialized TreeNode class that handles Column-Objects and provides some methods for conveniencs.
Field Summary |
---|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
ColumnTreeNode()
initializes the node with no column |
|
ColumnTreeNode(java.lang.Object o)
initializes the node with the given column name (= String) or column (= Column) |
Method Summary | |
---|---|
java.util.Vector |
getAllColumns()
returns a vector with all the columns in the subtree, including this node (depth-first) |
java.util.Vector |
getAllNodes()
returns all the nodes in the subtree including this node (depth-first) |
Column |
getChildColumnAt(int index)
returns the column of the specified child |
Column |
getColumn()
returns the Column object of this node |
java.util.Vector |
getColumnsAlongPath()
returns all the columns that are along the path to the root |
boolean |
isInPath(Column c)
checks whether the given column is somewhere on the path to the root |
static ColumnTreeNode |
parseTreeString(java.lang.String tree)
parses the given tree in string representation and returns it in a TreeNode Structure, e.g.: |
void |
setColumn(java.lang.Object o)
sets the Column, either a name (= String) or an object (= Column) |
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 include)
returns itself and the subtree underneath in a string representation that can be parsed with the parseTree(String) method |
static java.lang.String |
toTreeString(ColumnTreeNode 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(ColumnTreeNode node,
boolean include)
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 ColumnTreeNode()
public ColumnTreeNode(java.lang.Object o)
Method Detail |
---|
public void setColumn(java.lang.Object o)
public Column getColumn()
public Column getChildColumnAt(int index)
public boolean isInPath(Column c)
public java.util.Vector getColumnsAlongPath()
public java.util.Vector getAllNodes()
public java.util.Vector getAllColumns()
public static ColumnTreeNode 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 type, typename (DB-specific) and size in the string (if a specific) ordering is desired, e.g.
a(1;CHAR;4)[b(8;DOUBLE;4),c(5;SMALLINT;2)[d(12;VARCHAR;255),e(12;VARCHAR;20)]]
toTreeString()
,
toTreeString(boolean)
public java.lang.String toTreeString()
parseTree(String)
method
parseTreeString(String)
public java.lang.String toTreeString(boolean include)
parseTree(String)
method
include
- whether to include the type, typename, size, too (in
parentheses)parseTreeString(String)
public static java.lang.String toTreeString(ColumnTreeNode node)
parseTree(String)
method
node
- the node to represent in String notationparseTreeString(String)
public static java.lang.String toTreeString(ColumnTreeNode node, boolean include)
parseTree(String)
method
node
- the node to get the string notation frominclude
- whether to include the type, typename, size, 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 |