T - the model objectpublic class TreeNode<T> extends Object implements org.apache.wicket.util.io.IClusterable
AjaxTreeView| Modifier and Type | Field and Description |
|---|---|
static int |
ROOT |
| Constructor and Description |
|---|
TreeNode(int id,
int parentId,
T object)
Constructor
|
TreeNode(int id,
int parentId,
T object,
CharSequence url)
Constructor
|
TreeNode(int id,
int parentId,
T object,
Class<? extends org.apache.wicket.Page> pageClass)
Constructor
|
TreeNode(int id,
int parentId,
T object,
Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Constructor
|
TreeNode(int id,
T object)
Constructor for root node
|
TreeNode(int id,
T object,
CharSequence url)
Constructor for root node
|
TreeNode(int id,
T object,
Class<? extends org.apache.wicket.Page> pageClass)
Constructor for root node
|
TreeNode(int id,
T object,
Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Constructor for root node
|
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Gets the node-id
|
T |
getObject()
Gets the wrapped object
|
int |
getParentId()
Gets the parent node-id
|
String |
getText()
Gets the text of the object
|
CharSequence |
getUrl()
Gets the node url
|
boolean |
hasChildren()
Indicates whether the node has children
|
boolean |
hasUrl()
Indicates whether the node has a specified url
|
static int |
nextSequence()
Gets the next id-sequence
|
static <T> TreeNode<T> |
of(int parentId,
T object)
Helper method that construct a new child
TreeNode |
static <T> TreeNode<T> |
of(T object)
Helper method that construct a new root
TreeNode |
public static final int ROOT
public TreeNode(int id,
T object)
id - the node-idobject - the wrapped objectpublic TreeNode(int id,
T object,
CharSequence url)
id - the node-idobject - the wrapped objecturl - the node urlpublic TreeNode(int id,
T object,
Class<? extends org.apache.wicket.Page> pageClass)
id - the node-idobject - the wrapped objectpageClass - the node Page to redirect topublic TreeNode(int id,
T object,
Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
id - the node-idobject - the wrapped objectpageClass - Page to redirect toparameters - the page parameterspublic TreeNode(int id,
int parentId,
T object)
id - the node-idparentId - the parent node-idobject - the wrapped objectpublic TreeNode(int id,
int parentId,
T object,
CharSequence url)
id - the node-idparentId - the parent node-idobject - the wrapped objecturl - the node urlpublic TreeNode(int id,
int parentId,
T object,
Class<? extends org.apache.wicket.Page> pageClass)
id - the node-idparentId - the parent node-idobject - the wrapped objectpageClass - Page to redirect topublic TreeNode(int id,
int parentId,
T object,
Class<? extends org.apache.wicket.Page> pageClass,
org.apache.wicket.request.mapper.parameter.PageParameters parameters)
id - the node-idparentId - the parent node-idobject - the wrapped objectpageClass - Page to redirect toparameters - the page parameterspublic int getId()
public int getParentId()
public String getText()
String.valueOf(Object) by defaultpublic T getObject()
public CharSequence getUrl()
nullpublic boolean hasChildren()
true by defaultpublic boolean hasUrl()
true or falsepublic static int nextSequence()
public static <T> TreeNode<T> of(T object)
TreeNodeT - the object typeobject - the wrapped objectTreeNodeCopyright © 2021 7thWeb. All rights reserved.