com.sas.dataselectors.dataitems
Class DataItemTreeNodeInfo

com.sas.dataselectors.dataitems.DataItemTreeNodeInfo
All Implemented Interfaces:
java.lang.Comparable

public class DataItemTreeNodeInfo
implements java.lang.Comparable

The DataItemTreeNodeInfo is a user object for tree nodes used by the DataItem selectors. It is used to hold additional information about the tree nodes that pertain to the selector user interface.


Field Summary
protected  java.lang.String category
          Used to display the nodes grouped by a category value
protected  java.lang.String defaultImage
          The default image to display with the node
protected  java.lang.String disabledImage
          The image to display with the node when the node is disabled
protected  boolean enabled
          Indicates that the node should be enabled for user selection
protected  boolean expanded
          Indicates that the node should be expanded to display all of its leaf nodes
protected  java.lang.String imagePath
          The path prefix to use for the defaultImage and disabledImage properties.
protected  java.lang.String itemDescription
          A long description of the DataItem represented by the tree node
protected  java.lang.String itemId
          The id of the DataItem represented by the tree node
protected  java.lang.String itemText
          The label of the DataItem represented by the tree node
protected  java.lang.String itemURL
          The url to navigate to when the node is clicked on
protected  java.lang.String nodeFunction
          A javascript function name to execute when the node is clicked on
 
Constructor Summary
DataItemTreeNodeInfo(java.lang.String id, java.lang.String text, java.lang.String url)
           
DataItemTreeNodeInfo(java.lang.String id, java.lang.String text, java.lang.String url, boolean enabled, boolean expanded)
           
 
Method Summary
 int compareTo(java.lang.Object nodeinfo)
          Compares 2 DataItemTreeNodeInfo objects.
 java.lang.String getCategory()
          Returns the category value that is used to group the node
 java.lang.String getDefaultImage()
          Returns the default image to display with the node
 java.lang.String getDisabledImage()
          Returns the image to display with the node when the node is disabled
 boolean getEnabled()
          Returns the enabled status of the node
 boolean getExpanded()
          Returns the expanded status of the node
 java.lang.String getImagePath()
          Returns the path to use for the default and disabled images
 java.lang.String getItemDescription()
          Returns the item long description
 java.lang.String getItemId()
          Returns the item id
 java.lang.String getItemText()
          Returns the item label
 java.lang.String getItemURL()
          Returns the url to navigate to when the node is clicked on
 java.lang.String getNodeFunction()
          Returns the javascript function to execute when the node is clicked on
 void setCategory(java.lang.String value)
          Sets the category value that is used to group the node
 void setDefaultImage(java.lang.String image)
          Sets the default image to display with the node
 void setDisabledImage(java.lang.String image)
          Sets the image to display with the node when the node is disabled
 void setEnabled(boolean value)
          Sets the enabled status of the node
 void setExpanded(boolean value)
          Sets the expanded status of the node
 void setImagePath(java.lang.String path)
          Sets the path to use for the default and disabled images
 void setItemDescription(java.lang.String description)
          Sets the item long description
 void setItemId(java.lang.String id)
          Sets the unique id of the item
 void setItemText(java.lang.String text)
          Sets the item label
 void setItemURL(java.lang.String url)
          Sets the url to navigate to when the node is clicked on
 void setNodeFunction(java.lang.String functionName)
          Sets the javascript function to execute when the node is clicked on
 java.lang.String toString()
          Returns the text of the node
 

Field Detail

itemId

protected java.lang.String itemId
The id of the DataItem represented by the tree node


itemText

protected java.lang.String itemText
The label of the DataItem represented by the tree node


itemURL

protected java.lang.String itemURL
The url to navigate to when the node is clicked on


itemDescription

protected java.lang.String itemDescription
A long description of the DataItem represented by the tree node


nodeFunction

protected java.lang.String nodeFunction
A javascript function name to execute when the node is clicked on


