Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.data.tree
Class SimpleTreeData

java.lang.Object
  |
  +--oracle.cabo.ui.data.tree.SimpleTreeData
All Implemented Interfaces:
DataObject

public class SimpleTreeData
extends java.lang.Object
implements DataObject

The SimpleTreeData class helps you build a DataObject representing a tree of data. There are methods to make it simple to add the data with the keys expected by TreeBean and BrowseMenuUtils. You may additionally add anything you like using the put method. To retrieve the data added the following keys are used as the select argument to selectValue.

Usage

 

    private SimpleTreeData createShopNode( String text, String description)
    {
      SimpleTreeData data = new SimpleTreeData();
      data.setText( text );
      if ( description != null )
       data.setDescription( description);

      data.setDestination( "http://bali.us.oracle.com");
      data.setDestinationText( "More Information");
      return data;
    }


    private SimpleTreeData _createData()
    {
      SimpleTreeData shop = _createShopNode("Shop", "Spend some money!");

      SimpleTreeData books = _createShopNode("Books", "books have pages");

      SimpleTreeData  art        = _createShopNode("Art", "Picasso et al");
      SimpleTreeData  computers  = _createShopNode("Computers", "010101010101");
      SimpleTreeData  crime      = _createShopNode("Crime", "...and Punishment");

      SimpleTreeData[] bookCategories = { art, computers, crime };
      books.addChildren( bookCategories );

      SimpleTreeData  clothing = _createShopNode("Clothing", null );

      SimpleTreeData  pants = _createShopNode("Pants", null);
      SimpleTreeData  shirts = _createShopNode("Shirts", null);
      SimpleTreeData  shoes = _createShopNode("Shoes", "protect your feet");
      SimpleTreeData  shorts = _createShopNode("Shorts", "are not allowed in some places");
      SimpleTreeData  skirts = _createShopNode("Skirts", null);
      SimpleTreeData[] clothingCategories = { pants, shirts, shoes, shorts, skirts, };
      clothing.addChildren(clothingCategories);

      SimpleTreeData longSleeves = _createShopNode("Long Sleeves", null);
      SimpleTreeData shortSleeves = _createShopNode("Short Sleeves", null);
      SimpleTreeData noSleeves = _createShopNode("Sleeveless", null);
      SimpleTreeData[] shirtCategories = { longSleeves, shortSleeves, noSleeves};
      shirts.addChildren(shirtCategories);

      SimpleTreeData[] categories = { books, clothing };
      shop.addChildren(categories);

      return shop;
    }
 
  

See Also:
TreeBean, BrowseMenuBean, BrowseMenuUtils, BrowseNodeDataObject

Constructor Summary
SimpleTreeData()
           
 
Method Summary
 void addChild(DataObject child)
          Adds the child.
 void addChildren(DataObject[] children)
          Adds the children in the array.
 void addChildren(DataObjectList children)
           
 DataObject getChild(int index)
           
 DataObjectList getChildren()
           
 java.lang.String getCollapseDestination()
           
 java.lang.String getDescription()
           
 java.lang.String getDestination()
           
 java.lang.String getDestinationText()
           
 java.lang.String getExpandable()
          Limited return values.
 java.lang.String getExpandDestination()
           
 java.lang.String getIcon()
           
 java.lang.Boolean getSelected()
           
 java.lang.String getTargetFrame()
           
 java.lang.String getText()
           
 void put(java.lang.Object select, java.lang.Object data)
          Add a key/value pair.
 java.lang.Object selectValue(RenderingContext context, java.lang.Object select)
          returns a value given a select key
 void setCollapseDestination(java.lang.String collapseDestination)
          Adds collapseDestination.
 void setDescription(java.lang.String description)
          Adds description.
 void setDestination(java.lang.String destination)
          Adds destination.
 void setDestinationText(java.lang.String destinationText)
          Adds destinationText.
 void setExpandable(java.lang.String expandable)
          Adds expandable.
 void setExpandDestination(java.lang.String expandDestination)
          Adds expandDestination.
 void setIcon(java.lang.String icon)
          Adds icon.
 void setSelected(boolean selected)
          Adds selected.
 void setTargetFrame(java.lang.String targetFrame)
          Adds targetFrame.
 void setText(java.lang.String text)
          Adds text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTreeData

public SimpleTreeData()
Method Detail

setTargetFrame

public void setTargetFrame(java.lang.String targetFrame)
Adds targetFrame. This value can be retrieved in the selectValue method using the key UIConstants.TARGET_FRAME_KEY

getTargetFrame

public java.lang.String getTargetFrame()

setText

public void setText(java.lang.String text)
Adds text. This value can be retrieved in the selectValue method using the key UIConstants.TEXT_KEY

getText

public java.lang.String getText()

setIcon

public void setIcon(java.lang.String icon)
Adds icon. This value can be retrieved in the selectValue method using the key UIConstants.ICON_KEY

getIcon

public java.lang.String getIcon()

setSelected

public void setSelected(boolean selected)
Adds selected. This value can be retrieved the selectValue method using the key UIConstants.SELECTED_KEY

getSelected

public java.lang.Boolean getSelected()

setDestination

public void setDestination(java.lang.String destination)
Adds destination. This value can be retrieved in the selectValue method using the key UIConstants.DESTINATION_KEY

getDestination

public java.lang.String getDestination()

setDestinationText

public void setDestinationText(java.lang.String destinationText)
Adds destinationText. This value can be retrieved in the selectValue method using the key UIConstants.DESTINATION_TEXT_KEY

getDestinationText

public java.lang.String getDestinationText()

setExpandable

public void setExpandable(java.lang.String expandable)
Adds expandable. This value can be retrieved in the selectValue method using the key UIConstants.EXPANDABLE_KEY

expandable should only be the following values


getExpandable

public java.lang.String getExpandable()
Limited return values.

Should return one of the following values


setExpandDestination

public void setExpandDestination(java.lang.String expandDestination)
Adds expandDestination. This value can be retrieved in the selectValue method using the key UIConstants.EXPAND_DESINATION_KEY

getExpandDestination

public java.lang.String getExpandDestination()

setCollapseDestination

public void setCollapseDestination(java.lang.String collapseDestination)
Adds collapseDestination. This value can be retrieved in the selectValue method using the key UIConstants.COLLAPSE_DESINATION_KEY

getCollapseDestination

public java.lang.String getCollapseDestination()

setDescription

public void setDescription(java.lang.String description)
Adds description. This value can be retrieved in the selectValue method using the key UIConstants.DESCRIPTION_KEY

getDescription

public java.lang.String getDescription()

selectValue

public java.lang.Object selectValue(RenderingContext context,
                                    java.lang.Object select)
returns a value given a select key
Specified by:
selectValue in interface DataObject
Following copied from interface: oracle.cabo.ui.data.DataObject
Parameters:
context - the current rendering context
select - a select criterion, syntax as defined by the data object

put

public void put(java.lang.Object select,
                java.lang.Object data)
Add a key/value pair. Used to add a key/value pairs for which there are no convenience methods.

getChild

public DataObject getChild(int index)

addChild

public void addChild(DataObject child)
Adds the child. All the children added in total, including the total of those added with this method and the addChildren method, can be retrieved together in the selectValue method using the key UIConstants.NODES_KEY

addChildren

public void addChildren(DataObjectList children)

addChildren

public void addChildren(DataObject[] children)
Adds the children in the array. All the children added in total, including the total of those added with this method and the addChild method, can be retrieved together in the selectValue method using the key UIConstants.NODES_KEY

getChildren

public DataObjectList getChildren()

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.