com.sap.ui.commons.client
Class TreeNode

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

public class TreeNode
extends com.sap.ui.core.client.Element

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

Tree node element

For further parameters see {@link com.sap.ui.core.client.Element

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

Constructor Summary
protected TreeNode()
          constructs the class TreeNode
hidden due to JavaScriptObject restriction
 
Method Summary
 TreeNode addNode(TreeNode node)
          Appends a node to the aggregation nodes.
 TreeNode attachSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Node is selected
 TreeNode attachToggleOpenStateEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Node state has changed.
 void collapse()
          Collapses the node
static TreeNode create()
          creates a new instance of the class TreeNode
static TreeNode create(String idOrConfig)
          creates a new instance of the class TreeNode
static TreeNode create(String id, String config)
          creates a new instance of the class TreeNode
 TreeNode destroyNodes()
          Destroys all the nodes in the Nodes-aggregation.
 TreeNode detachSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Node is selected
 TreeNode detachToggleOpenStateEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Node state has changed.
 void expand()
          Expands the node
 String getIcon()
          Getter for property icon Icon to display in front of the node
 com.sap.ui.core.client.js.JsArray<TreeNode> getNodes()
          Getter for aggregation nodes Subnodes for the current node
 String getText()
          Getter for property text Node text
 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.
 TreeNode insertNode(TreeNode node, int index)
          Inserts some node into the aggregation named nodes.
 boolean isExpanded()
          Getter for property expanded Node is expanded
 boolean isHasExpander()
          Getter for property hasExpander Should the node has an expander.
 boolean isIsSelected()
          Getter for property isSelected Node is selected
 boolean isSelectable()
          Getter for property selectable The node is selectable.
 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.
 void select()
          Select the node, and if any, deselects the previously selected node
 TreeNode setExpanded(boolean value)
          Setter for property expanded
Default value is: true
 TreeNode setHasExpander(boolean value)
          Setter for property hasExpander
Default value is: false
 TreeNode setIcon(String value)
          Setter for property icon
 TreeNode setIsSelected(boolean value)
          Setter for property isSelected
Default value is: false
 TreeNode setSelectable(boolean value)
          Setter for property selectable
Default value is: true
 TreeNode setText(String value)
          Setter for property text
 
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

TreeNode

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

Method Detail

create

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


create

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

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

create

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

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

getText

public final String getText()
Getter for property text Node text

Returns:
the value of property text

setText

public final TreeNode setText(String value)
Setter for property text

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

isExpanded

public final boolean isExpanded()
Getter for property expanded Node is expanded

Returns:
the value of property expanded

setExpanded

public final TreeNode setExpanded(boolean value)
Setter for property expanded
Default value is: true

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

isHasExpander

public final boolean isHasExpander()
Getter for property hasExpander Should the node has an expander.

Returns:
the value of property hasExpander

setHasExpander

public final TreeNode setHasExpander(boolean value)
Setter for property hasExpander
Default value is: false

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

getIcon

public final String getIcon()
Getter for property icon Icon to display in front of the node

Returns:
the value of property icon

setIcon

public final TreeNode setIcon(String value)
Setter for property icon

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

isIsSelected

public final boolean isIsSelected()
Getter for property isSelected Node is selected

Returns:
the value of property isSelected

setIsSelected

public final TreeNode setIsSelected(boolean value)
Setter for property isSelected
Default value is: false

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

isSelectable

public final boolean isSelectable()
Getter for property selectable The node is selectable. If true, clicking on the node text triggers "selected" event

Returns:
the value of property selectable

setSelectable

public final TreeNode setSelectable(boolean value)
Setter for property selectable
Default value is: true

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

getNodes

public final com.sap.ui.core.client.js.JsArray<TreeNode> getNodes()
Getter for aggregation nodes Subnodes for the current node

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

insertNode

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

Returns:
this to allow method chaining

attachToggleOpenStateEvent

public final TreeNode attachToggleOpenStateEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Node state has changed.
Event Parameters:
{sap.ui.core/boolean} opened Node has been opened if true

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachToggleOpenStateEvent

public final TreeNode detachToggleOpenStateEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Node state has changed.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

attachSelectedEvent

public final TreeNode attachSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Node is selected

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachSelectedEvent

public final TreeNode detachSelectedEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Node is selected

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

select

public final void select()
Select the node, and if any, deselects the previously selected node


expand

public final void expand()
Expands the node


collapse

public final void collapse()
Collapses the node



Copyright © 2011 SAP. All Rights Reserved.