|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.Component org.apache.wicket.MarkupContainer org.apache.wicket.markup.html.WebMarkupContainer org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup org.apache.wicket.markup.html.panel.Panel org.apache.wicket.markup.html.tree.AbstractTree org.apache.wicket.markup.html.tree.BaseTree org.apache.wicket.markup.html.tree.LabelTree
public class LabelTree
Simple tree component that uses label to render tree node.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.markup.html.tree.BaseTree |
---|
BaseTree.ILinkCallback, BaseTree.LinkType |
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
Constructor Summary | |
---|---|
LabelTree(java.lang.String id)
Construct. |
|
LabelTree(java.lang.String id,
IModel model)
Construct. |
|
LabelTree(java.lang.String id,
javax.swing.tree.TreeModel model)
Construct. |
Method Summary | |
---|---|
protected IModel |
getNodeTextModel(IModel nodeModel)
Provides the model that will be used to feed the node text. |
protected Component |
newNodeComponent(java.lang.String id,
IModel model)
Creates a new component for the given TreeNode. |
Methods inherited from class org.apache.wicket.markup.html.tree.BaseTree |
---|
getCSS, getLinkType, getSelectedClass, isForceRebuildOnSelectionChange, newJunctionLink, newLink, onJunctionLinkClicked, populateTreeItem, setLinkType |
Methods inherited from class org.apache.wicket.markup.html.tree.AbstractTree |
---|
addComponent, allNodesCollapsed, allNodesExpanded, getNodeComponent, getTreeState, invalidateAll, isNodeExpanded, isRootLess, markNodeChildrenDirty, markNodeDirty, newTreeState, nodeCollapsed, nodeExpanded, nodeSelected, nodeUnselected, onAfterRender, onBeforeAttach, onBeforeRender, onDetach, onTargetRespond, setRootLess, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, updateTree, updateTree |
Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
---|
onComponentTag, onComponentTagBody, renderHead |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup |
---|
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getMarkupType, getWebPage |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, toString, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LabelTree(java.lang.String id)
id
- public LabelTree(java.lang.String id, IModel model)
id
- model
- model that provides the TreeModel
public LabelTree(java.lang.String id, javax.swing.tree.TreeModel model)
id
- model
- Tree modelMethod Detail |
---|
protected Component newNodeComponent(java.lang.String id, IModel model)
BaseTree
newNodeComponent
in class BaseTree
id
- component IDmodel
- model that returns the node
BaseTree.newNodeComponent(java.lang.String,
org.apache.wicket.model.IModel)
protected IModel getNodeTextModel(IModel nodeModel)
return new PropertyModel(nodeModel, "object.name");
which will translate to YourTreeNodeSubclass.getObject().getName();
NOTE: remember that the nodeModel represents the TreeNode object, not the model object inside
it
NOTE: this method is called from the default implementation of
newNodeComponent(String, IModel)
, so if it is subclassed this method may no longer
be called unless the subclassing code maintains the callback explicitly
nodeModel
- model representing the current tree node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |