|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Component
wicket.MarkupContainer
wicket.markup.html.WebMarkupContainer
wicket.markup.html.panel.Panel
wicket.markup.html.tree.AbstractTree
Base component for trees. The trees from this package work with the Swing
tree models and DefaultMutableTreeNodes. Hence,
users can re-use their Swing tree models.
| Nested Class Summary |
| Nested classes inherited from class wicket.Component |
Component.ComponentModelChange, Component.IVisitor, Component.VisibilityChange |
| Field Summary |
| Fields inherited from class wicket.Component |
FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4 |
| Constructor Summary | |
AbstractTree(java.lang.String id,
javax.swing.tree.TreeModel model)
Construct using the given model as the tree model to use. |
|
AbstractTree(java.lang.String id,
TreeState treeState)
Construct using the given tree state that holds the model to be used as the tree model. |
|
| Method Summary | |
TreeState |
getTreeState()
Gets the current tree state. |
boolean |
isExpanded(javax.swing.tree.DefaultMutableTreeNode node)
Convenience method that determines whether the path of the given tree node is expanded in this tree's state. |
boolean |
isExpanded(javax.swing.tree.TreePath path)
Convenience method that determines whether the given path is expanded in this tree's state. |
boolean |
isRootVisible()
Gets whether the tree root node should be displayed. |
TreeState |
newTreeState(javax.swing.tree.TreeModel model)
Creates a new tree state by creating a new TreeStateobject,
which is then set as the current tree state, creating a new
TreeSelectionModeland then calling setTreeModel with this |
protected TreeState |
newTreeState(javax.swing.tree.TreeModel treeModel,
boolean rootVisible)
Creates a new tree state by creating a new TreeStateobject,
which is then set as the current tree state, creating a new
TreeSelectionModeland then calling setTreeModel with this |
void |
setExpandedState(javax.swing.tree.DefaultMutableTreeNode node)
Sets the new expanded state, based on the given node |
void |
setExpandedState(javax.swing.tree.TreePath selection,
boolean expanded)
Sets the expanded property in the stree state for selection. |
void |
setRootVisible(boolean rootVisible)
Sets whether the tree root node should be displayed. |
void |
setSelected(javax.swing.tree.DefaultMutableTreeNode node)
Sets the new expanded state (to true), based on the given user node and set the tree path to the currently selected. |
void |
setTreeModel(javax.swing.tree.TreeModel treeModel)
Sets the current tree model. |
void |
setTreeState(TreeState treeState)
Sets the current tree state to the given tree state. |
java.lang.String |
toString()
Gives the current tree model as a string. |
| Methods inherited from class wicket.markup.html.panel.Panel |
onRender |
| Methods inherited from class wicket.markup.html.WebMarkupContainer |
getMarkupType, renderHead |
| Methods inherited from class wicket.MarkupContainer |
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, internalAdd, internalBeginRequest, internalEndRequest, iterator, iterator, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AbstractTree(java.lang.String id,
javax.swing.tree.TreeModel model)
id - The id of this componentmodel - the underlying tree model
public AbstractTree(java.lang.String id,
TreeState treeState)
id - The id of this componenttreeState - treeState that holds the underlying tree model| Method Detail |
public final TreeState getTreeState()
public final boolean isExpanded(javax.swing.tree.DefaultMutableTreeNode node)
node - the tree node
public final boolean isExpanded(javax.swing.tree.TreePath path)
path - the tree path
public final boolean isRootVisible()
public TreeState newTreeState(javax.swing.tree.TreeModel model)
TreeStateobject,
which is then set as the current tree state, creating a new
TreeSelectionModeland then calling setTreeModel with this
model - the model that the new tree state applies to
public final void setExpandedState(javax.swing.tree.DefaultMutableTreeNode node)
node - the tree node model
public final void setExpandedState(javax.swing.tree.TreePath selection,
boolean expanded)
selection - the selection to set the expanded property forexpanded - true if the selection is expanded, false otherwisepublic final void setRootVisible(boolean rootVisible)
rootVisible - whether the tree node should be displayedpublic final void setSelected(javax.swing.tree.DefaultMutableTreeNode node)
node - the tree node modelpublic void setTreeState(TreeState treeState)
treeState - the tree state to set as the current onepublic void setTreeModel(javax.swing.tree.TreeModel treeModel)
treeModel - the tree model to set as the current onepublic final java.lang.String toString()
toString in class MarkupContainerComponent.toString()
protected final TreeState newTreeState(javax.swing.tree.TreeModel treeModel,
boolean rootVisible)
TreeStateobject,
which is then set as the current tree state, creating a new
TreeSelectionModeland then calling setTreeModel with this
treeModel - the model that the new tree state applies torootVisible - whether the tree node should be displayed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||