com.sap.ui.core.client
Class Element

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
Direct Known Subclasses:
Control, Item, TooltipBase

public class Element
extends com.google.gwt.core.client.JavaScriptObject

The class Element is the wrapper JavaScriptObject for the Phoenix JS element. The basic functions have been implemented inside the Element to allow a nearly JS like interaction.

Version:
1.0 - 02.05.2010 11:38:14, Revision Version: ($Revision: #5 $), Revision Date: ($Date: 2011/06/29 $)
Author:
D039071@exchange.sap.corp, Revision Author: ($Author: d039071 $)

Constructor Summary
protected Element()
          constructs the class Element
hidden due to JavaScriptObject restriction
 
Method Summary
protected  com.google.gwt.core.client.JsArrayBoolean _convertArray(boolean[] arr)
          converts a boolean Java array into a boolean JavaScript array
protected  com.google.gwt.core.client.JsArrayNumber _convertArray(double[] arr)
          converts a double Java array into a double JavaScript array
protected  com.google.gwt.core.client.JsArrayInteger _convertArray(int[] arr)
          converts a int Java array into a int JavaScript array
protected  com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> _convertArray(com.google.gwt.core.client.JavaScriptObject[] arr)
          converts a JavaScriptObject Java array into a JavaScriptObject JavaScript array
protected  com.google.gwt.core.client.JsArrayString _convertArray(String[] arr)
          converts a String Java array into a String JavaScript array
 Element attachBrowserEvent(String nativeEventId, EventListener listener)
          attaches an event listener for the given event id
 Element attachEvent(String eventId, EventListener listener)
          attaches an event listener for the given event id
 Element bindAggregation(String name, String path, Element template)
          binds an aggregation to the model with the specified path and a specified template Element which should be used for rendering the aggregation
 Element bindContext(String path)
          set the binding path for an already bound property or aggregation to a new path.
 Element bindProperty(String name, String path)
          binds a property to the model with the specified path and optionally uses a Formatter to convert/format the value.
 Element bindProperty(String name, String path, Formatter formatter)
          binds a property to the model with the specified path and optionally uses a Formatter to convert/format the value.
 void destroy()
          cleans up the resources associated with this element and all its children.
 Element detachBrowserEvent(String eventId, EventListener listener)
          detaches an event listener for the given event id
 Element detachEvent(String eventId, EventListener listener)
          detaches an event listener for the given event id
 com.google.gwt.user.client.Element getDomRef()
          returns the HTML Element of the Control
 String getElementName()
          returns the element name of the Element
 String getId()
          returns the ID of the Element
 String getLibraryName()
          returns the library name of the Element
 Model getModel()
          returns the reference to the Model
 Element getParent()
          returns the parent Element of the Element
 com.google.gwt.core.client.JavaScriptObject getProperty(String name)
          returns a properties value of the Element for the given property name
 String getTooltip_AsString()
          returns the value of a simple tooltip as String
 String getTooltip_Text()
          returns the text of TooltipBase Element as String
 TooltipBase getTooltip()
          returns the reference to the TooltipBase Element
 boolean isActive()
          returns the whether the Element has a parent or not
 Element setModel(Model model)
          sets the reference to a Model
 Element setProperty(String name, com.google.gwt.core.client.JavaScriptObject value, boolean suppressRerendering)
          sets a properties value of the Element for the given property name
 Element setTooltip(String value)
          sets the value of a simple tooltip as String
 Element setTooltip(TooltipBase tooltip)
          sets the reference to the TooltipBase Element
 Element unbindAggregation(String name)
          unbinds an aggregation by its name
 Element unbindContext()
          set the binding path for an already bound property or aggregation to a new path.
 Element unbindProperty(String name)
          unbinds a property specified by its name
 
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

Element

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

Method Detail

destroy

public final void destroy()
cleans up the resources associated with this element and all its children.


getParent

public final Element getParent()
returns the parent Element of the Element

Returns:
ID of the control

getId

public final String getId()
returns the ID of the Element

Returns:
ID of the Element

getElementName

public final String getElementName()
returns the element name of the Element

Returns:
element name of the Element

getLibraryName

public final String getLibraryName()
returns the library name of the Element

Returns:
library name of the Element

getDomRef

public final com.google.gwt.user.client.Element getDomRef()
returns the HTML Element of the Control

Returns:
HTML Element of the Control

isActive

public final boolean isActive()
returns the whether the Element has a parent or not

Returns:
true if the the Element has a parent

getTooltip

public final TooltipBase getTooltip()
returns the reference to the TooltipBase Element

Returns:
reference to the TooltipBase Element

getTooltip_AsString

public final String getTooltip_AsString()
returns the value of a simple tooltip as String

Returns:
value of a simple tooltip as String

getTooltip_Text

public final String getTooltip_Text()
returns the text of TooltipBase Element as String

Returns:
text of TooltipBase Element as String

setTooltip

public final Element setTooltip(String value)
sets the value of a simple tooltip as String

Parameters:
value - the value of a simple tooltip as String
Returns:
this to allow method chaining

setTooltip

public final Element setTooltip(TooltipBase tooltip)
sets the reference to the TooltipBase Element

Parameters:
tooltip - the reference to the TooltipBase Element
Returns:
this to allow method chaining

getProperty

public final com.google.gwt.core.client.JavaScriptObject getProperty(String name)
returns a properties value of the Element for the given property name

Parameters:
name - the name of the property
Returns:
the value of the property as JavaScriptObject

setProperty

public final Element setProperty(String name,
                                 com.google.gwt.core.client.JavaScriptObject value,
                                 boolean suppressRerendering)
sets a properties value of the Element for the given property name

Parameters:
name - the name of the property
value - the value of the property as JavaScriptObject
suppressRerendering - true, if the rerendering should be triggered (or false)
Returns:
this to allow method chaining

attachEvent

public final Element attachEvent(String eventId,
                                 EventListener listener)
attaches an event listener for the given event id

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

detachEvent

public final Element detachEvent(String eventId,
                                 EventListener listener)
detaches an event listener for the given event id

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

attachBrowserEvent

public final Element attachBrowserEvent(String nativeEventId,
                                        EventListener listener)
attaches an event listener for the given event id

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

detachBrowserEvent

public final Element detachBrowserEvent(String eventId,
                                        EventListener listener)
detaches an event listener for the given event id

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

getModel

public final Model getModel()
returns the reference to the Model

Returns:
reference to the Model

setModel

public final Element setModel(Model model)
sets the reference to a Model

Parameters:
model - reference to the Model
Returns:
this to allow method chaining

bindContext

public final Element bindContext(String path)
set the binding path for an already bound property or aggregation to a new path.

Parameters:
path - the binding path
Returns:
this to allow method chaining

unbindContext

public final Element unbindContext()
set the binding path for an already bound property or aggregation to a new path.

Parameters:
path - the binding path
Returns:
this to allow method chaining

bindProperty

public final Element bindProperty(String name,
                                  String path)
binds a property to the model with the specified path and optionally uses a Formatter to convert/format the value.

Parameters:
name - the name of the property
path - the binding path
Returns:
this to allow method chaining

bindProperty

public final Element bindProperty(String name,
                                  String path,
                                  Formatter formatter)
binds a property to the model with the specified path and optionally uses a Formatter to convert/format the value.

Parameters:
name - the name of the property
path - the binding path
formatter - optionally the reference to a Formatter
Returns:
this to allow method chaining

unbindProperty

public final Element unbindProperty(String name)
unbinds a property specified by its name

Parameters:
name - the name of the property
Returns:
this to allow method chaining

bindAggregation

public final Element bindAggregation(String name,
                                     String path,
                                     Element template)
binds an aggregation to the model with the specified path and a specified template Element which should be used for rendering the aggregation

Parameters:
name - the name of the aggregation
path - the binding path
template - the template Element
Returns:
this to allow method chaining

unbindAggregation

public final Element unbindAggregation(String name)
unbinds an aggregation by its name

Parameters:
name - the name of the aggregation
Returns:
this to allow method chaining

_convertArray

protected final com.google.gwt.core.client.JsArray<com.google.gwt.core.client.JavaScriptObject> _convertArray(com.google.gwt.core.client.JavaScriptObject[] arr)
converts a JavaScriptObject Java array into a JavaScriptObject JavaScript array

Parameters:
arr - JavaScriptObject Java array
Returns:
JavaScriptObject JavaScript array

_convertArray

protected final com.google.gwt.core.client.JsArrayString _convertArray(String[] arr)
converts a String Java array into a String JavaScript array

Parameters:
arr - String Java array
Returns:
String JavaScript array

_convertArray

protected final com.google.gwt.core.client.JsArrayBoolean _convertArray(boolean[] arr)
converts a boolean Java array into a boolean JavaScript array

Parameters:
arr - boolean Java array
Returns:
boolean JavaScript array

_convertArray

protected final com.google.gwt.core.client.JsArrayInteger _convertArray(int[] arr)
converts a int Java array into a int JavaScript array

Parameters:
arr - int Java array
Returns:
int JavaScript array

_convertArray

protected final com.google.gwt.core.client.JsArrayNumber _convertArray(double[] arr)
converts a double Java array into a double JavaScript array

Parameters:
arr - double Java array
Returns:
double JavaScript array


Copyright © 2011 SAP. All Rights Reserved.