|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTree
org.bounce.QTree
public class QTree
Extend the JTree class, this tree allows for:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTree |
|---|
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
QTree()
Default constructor, calls super. |
|
QTree(Hashtable value)
Constructor, calls super. |
|
QTree(Object[] value)
Constructor, calls super. |
|
QTree(TreeModel model)
Constructor, calls super. |
|
QTree(TreeNode root)
Constructor, calls super. |
|
QTree(TreeNode root,
boolean asksAllowsChildren)
Constructor, calls super. |
|
QTree(Vector value)
Constructor, calls super. |
|
| Method Summary | |
|---|---|
void |
collapseAll()
Collapses all the nodes in the tree. |
void |
collapseNode(DefaultMutableTreeNode node)
Collapses all the nodes in the tree from this node up/down. |
void |
expand(int level)
Expands all the nodes in the tree to a certain level. |
void |
expandAll()
Expands all the nodes in the tree. |
void |
expandNode(DefaultMutableTreeNode node)
Expands all the nodes in the tree from this node down. |
void |
expandNode(DefaultMutableTreeNode node,
int level)
Expands all the nodes in the tree from this node down, until a certain level. |
TreePath |
getNextMatch(String prefix,
int startingRow,
Position.Bias bias)
Bug fix for return and space kay presses. |
TreeNode |
getSelectedNode()
Returns the currently selected node, null if nothing has been selected. |
void |
setSelectedNode(DefaultMutableTreeNode node)
Sets the selected node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public QTree()
public QTree(Hashtable value)
value - a hashtable of nodes.public QTree(Object[] value)
value - an array of nodes.public QTree(TreeModel model)
model - an tree model.public QTree(TreeNode root)
root - the root node.
public QTree(TreeNode root,
boolean asksAllowsChildren)
root - the root node.asksAllowsChildren - allows children.public QTree(Vector value)
value - a vector of nodes.| Method Detail |
|---|
public TreeNode getSelectedNode()
public void setSelectedNode(DefaultMutableTreeNode node)
node - the node.public void expandAll()
public void expand(int level)
level - the level to expand to.public void collapseAll()
public void collapseNode(DefaultMutableTreeNode node)
node - the node to be collapsed.public void expandNode(DefaultMutableTreeNode node)
node - the node to be expanded.
public void expandNode(DefaultMutableTreeNode node,
int level)
node - the node to be expanded.level - the level to expand to.
public TreePath getNextMatch(String prefix,
int startingRow,
Position.Bias bias)
getNextMatch in class JTreeprefix - the character that should prefix the node name.startingRow - the level to expand to.bias - the level to expand to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||