public class ServerConsoleIconNode
extends javax.swing.tree.DefaultMutableTreeNode
Constructor and Description |
---|
ServerConsoleIconNode()
Creates a new default instance.
|
ServerConsoleIconNode(ServerConsoleNodeContent userObject)
Creates a new instance for the given model.
|
ServerConsoleIconNode(ServerConsoleNodeContent userObject,
boolean allowsChildren,
javax.swing.Icon icon)
Creates a new instance for the given model and icon.
|
Modifier and Type | Method and Description |
---|---|
void |
add(javax.swing.tree.MutableTreeNode newChild)
Adds the given child.
|
javax.swing.Icon |
getIcon()
Returns the icon.
|
ServerConsoleNodeContent |
getNodeContent()
Returns the model assigned to this node or null if no model is available.
|
void |
insert(javax.swing.tree.MutableTreeNode newChild,
int childIndex)
Inserts the given child at the given index.
|
void |
setIcon(javax.swing.Icon icon)
Sets the icon.
|
void |
setNodeContent(ServerConsoleNodeContent nodeContent)
Sets the model for this node.
|
void |
setParent(javax.swing.tree.MutableTreeNode newParent)
Sets a new parent for this node.
|
void |
setUserObject(java.lang.Object userObject)
Sets either the name on the model when given a
String or sets the
model when given an instance of ServerConsoleNodeContent . |
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, toString
public ServerConsoleIconNode()
public ServerConsoleIconNode(ServerConsoleNodeContent userObject)
userObject
- modelpublic ServerConsoleIconNode(ServerConsoleNodeContent userObject, boolean allowsChildren, javax.swing.Icon icon)
userObject
- the modelallowsChildren
- true if child nodes should be possibleicon
- icon to use within the treepublic void setIcon(javax.swing.Icon icon)
icon
- new iconpublic javax.swing.Icon getIcon()
public ServerConsoleNodeContent getNodeContent()
public void setNodeContent(ServerConsoleNodeContent nodeContent)
nodeContent
- new modelpublic void setUserObject(java.lang.Object userObject)
String
or sets the
model when given an instance of ServerConsoleNodeContent
.setUserObject
in interface javax.swing.tree.MutableTreeNode
setUserObject
in class javax.swing.tree.DefaultMutableTreeNode
userObject
- either a String
or ServerConsoleNodeContent
public void insert(javax.swing.tree.MutableTreeNode newChild, int childIndex)
insert
in interface javax.swing.tree.MutableTreeNode
insert
in class javax.swing.tree.DefaultMutableTreeNode
newChild
- child to insert needs to be an instance of ServerConsoleIconNode
childIndex
- insertion pointpublic void setParent(javax.swing.tree.MutableTreeNode newParent)
setParent
in interface javax.swing.tree.MutableTreeNode
setParent
in class javax.swing.tree.DefaultMutableTreeNode
newParent
- new parent nodepublic void add(javax.swing.tree.MutableTreeNode newChild)
add
in class javax.swing.tree.DefaultMutableTreeNode
newChild
- child to insert needs to be an instance of ServerConsoleIconNode
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.