com.sap.ui.commons.client
Class TreeWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.TreeWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class TreeWidget
extends com.sap.ui.core.client.ControlWidget

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: )

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  TreeWidget()
          constructs the class TreeWidget
  TreeWidget(String id)
          constructs the class TreeWidget
protected TreeWidget(Tree control)
          constructs the class TreeWidget
 
Method Summary
 void addNode(TreeNode node)
          Appends some node to the nodes-aggregation.
 void collapseAll()
          Collapses all nodes in the tree
 void destroyNodes()
          Destroys all the nodes in the Nodes-aggregation.
 void expandAll()
          Expands all nodes in the tree
 Tree getControl()
          returns the reference to the Phoenix Control
 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.
 void 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.
 void removeAllNodes()
          Removes all the items in the nodes-aggregation.
 void removeNode(int index)
          Removes the node at position index in the nodes-aggregation named.
 void setHeight(String value)
          Setter for property height
Default value is: auto
 void setMinWidth(String value)
          Setter for property minWidth
 void setShowHeader(boolean value)
          Setter for property showHeader
Default value is: true
 void setShowHeaderIcons(boolean value)
          Setter for property showHeaderIcons
Default value is: true
 void setShowHorizontalScrollbar(boolean value)
          Setter for property showHorizontalScrollbar
Default value is: false
 void setTitle(String value)
          Setter for property title
 void setWidth(String value)
          Setter for property width
Default value is: auto
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeWidget

public TreeWidget()
constructs the class TreeWidget


TreeWidget

public TreeWidget(String id)
constructs the class TreeWidget

Parameters:
id - id of the TreeWidget

TreeWidget

protected TreeWidget(Tree control)
constructs the class TreeWidget

Parameters:
control - reference to an existing Tree
Method Detail

getControl

public Tree getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

getTitle

public String getTitle()
Getter for property title Tree title

Overrides:
getTitle in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property title

setTitle

public void setTitle(String value)
Setter for property title

Overrides:
setTitle in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getWidth

public String getWidth()
Getter for property width Tree width

Returns:
the value of property width

setWidth

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

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getHeight

public String getHeight()
Getter for property height Tree height

Returns:
the value of property height

setHeight

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

Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

isShowHeader

public 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 void setShowHeader(boolean value)
Setter for property showHeader
Default value is: true

Parameters:
value - boolean

isShowHeaderIcons

public 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 void setShowHeaderIcons(boolean value)
Setter for property showHeaderIcons
Default value is: true

Parameters:
value - boolean

isShowHorizontalScrollbar

public 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 void setShowHorizontalScrollbar(boolean value)
Setter for property showHorizontalScrollbar
Default value is: false

Parameters:
value - boolean

getMinWidth

public 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 void setMinWidth(String value)
Setter for property minWidth

Parameters:
value - String

getNodes

public 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 void 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.

addNode

public void addNode(TreeNode node)
Appends some node to the nodes-aggregation.

Parameters:
node - com.sap.ui.commons.client.TreeNode the node to add

removeNode

public void removeNode(int index)
Removes the node at position index in the nodes-aggregation named.

Parameters:
index - int the position of the node to remove.

removeAllNodes

public void removeAllNodes()
Removes all the items in the nodes-aggregation.


indexOfNode

public 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 void destroyNodes()
Destroys all the nodes in the Nodes-aggregation.


expandAll

public void expandAll()
Expands all nodes in the tree


collapseAll

public void collapseAll()
Collapses all nodes in the tree



Copyright © 2011 SAP. All Rights Reserved.