com.mebigfatguy.mongobrowser.dialogs
Class MongoTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.mebigfatguy.mongobrowser.dialogs.MongoTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class MongoTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

See Also:
Serialized Form

Nested Class Summary
static class MongoTreeNode.KV
          holds the key value of a mongo object property
static class MongoTreeNode.Root
          a dummy object used as a constructor differentiator for the root of the tree
static class MongoTreeNode.Type
           
 
Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
MongoTreeNode()
          constructs a tree node representing an expansion slug
MongoTreeNode(com.mongodb.DBCollection dbCollection, boolean rdOnly)
          constructs a tree node representing a mongo collection
MongoTreeNode(com.mongodb.DBObject dbObject, boolean rdOnly)
          constructs a tree node representing a mongo object
MongoTreeNode(MongoTreeNode.KV dbKV, boolean rdOnly)
          constructs a tree node representing a mongo key/value
MongoTreeNode(MongoTreeNode.Root root)
          constructs a tree node representing the root of the tree
 
Method Summary
 MongoTreeNode.Type getType()
          retrieves the type of this node
 boolean isReadOnly()
          retrieves whether this node is readonly
 java.lang.String toString()
          returns a user viewable string
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MongoTreeNode

public MongoTreeNode()
constructs a tree node representing an expansion slug


MongoTreeNode

public MongoTreeNode(MongoTreeNode.Root root)
constructs a tree node representing the root of the tree

Parameters:
root - a unused tag to differentiate constructors

MongoTreeNode

public MongoTreeNode(com.mongodb.DBCollection dbCollection,
                     boolean rdOnly)
constructs a tree node representing a mongo collection

Parameters:
dbCollection - the mongo collection to represent
rdOnly - is this collection read only

MongoTreeNode

public MongoTreeNode(com.mongodb.DBObject dbObject,
                     boolean rdOnly)
constructs a tree node representing a mongo object

Parameters:
dbObject - the mongo object to represent
rdOnly - is this object read only

MongoTreeNode

public MongoTreeNode(MongoTreeNode.KV dbKV,
                     boolean rdOnly)
constructs a tree node representing a mongo key/value

Parameters:
dbKV - the key value object to represent
rdOnly - is this key value read only
Method Detail

getType

public MongoTreeNode.Type getType()
retrieves the type of this node

Returns:
the nodes type

isReadOnly

public boolean isReadOnly()
retrieves whether this node is readonly

Returns:
if this tree node is readonly

toString

public java.lang.String toString()
returns a user viewable string

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
a string representing this node


Copyright © 2009-2011 MeBigFatGuy.com. All Rights Reserved.