public class SimpleNode extends DefaultActionDefinition implements NavigationNode
| Constructor and Description |
|---|
SimpleNode(String id) |
SimpleNode(String id,
Object data) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(NavigationNode child)
Adds the given node as a child of this node.
|
static SimpleNode |
create(ActionDefinition action) |
boolean |
equals(Object obj) |
List<NavigationNode> |
getChildren()
Returns all children nodes.
|
CockpitContext |
getContext()
Returns node context
|
Object |
getData()
Returns data associated with the node.
|
int |
getLevel()
Returns the level of this node.
|
NavigationNode |
getParent()
Returns the parent node of this node.
|
int |
hashCode() |
boolean |
isDirectory()
Returns
true |
boolean |
isExpandedByDefault()
Returns true if this node should be expanded by default when the tree is created.
|
void |
setChildren(List<NavigationNode> children)
Sets the given list to be child nodes of this node.
|
void |
setContext(CockpitContext context)
Sets node context
|
void |
setData(Object data) |
void |
setDirectory(boolean directory) |
void |
setExpandedByDefault(boolean expandedByDefault) |
void |
setLevel(int level) |
void |
setParent(NavigationNode parent)
Sets the parent of this node to the given node.
|
getDescription, getDescriptionLocKey, getGroup, getIconUri, getIconUriLocKey, getId, getName, getNameLocKey, setDescription, setDescriptionLocKey, setGroup, setIconUri, setIconUriLocKey, setName, setNameLocKey, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDescriptionLocKey, getGroup, getIconUri, getIconUriLocKey, getId, getName, getNameLocKeypublic SimpleNode(String id)
public Object getData()
NavigationNodenull.getData in interface NavigationNodenull if no data are associated with the nodepublic void setData(Object data)
public int getLevel()
NavigationNodegetLevel in interface NavigationNodepublic void setLevel(int level)
public boolean isDirectory()
NavigationNodetrue if this node can have children.isDirectory in interface NavigationNodetrue if this node can have children and false otherwisepublic void setDirectory(boolean directory)
public boolean isExpandedByDefault()
NavigationNodeisExpandedByDefault in interface NavigationNodepublic void setExpandedByDefault(boolean expandedByDefault)
public NavigationNode getParent()
NavigationNodegetParent in interface NavigationNodenull if this is a root nodepublic void setParent(NavigationNode parent)
NavigationNodesetParent in interface NavigationNodeparent - a node to become a parent of this nodepublic List<NavigationNode> getChildren()
NavigationNodegetChildren in interface NavigationNodepublic void setChildren(List<NavigationNode> children)
NavigationNodesetChildren in interface NavigationNodechildren - list of nodes to become children of this nodepublic void addChild(NavigationNode child)
NavigationNodeaddChild in interface NavigationNodechild - a node to become a child of this nodepublic boolean equals(Object obj)
equals in class DefaultActionDefinitionpublic int hashCode()
hashCode in class DefaultActionDefinitionpublic static SimpleNode create(ActionDefinition action)
public CockpitContext getContext()
NavigationNodegetContext in interface NavigationNodepublic void setContext(CockpitContext context)
NavigationNodesetContext in interface NavigationNodeCopyright © 2018. All rights reserved.