org.openbp.guiclient.util
Class DisplayObjectTreeNode

java.lang.Object
  extended by org.openbp.swing.components.tree.DefaultTreeNode
      extended by org.openbp.guiclient.util.DisplayObjectTreeNode
All Implemented Interfaces:
javax.swing.tree.TreeNode
Direct Known Subclasses:
ItemTree.ItemTreeNode

public class DisplayObjectTreeNode
extends DefaultTreeNode

General-purpose tree node that holds a reference to a display object. The display text of the object will be used as tree node text.

Author:
Heiko Erhardt

Field Summary
protected  DisplayObject object
          Display object represented by this node
 
Fields inherited from class org.openbp.swing.components.tree.DefaultTreeNode
parent
 
Constructor Summary
DisplayObjectTreeNode()
          Default constructor.
DisplayObjectTreeNode(DisplayObject object)
          Default constructor.
DisplayObjectTreeNode(DisplayObject object, javax.swing.tree.TreeNode parent)
          Default constructor.
DisplayObjectTreeNode(javax.swing.tree.TreeNode parent)
          Default constructor.
 
Method Summary
 DisplayObject getObject()
          Gets the display object represented by this node.
 void setObject(DisplayObject object)
          Sets the display object represented by this node.
 java.lang.String toString()
          Returns the string representation of this node.
 
Methods inherited from class org.openbp.swing.components.tree.DefaultTreeNode
addChild, children, clearChilds, getAllowsChildren, getChildAt, getChildCount, getChildList, getIndex, getParent, insertChild, isLeaf, removeChild, setChildList, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

object

protected DisplayObject object
Display object represented by this node

Constructor Detail

DisplayObjectTreeNode

public DisplayObjectTreeNode()
Default constructor.


DisplayObjectTreeNode

public DisplayObjectTreeNode(DisplayObject object)
Default constructor.

Parameters:
object - Display object represented by this node

DisplayObjectTreeNode

public DisplayObjectTreeNode(javax.swing.tree.TreeNode parent)
Default constructor.

Parameters:
parent - Parent tree node

DisplayObjectTreeNode

public DisplayObjectTreeNode(DisplayObject object,
                             javax.swing.tree.TreeNode parent)
Default constructor.

Parameters:
object - Display object represented by this node
parent - Parent tree node
Method Detail

toString

public java.lang.String toString()
Returns the string representation of this node. According to the role manager, either the display text or the name of the item.

Overrides:
toString in class java.lang.Object

getObject

public DisplayObject getObject()
Gets the display object represented by this node.


setObject

public void setObject(DisplayObject object)
Sets the display object represented by this node.



Copyright © 2011. All Rights Reserved.