com.sun.jini.example.browser
Class ObjectNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by com.sun.jini.example.browser.ObjectNode
All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

 class ObjectNode
extends DefaultMutableTreeNode
implements Serializable

Version:
0.2 06/04/98
Author:
Sun Microsystems, Inc.

Field Summary
private  int arrayIndex
           
private  Class clazz
           
private  boolean editable
           
private  String fieldName
           
private static Icon[] icons
           
private  boolean isAdministrable
           
private  boolean isControllable
           
private  boolean isEntryTop
           
private  boolean isLeaf
           
private  boolean isRoot
           
private  String name
           
private  Object obj
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
ObjectNode(boolean isAdministrable)
          Constructor for a root node.
ObjectNode(Object obj, boolean isControllable)
          Constructor for an entry (attribute) top nodes.
ObjectNode(Object obj, Class clazz, String fieldName, boolean isLeaf)
          Constructor for an ordinary field.
ObjectNode(Object obj, Class clazz, String fieldName, int arrayIndex, boolean isLeaf)
          Constructor for an array element.
 
Method Summary
 void add(ObjectNode child)
           
 Object getEntryTop()
           
 String getFieldName()
           
 Icon getIcon()
           
 Object getObject()
           
 String getTitle()
           
 Object getUserObject()
           
 boolean isAdministrable()
           
 boolean isControllable()
           
 boolean isEditable()
           
protected  boolean isEntryTop()
           
 void setAdministrable(boolean val)
           
 void setControllable(boolean val)
           
private  void setNodeName()
           
 void setObjectRecursive()
           
 void setUserObject(Object obj)
           
 Object setValue(Object val)
           
 String toString()
           
 
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, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private String name

obj

private Object obj

clazz

private Class clazz

fieldName

private String fieldName

arrayIndex

private int arrayIndex

editable

private boolean editable

isLeaf

private boolean isLeaf

isAdministrable

private boolean isAdministrable

isControllable

private boolean isControllable

isRoot

private boolean isRoot

isEntryTop

private boolean isEntryTop

icons

private static Icon[] icons
Constructor Detail

ObjectNode

public ObjectNode(boolean isAdministrable)
Constructor for a root node.


ObjectNode

public ObjectNode(Object obj,
                  boolean isControllable)
Constructor for an entry (attribute) top nodes.


ObjectNode

public ObjectNode(Object obj,
                  Class clazz,
                  String fieldName,
                  boolean isLeaf)
Constructor for an ordinary field.


ObjectNode

public ObjectNode(Object obj,
                  Class clazz,
                  String fieldName,
                  int arrayIndex,
                  boolean isLeaf)
Constructor for an array element.

Method Detail

setNodeName

private void setNodeName()

add

public void add(ObjectNode child)

getEntryTop

public Object getEntryTop()

isEntryTop

protected boolean isEntryTop()

setObjectRecursive

public void setObjectRecursive()
                        throws NoSuchFieldException,
                               IllegalAccessException
Throws:
NoSuchFieldException
IllegalAccessException

getTitle

public String getTitle()

getIcon

public Icon getIcon()

setUserObject

public void setUserObject(Object obj)
Specified by:
setUserObject in interface MutableTreeNode
Overrides:
setUserObject in class DefaultMutableTreeNode

getUserObject

public Object getUserObject()
Overrides:
getUserObject in class DefaultMutableTreeNode

toString

public String toString()
Overrides:
toString in class DefaultMutableTreeNode

getFieldName

public String getFieldName()

getObject

public Object getObject()

isEditable

public boolean isEditable()

isAdministrable

public boolean isAdministrable()

setAdministrable

public void setAdministrable(boolean val)

isControllable

public boolean isControllable()

setControllable

public void setControllable(boolean val)

setValue

public Object setValue(Object val)
                throws NumberFormatException
Throws:
NumberFormatException


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.