com.sap.ui.commons.client
Class Tree

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.Tree

public class Tree
extends com.sap.ui.core.client.Control

The class Tree is the GWT wrapper for the Phoenix control: sap.ui.commons.Tree.

Simple tree to display item in a hierarchical way

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.Tree)

Constructor Summary
protected Tree()
          constructs the class Tree
hidden due to JavaScriptObject restriction
 
Method Summary
 Tree addNode(TreeNode node)
          Appends a node to the aggregation nodes.
 void collapseAll()
          Collapses all nodes in the tree
static Tree create()
          creates a new instance of the class Tree
static Tree create(String idOrConfig)
          creates a new instance of the class Tree
static Tree create(String id, String config)
          creates a new instance of the class Tree
 Tree destroyNodes()
          Destroys all the nodes in the Nodes-aggregation.
 void expandAll()
          Expands all nodes in the tree
 String getHeight()
          Getter for property height Tree height
 String getMinWidth()
          Getter for property minWidth Minimal width for the Tree.
 com.sap.ui.core.client.js.JsArray<TreeNode> getNodes()
          Getter for aggregation nodes First level nodes
 String getTitle()
          Getter for property title Tree title
 String getWidth()
          Getter for property width Tree width
 int indexOfNode(TreeNode node)
          Checks for the provided com.sap.ui.commons.client.TreeNode in the nodes-aggregation and returns its index if found or -1 otherwise.
 Tree insertNode(TreeNode node, int index)
          Inserts some node into the aggregation named nodes.
 boolean isShowHeader()
          Getter for property showHeader Tree Header is display.
 boolean isShowHeaderIcons()
          Getter for property showHeaderIcons Show Header icons (e.g.
 boolean isShowHorizontalScrollbar()
          Getter for property showHorizontalScrollbar Display horizontal scrollbar.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<TreeNode>> removeAllNodes()
          Removes all the items in the nodes-aggregation.
 com.sap.ui.core.client.js.JsArray<TreeNode> removeNode(int index)
          Removes a node from the aggregation named nodes.
 Tree setHeight(String value)
          Setter for property height
Default value is: auto
 Tree setMinWidth(String value)
          Setter for property minWidth
 Tree setShowHeader(boolean value)
          Setter for property showHeader
Default value is: true
 Tree setShowHeaderIcons(boolean value)
          Setter for property showHeaderIcons
Default value is: true
 Tree setShowHorizontalScrollbar(boolean value)
          Setter for property showHorizontalScrollbar
Default value is: false
 Tree setTitle(String value)
          Setter for property title
 Tree setWidth(String value)
          Setter for property width
Default value is: auto
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tree

protected Tree()
constructs the class Tree
hidden due to JavaScriptObject restriction

Method Detail

create

public static Tree create()
creates a new instance of the class Tree


create

public static Tree create(String idOrConfig)
creates a new instance of the class Tree

Parameters:
id - id of the Tree or configuration JSON string

create

public static Tree create(String id,
                          String config)
creates a new instance of the class Tree

Parameters:
id - id of the Tree
config - configuration JSON string

getTitle

public final String getTitle()
Getter for property title Tree title

Returns:
the value of property title

setTitle

public final Tree setTitle(String value)
Setter for property title

Parameters:
value - String
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Tree width

Returns:
the value of property width

setWidth

public final Tree setWidth(String value)
Setter for property width
Default value is: auto

Parameters:
value - String
Returns:
this to allow method chaining

getHeight

public final String getHeight()
Getter for property height Tree height

Returns:
the value of property height

setHeight

public final Tree setHeight(String value)
Setter for property height
Default value is: auto

Parameters:
value - String
Returns:
this to allow method chaining

isShowHeader

public final boolean isShowHeader()
Getter for property showHeader Tree Header is display. If false, the tree will be in a transparent mode

Returns:
the value of property showHeader

setShowHeader

public final Tree setShowHeader(boolean value)
Setter for property showHeader
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isShowHeaderIcons

public final boolean isShowHeaderIcons()
Getter for property showHeaderIcons Show Header icons (e.g. Expand/Collapse all). Only consider if showHeader is true

Returns:
the value of property showHeaderIcons

setShowHeaderIcons

public final Tree setShowHeaderIcons(boolean value)
Setter for property showHeaderIcons
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isShowHorizontalScrollbar

public final boolean isShowHorizontalScrollbar()
Getter for property showHorizontalScrollbar Display horizontal scrollbar. If false, the overflow content will be hidden

Returns:
the value of property showHorizontalScrollbar

setShowHorizontalScrollbar

public final Tree setShowHorizontalScrollbar(boolean value)
Setter for property showHorizontalScrollbar
Default value is: false

Parameters:
value - boolean
Returns:
this to allow method chaining

getMinWidth

public final String getMinWidth()
Getter for property minWidth Minimal width for the Tree. Can be useful when, for example, the width is specified in percentage, to avoid the tree to become too narrow when container is resize

Returns:
the value of property minWidth

setMinWidth

public final Tree setMinWidth(String value)
Setter for property minWidth

Parameters:
value - String
Returns:
this to allow method chaining

getNodes

public final com.sap.ui.core.client.js.JsArray<TreeNode> getNodes()
Getter for aggregation nodes First level nodes

Returns:
com.sap.ui.commons.client.TreeNode[]

insertNode

public final Tree insertNode(TreeNode node,
                             int index)
Inserts some node into the aggregation named nodes.

Parameters:
node - the node to insert
index - int the 0-based index the node should be inserted at.
Returns:
this to allow method chaining

addNode

public final Tree addNode(TreeNode node)
Appends a node to the aggregation nodes.

Parameters:
node - com.sap.ui.commons.client.TreeNode the node to add
Returns:
this to allow method chaining

removeNode

public final com.sap.ui.core.client.js.JsArray<TreeNode> removeNode(int index)
Removes a node from the aggregation named nodes.

Parameters:
index - int the position of the node to remove.
Returns:
reference to this instance

removeAllNodes

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<TreeNode>> removeAllNodes()
Removes all the items in the nodes-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfNode

public final int indexOfNode(TreeNode node)
Checks for the provided com.sap.ui.commons.client.TreeNode in the nodes-aggregation and returns its index if found or -1 otherwise.

Parameters:
node - the node whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyNodes

public final Tree destroyNodes()
Destroys all the nodes in the Nodes-aggregation.

Returns:
this to allow method chaining

expandAll

public final void expandAll()
Expands all nodes in the tree


collapseAll

public final void collapseAll()
Collapses all nodes in the tree



Copyright © 2011 SAP. All Rights Reserved.