Package adams.gui.core.json
Class JsonNode
- java.lang.Object
-
- javax.swing.tree.DefaultMutableTreeNode
-
- adams.gui.core.BaseTreeNode
-
- adams.gui.core.json.JsonNode
-
- All Implemented Interfaces:
Transferable
,Serializable
,Cloneable
,MutableTreeNode
,TreeNode
public class JsonNode extends BaseTreeNode
Specialized tree node.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Object
m_Value
the value.static String
ROOT
the label for the root node in case of multiple hierarchies.-
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Returns the label for this node.Object
getValue()
Returns the value for this node.boolean
hasValue()
Checks whether there is any JSON object attached.Transferable
toTransferable()
Turns the value into a transferable string.-
Methods inherited from class adams.gui.core.BaseTreeNode
getChildren, getTransferData, getTransferDataFlavors, isDataFlavorSupported, toPlainText
-
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
-
-
-
Field Detail
-
ROOT
public static final String ROOT
the label for the root node in case of multiple hierarchies.- See Also:
- Constant Field Values
-
m_Value
protected Object m_Value
the value.
-
-
Method Detail
-
getLabel
public String getLabel()
Returns the label for this node.- Returns:
- the label
-
hasValue
public boolean hasValue()
Checks whether there is any JSON object attached.- Returns:
- true if a value is attached
-
getValue
public Object getValue()
Returns the value for this node.- Returns:
- the value
-
toTransferable
public Transferable toTransferable()
Turns the value into a transferable string.- Overrides:
toTransferable
in classBaseTreeNode
- Returns:
- the generated string
- See Also:
getValue()
-
-