|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.data.tree.SimpleTreeData
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
.
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;
}
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 |
public SimpleTreeData()
Method Detail |
public void setTargetFrame(java.lang.String targetFrame)
selectValue
method using the key UIConstants.TARGET_FRAME_KEYpublic java.lang.String getTargetFrame()
public void setText(java.lang.String text)
selectValue
method using the key UIConstants.TEXT_KEYpublic java.lang.String getText()
public void setIcon(java.lang.String icon)
selectValue
method using the key UIConstants.ICON_KEYpublic java.lang.String getIcon()
public void setSelected(boolean selected)
selectValue
method using the key UIConstants.SELECTED_KEYpublic java.lang.Boolean getSelected()
public void setDestination(java.lang.String destination)
selectValue
method using the key UIConstants.DESTINATION_KEYpublic java.lang.String getDestination()
public void setDestinationText(java.lang.String destinationText)
selectValue
method using the key
UIConstants.DESTINATION_TEXT_KEYpublic java.lang.String getDestinationText()
public void setExpandable(java.lang.String expandable)
selectValue
method using the key UIConstants.EXPANDABLE_KEY
expandable should only be the following values
public java.lang.String getExpandable()
Should return one of the following values
public void setExpandDestination(java.lang.String expandDestination)
selectValue
method using the key
UIConstants.EXPAND_DESINATION_KEYpublic java.lang.String getExpandDestination()
public void setCollapseDestination(java.lang.String collapseDestination)
selectValue
method using the key
UIConstants.COLLAPSE_DESINATION_KEYpublic java.lang.String getCollapseDestination()
public void setDescription(java.lang.String description)
selectValue
method using the key UIConstants.DESCRIPTION_KEYpublic java.lang.String getDescription()
public java.lang.Object selectValue(RenderingContext context, java.lang.Object select)
selectValue
in interface DataObject
oracle.cabo.ui.data.DataObject
context
- the current rendering contextselect
- a select criterion, syntax as defined by the data objectpublic void put(java.lang.Object select, java.lang.Object data)
public DataObject getChild(int index)
public void addChild(DataObject child)
addChildren
method, can be retrieved together in the selectValue
method using the key UIConstants.NODES_KEYpublic void addChildren(DataObjectList children)
public void addChildren(DataObject[] children)
addChild
method, can be retrieved together in the
selectValue
method using the key UIConstants.NODES_KEYpublic DataObjectList getChildren()
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |