ICEfaces ICE Components 3.3.0
Java API Documentation

com.icesoft.faces.component.tree
Class IceUserObject

java.lang.Object
  extended by com.icesoft.faces.component.tree.IceUserObject
All Implemented Interfaces:
java.io.Serializable

public class IceUserObject
extends java.lang.Object
implements java.io.Serializable

IceUserObject - the Object that constitutes a DefaultMutableTreeNode's user-specified data.

The TreeModel must contain a tree of DefaultMutableTreeNode instances. Each DefaultMutableTreeNode instance encapsultes an IceUserObject. The IceUserObject is the extension point for the application developer.

By default all nodes are folders unless the leaf attribute is set true.

If the IceUserObject does not provide sufficient state for representation of the tree's nodes, then the application developer should extend the IceUserObject and add state as required to their extension. When creating an IceUserObject, the DefaultMutableTreeNode wrapper must be provided to the constructor. Then the node's state can be set to the attributes on the IceUserObject.

See Also:
Serialized Form

Field Summary
protected  java.lang.String action
           
protected  java.lang.String branchContractedIcon
           
protected  java.lang.String branchExpandedIcon
           
protected  boolean expanded
           
protected  java.lang.String icon
           
protected  boolean leaf
           
protected  java.lang.String leafIcon
           
protected  java.lang.String text
           
protected  java.lang.String tooltip
           
protected  TreeNode treeNode
           
protected  javax.swing.tree.DefaultMutableTreeNode wrapper
           
 
Constructor Summary
IceUserObject(javax.swing.tree.DefaultMutableTreeNode wrapper)
          Class constructor specifying the DefaultMutableTreeNode wrapper object that will hold a reference to this IceUserObject.
 
Method Summary
 java.lang.String action()
          Return the value of the action property.
 java.lang.String getAction()
          Return the value of the action property.
 java.lang.String getBranchContractedIcon()
          Return the value of the branchContractedIcon property.
 java.lang.String getBranchExpandedIcon()
          Return the value of the branchExpandedIcon property.
 java.lang.String getFamily()
           
 java.lang.String getIcon()
          Return the appropriate icon based on this node's leaf attribute or expanded/collapsed state.
 java.lang.String getLeafIcon()
          Return the value of the leafIcon property.
 int getRowIndex()
           
 java.lang.String getText()
          Return the value of the text property.
 java.lang.String getTooltip()
          Return the value of the tooltip property.
 TreeNode getTreeNode()
           
 javax.swing.tree.DefaultMutableTreeNode getWrapper()
          Return the value of the wrapper property.
 boolean isExpanded()
          Return the value of the expanded property.
 boolean isLeaf()
          Return false if the tree node is a folder.By default all tree nodes are folders.
 void setAction(java.lang.String action)
          Set the value of the action property.
 void setBranchContractedIcon(java.lang.String branchContractedIcon)
          Set the value of the branchContractedIcon property.
 void setBranchExpandedIcon(java.lang.String branchExpandedIcon)
          Set the value of the branchExpandedIcon property.
 void setExpanded(boolean isExpanded)
          Set the value of the expanded property.
 void setLeaf(boolean leaf)
          Set the value of the boolean leaf attribute.
 void setLeafIcon(java.lang.String leafIcon)
          Set the value of the leafIcon property.
 void setRowIndex(int rowIndex)
           
 void setText(java.lang.String text)
          Set the value of the text property.
 void setTooltip(java.lang.String tooltipString)
          Set the value of the tooltip property.
 void setTreeNode(TreeNode treeNode)
           
 void setWrapper(javax.swing.tree.DefaultMutableTreeNode wrapper)
          Set the DefaultMutableTreeNode instance that wraps this instance
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wrapper

protected javax.swing.tree.DefaultMutableTreeNode wrapper

text

protected java.lang.String text

expanded

protected boolean expanded

tooltip

