com.plumtree.uiinfrastructure.tree
Class TreeLeafNode

java.lang.Object
  extended by com.plumtree.uiinfrastructure.tree.TreeLeafNode
Direct Known Subclasses:
TreeCompositeNode

public class TreeLeafNode
extends java.lang.Object

This class represents a node in the tree.

Author:
Don Hayler

Field Summary
 boolean m_bForceSelectable
          Whether or not to override the normal selectable logic and force this node to be selectable.
 boolean m_bMultiplyInstanced
          Whether or not this node can be simultaneously located in multiple places.
 boolean m_bSelected
          Whether or not this node is selected.
 HTMLImg m_Image
          The default image for this object.
 int m_nClassID
           
 int m_nObjectID
           
 int m_nTreeNodeID
          unique internal ID for this node
 java.lang.String m_strLocation
           
 
Constructor Summary
TreeLeafNode(int nTreeNodeID)
          Creates a new TreeLeafNode object.
TreeLeafNode(TreeLeafNode node)
          Creates a new TreeLeafNode object.
 
Method Summary
 java.lang.String GetDescription()
          This method returns the description of the node (HTMLEncoded).
 java.lang.String GetEncodedName()
          This method returns the name of the node (truncated to 50 characters and HTMLEncoded).
 java.lang.String GetName()
          This method returns the name of the node (truncated to 50 characters).
 void SetDescription(java.lang.String strDescription)
          This method sets the description of the node and HTMLEncodes it.
 void SetName(java.lang.String strName)
          This method sets the name of the node, truncates it to 50 characters, and HTMLEncodes it.
 void SetNameAndDescription(TreeLeafNode node)
          This method sets the name and description of the node by copying the truncated and encoded versions from the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_nTreeNodeID

public int m_nTreeNodeID
unique internal ID for this node


m_Image

public HTMLImg m_Image
The default image for this object. For a composite node, this will be the closed image (the composite node will store the open image).


m_strLocation

public java.lang.String m_strLocation

m_bForceSelectable

public boolean m_bForceSelectable
Whether or not to override the normal selectable logic and force this node to be selectable. true implies this node should be selectable no matter what.


m_bMultiplyInstanced

public boolean m_bMultiplyInstanced
Whether or not this node can be simultaneously located in multiple places. true implies there can be more than one instance of the object this node points to in the same tree. N.B. Multiply instanced items must use unique class ID / object ID pairs (per item, not per instance).


m_bSelected

public boolean m_bSelected
Whether or not this node is selected.


m_nClassID

public int m_nClassID

m_nObjectID

public int m_nObjectID
Constructor Detail

TreeLeafNode

public TreeLeafNode(int nTreeNodeID)
Creates a new TreeLeafNode object. All objects in a folder should have sequential tree ids.

Parameters:
int - internal ID of this node

TreeLeafNode

public TreeLeafNode(TreeLeafNode node)
Creates a new TreeLeafNode object.

Parameters:
node -
Method Detail

GetName

public java.lang.String GetName()
This method returns the name of the node (truncated to 50 characters). This method unencodes the stored encoded name, so it should only be used when retrieving the final tree selections. Tracing should use the GetEncodedName method.

Returns:
String the name of the node.

GetEncodedName

public java.lang.String GetEncodedName()
This method returns the name of the node (truncated to 50 characters and HTMLEncoded). The name is stored truncated and encoded, so this method is fast. Tracing should use this method, even though it does not need to encode the name.

Returns:
String the name of the node.

SetName

public void SetName(java.lang.String strName)
This method sets the name of the node, truncates it to 50 characters, and HTMLEncodes it. This also sets the description to the full name, if there is no description set.

Parameters:
String - the name of the node.

SetNameAndDescription

public void SetNameAndDescription(TreeLeafNode node)
This method sets the name and description of the node by copying the truncated and encoded versions from the node.

Parameters:
TreeLeafNode - the node to take the info from.

GetDescription

public java.lang.String GetDescription()
This method returns the description of the node (HTMLEncoded). If there is no description, it returns the name.

Returns:
String the description of the node.

SetDescription

public void SetDescription(java.lang.String strDescription)
This method sets the description of the node and HTMLEncodes it. This will ignore the description if it is null or the empty string.

Parameters:
String - the description of the node.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.