defaultImage

protected java.lang.String defaultImage
The default image to display with the node


disabledImage

protected java.lang.String disabledImage
The image to display with the node when the node is disabled


imagePath

protected java.lang.String imagePath
The path prefix to use for the defaultImage and disabledImage properties.


category

protected java.lang.String category
Used to display the nodes grouped by a category value


enabled

protected boolean enabled
Indicates that the node should be enabled for user selection


expanded

protected boolean expanded
Indicates that the node should be expanded to display all of its leaf nodes

Constructor Detail

DataItemTreeNodeInfo

public DataItemTreeNodeInfo(java.lang.String id,
                            java.lang.String text,
                            java.lang.String url)

DataItemTreeNodeInfo

public DataItemTreeNodeInfo(java.lang.String id,
                            java.lang.String text,
                            java.lang.String url,
                            boolean enabled,
                            boolean expanded)
Method Detail

toString

public java.lang.String toString()
Returns the text of the node

Overrides:
toString in class java.lang.Object
Returns:
the item text

setItemId

public void setItemId(java.lang.String id)
Sets the unique id of the item

Parameters:
id - - the item id

getItemId

public java.lang.String getItemId()
Returns the item id


setItemText

public void setItemText(java.lang.String text)
Sets the item label

Parameters:
text - - the item label

getItemText

public java.lang.String getItemText()
Returns the item label


setItemDescription

public void setItemDescription(java.lang.String description)
Sets the item long description

Parameters:
description - - the item description

getItemDescription

public java.lang.String getItemDescription()
Returns the item long description


setItemURL

public void setItemURL(java.lang.String url)
Sets the url to navigate to when the node is clicked on

Parameters:
url - - the url to navigate to

getItemURL

public java.lang.String getItemURL()
Returns the url to navigate to when the node is clicked on


setNodeFunction

public void setNodeFunction(java.lang.String functionName)
Sets the javascript function to execute when the node is clicked on

Parameters:
functionName - - the javascript function name

getNodeFunction

public java.lang.String getNodeFunction()
Returns the javascript function to execute when the node is clicked on


setDefaultImage

public void setDefaultImage(java.lang.String image)
Sets the default image to display with the node

Parameters:
image - - the name of the image

getDefaultImage

public java.lang.String getDefaultImage()
Returns the default image to display with the node


setDisabledImage

public void setDisabledImage(java.lang.String image)
Sets the image to display with the node when the node is disabled

Parameters:
image - - the disabled image name

getDisabledImage

public java.lang.String getDisabledImage()
Returns the image to display with the node when the node is disabled


setImagePath

public void setImagePath(java.lang.String path)
Sets the path to use for the default and disabled images

Parameters:
path - - the name of the path

getImagePath

public java.lang.String getImagePath()
Returns the path to use for the default and disabled images


setCategory

public void setCategory(java.lang.String value)
Sets the category value that is used to group the node

Parameters:
value - - the category value

getCategory

public java.lang.String getCategory()
Returns the category value that is used to group the node


setEnabled

public void setEnabled(boolean value)
Sets the enabled status of the node

Parameters:
value - - true if enabled, otherwise false

getEnabled

public boolean getEnabled()
Returns the enabled status of the node


setExpanded

public void setExpanded(boolean value)
Sets the expanded status of the node

Parameters:
value - - true if the node is expanded, otherwise false

getExpanded

public boolean getExpanded()
Returns the expanded status of the node


compareTo

public int compareTo(java.lang.Object nodeinfo)
Compares 2 DataItemTreeNodeInfo objects. This is used for displaying the nodes alphabetically. Returns -1 if the label of this object is less than the passed in object, 0 if they are equal, and +1 if the label of this object is greater than the label of the passed in object. A SASStringComparator instance is used to compare the string labels.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
nodeinfo - - the object to compare to
See Also:
SASStringComparator, SASCollatorFactory.createCollator()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.