protected java.lang.String tooltip

action

protected java.lang.String action

treeNode

protected TreeNode treeNode

leafIcon

protected java.lang.String leafIcon

branchExpandedIcon

protected java.lang.String branchExpandedIcon

branchContractedIcon

protected java.lang.String branchContractedIcon

icon

protected java.lang.String icon

leaf

protected boolean leaf
Constructor Detail

IceUserObject

public IceUserObject(javax.swing.tree.DefaultMutableTreeNode wrapper)

Class constructor specifying the DefaultMutableTreeNode wrapper object that will hold a reference to this IceUserObject.

Parameters:
wrapper -
Method Detail

getRowIndex

public int getRowIndex()
Returns:
rowIndex

setRowIndex

public void setRowIndex(int rowIndex)
Parameters:
rowIndex -

setLeaf

public void setLeaf(boolean leaf)

Set the value of the boolean leaf attribute. Setting the leaf attribute to true will force a tree node to be rendered as a leaf. By default the leaf attribute is false therefore all tree nodes will default to folders.

Parameters:
leaf -

isLeaf

public boolean isLeaf()

Return false if the tree node is a folder.By default all tree nodes are folders.

Returns:
the boolean value of the leaf attribute.

action

public java.lang.String action()

Return the value of the action property.

Returns:
action

setTreeNode

public void setTreeNode(TreeNode treeNode)
Parameters:
treeNode -

getTreeNode

public TreeNode getTreeNode()
Returns:
treeNode

getText

public java.lang.String getText()

Return the value of the text property.

Returns:
text

setText

public void setText(java.lang.String text)

Set the value of the text property.

Parameters:
text -

getFamily

public java.lang.String getFamily()
Returns:
null

isExpanded

public boolean isExpanded()

Return the value of the expanded property.

Returns:
expanded

setExpanded

public void setExpanded(boolean isExpanded)

Set the value of the expanded property.

Parameters:
isExpanded -

getTooltip

public java.lang.String getTooltip()

Return the value of the tooltip property.

Returns:
tootip

setTooltip

public void setTooltip(java.lang.String tooltipString)

Set the value of the tooltip property.

Parameters:
tooltipString -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getLeafIcon

public java.lang.String getLeafIcon()

Return the value of the leafIcon property.

Returns:
leafIcon

setLeafIcon

public void setLeafIcon(java.lang.String leafIcon)

Set the value of the leafIcon property.

Parameters:
leafIcon -

getBranchContractedIcon

public java.lang.String getBranchContractedIcon()

Return the value of the branchContractedIcon property.

Returns:
branchContractedIcon

setBranchContractedIcon

public void setBranchContractedIcon(java.lang.String branchContractedIcon)

Set the value of the branchContractedIcon property.

Parameters:
branchContractedIcon -

getBranchExpandedIcon

public java.lang.String getBranchExpandedIcon()

Return the value of the branchExpandedIcon property.

Returns:
branchExpandedIcon

setBranchExpandedIcon

public void setBranchExpandedIcon(java.lang.String branchExpandedIcon)

Set the value of the branchExpandedIcon property.

Parameters:
branchExpandedIcon -

getIcon

public java.lang.String getIcon()

Return the appropriate icon based on this node's leaf attribute or expanded/collapsed state.

By default the leaf attribute is false.

Returns:
String application-relative path to the image file

getWrapper

public javax.swing.tree.DefaultMutableTreeNode getWrapper()

Return the value of the wrapper property.

Returns:
wrapper

setWrapper

public void setWrapper(javax.swing.tree.DefaultMutableTreeNode wrapper)
Set the DefaultMutableTreeNode instance that wraps this instance

Parameters:
wrapper -

getAction

public java.lang.String getAction()

Return the value of the action property.

Returns:
action

setAction

public void setAction(java.lang.String action)

Set the value of the action property.

Parameters:
action -

ICEfaces ICE Components 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.