|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.swing.components.treetable.DefaultTreeTableNode
public class DefaultTreeTableNode
Default implementation for the TreeTableNode, which is used in conjunction
with the DefaultTreeTableModel
| Field Summary | |
|---|---|
protected java.util.Vector |
children
TreeTableNode children. |
protected java.util.List |
columnObjects
The column objects. |
static javax.swing.JLabel |
EMPTY_COLUMN
Empty label that is used to replace the object contained in the column vector, when that object is removed. |
protected DefaultTreeTableNode |
parent
The Parent TreeTableNode to this one. |
protected java.awt.Dimension |
preferredSize
The preferred size for this node. |
| Constructor Summary | |
|---|---|
DefaultTreeTableNode()
|
|
| Method Summary | |
|---|---|
void |
addChild(DefaultTreeTableNode child)
Adds a TreeTable node as an child of the receiver node. |
void |
addColumn(java.lang.Object columnValue)
Adds a column object to this node. |
java.util.Enumeration |
children()
Returns the children of the receiver as an Enumeration. |
boolean |
getAllowsChildren()
Returns true if the receiver allows children. |
javax.swing.tree.TreeNode |
getChildAt(int childIndex)
Returns the child TreeNode at index childIndex. |
int |
getChildCount()
Returns the number of children TreeNodes the receiver contains. |
int |
getColumnCount()
Returns the number of column objects contained in the receiver node. |
java.lang.Object |
getColumnValue(int index)
Returns the column value for a specified index for the receiver node. |
int |
getIndex(javax.swing.tree.TreeNode node)
Returns the index of node in the receivers children. |
int |
getLastHeight()
Returns the lastHeight used by the JTreeTable |
java.lang.String |
getNodeText()
Gets the text field to be displayed for the node. |
javax.swing.tree.TreeNode |
getParent()
Returns the parent TreeNode of the receiver. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred height of the node in the tree. |
void |
insertChild(DefaultTreeTableNode child,
int index)
Adds a child at the given index. |
boolean |
isLeaf()
Determines if the receiver node is a leaf. |
boolean |
removeChild(DefaultTreeTableNode child)
Removes the child node from the receiver node. |
void |
removeChildren()
Removes all child nodes from the receiver node. |
boolean |
removeColumn(java.lang.Object columnValue)
Removes a column object from this node. |
void |
setColumnValue(int index,
java.lang.Object columnValue)
Sets the object contained by column with specified index with the specified object. |
void |
setLastHeight(int lastHeight)
Sets the lastHeight by the JTreeTable This method should never be called
directly and is actually only meant for internal use by the JTreeTable |
void |
setParent(DefaultTreeTableNode parent)
Set the parent node for the receiver node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final javax.swing.JLabel EMPTY_COLUMN
protected java.util.List columnObjects
protected java.awt.Dimension preferredSize
protected java.util.Vector children
protected DefaultTreeTableNode parent
| Constructor Detail |
|---|
public DefaultTreeTableNode()
| Method Detail |
|---|
public java.lang.String getNodeText()
getNodeText in interface TreeTableNodepublic java.awt.Dimension getPreferredSize()
getPreferredSize in interface TreeTableNodepublic javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt in interface javax.swing.tree.TreeNodechildIndex - The index of the child of interest
public int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodepublic javax.swing.tree.TreeNode getParent()
getParent in interface javax.swing.tree.TreeNodepublic int getIndex(javax.swing.tree.TreeNode node)
getIndex in interface javax.swing.tree.TreeNodenode - The node for which the index is required
public boolean getAllowsChildren()
getAllowsChildren in interface javax.swing.tree.TreeNodepublic boolean isLeaf()
isLeaf in interface javax.swing.tree.TreeNodepublic java.util.Enumeration children()
children in interface javax.swing.tree.TreeNodepublic void addChild(DefaultTreeTableNode child)
child - The child node to be addedpublic boolean removeChild(DefaultTreeTableNode child)
child - The child node to be removed
public void removeChildren()
public void insertChild(DefaultTreeTableNode child,
int index)
child - The DefaultTreeTableNode child node to be addedindex - The index where the child is to be addedpublic void setParent(DefaultTreeTableNode parent)
parent - The parent DefaultTreeTableNodepublic void addColumn(java.lang.Object columnValue)
columnValue - The column object to be addedpublic boolean removeColumn(java.lang.Object columnValue)
columnValue - The column object to be removed
public void setColumnValue(int index,
java.lang.Object columnValue)
addColumn(java.lang.Object) method.
index - The column indexcolumnValue - The new object to be set for the specified column indexpublic java.lang.Object getColumnValue(int index)
getColumnValue in interface TreeTableNodeindex - The column index
public int getColumnCount()
public int getLastHeight()
JTreeTable
getLastHeight in interface TreeTableNodepublic void setLastHeight(int lastHeight)
JTreeTable This method should never be called
directly and is actually only meant for internal use by the JTreeTable
setLastHeight in interface TreeTableNodelastHeight - The lastHeight to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||