com.sap.ui.commons.client.layout
Class AbsoluteLayout

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.layout.AbsoluteLayout

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

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

The Absolute Layout positions its child controls absolutely. When a child control is added (or explicitly with function 'setPositionOfChild') it is possible to define the position of this control via a JSON-like object which can have the following properties: - top (type: sap.ui.core/CSSSize): Defines the distance to the top of the layout as specified in HTML. - bottom (type: sap.ui.core/CSSSize): Defines the distance of the bottom of the layout as specified in HTML. - left (type: sap.ui.core/CSSSize): Defines the distance of the left of the layout as specified in HTML. - right (type: sap.ui.core/CSSSize): Defines the distance of the right of the layout as specified in HTML. - wrap (type: boolean): Defines whether the child control should be wrapped with a div (default=false). More details below. - wrapWidth (type: sap.ui.core/CSSSize): Width of the wrapping span (see parameter wrap). - wrapHeight (type: sap.ui.core/CSSSize): Height of the wrapping span (see parameter wrap). If no top and bottom is set top=0px is used. If no left and right is set left=0px is used. Meaning of wrap parameter: - wrap=false (default): The child control is directly embedded into the layout without additional markup (as far as this is possible). The given position information is applied to the root tag of the control. In case the control has a property "width", the value of this property is not "auto" or "inherited", and left and right are both defined in the position information a collision occurs. In this case the right position is ignored. A control which does not provide a property "width" is interpreted as not stretchable. Therefore also here the right position is ignored, if left and right are both defined in the position information. The same mechanism is valid for property "height" and position information top/bottom. Due to this collision detection it is necessary for an application to explicitly call invalidate() on the AbsoluteLayout when the width/height of a child control is changed after it was added to the layout and was rendered already. - wrap=true: The child control is wrapped with a div HTML tag. The given position information is applied to this tag. The width/height of this tag can be influenced by the parameter wrapWidth and wrapHeight (both sap.ui.core/CSSSize). The width and height attributes of the child control (if available) must be used to change the visual size of the child control. Since additional HTML markup is used the option wrap=true should only be used if really needed.

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

Constructor Summary
protected AbsoluteLayout()
          constructs the class AbsoluteLayout
hidden due to JavaScriptObject restriction
 
Method Summary
 AbsoluteLayout addContent(com.sap.ui.core.client.Control content)
          Appends a content to the aggregation content.
static AbsoluteLayout create()
          creates a new instance of the class AbsoluteLayout
static AbsoluteLayout create(String idOrConfig)
          creates a new instance of the class AbsoluteLayout
static AbsoluteLayout create(String id, String config)
          creates a new instance of the class AbsoluteLayout
 AbsoluteLayout destroyContent()
          Destroys all the content in the Content-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getContent()
          Getter for aggregation content Child Controls within the layout.
 String getHeight()
          Getter for property height The height of the AbsoluteLayout.
 com.sap.ui.core.client.Scrolling getHorizontalScrolling()
          Getter for property horizontalScrolling The horizontal scrolling mode.
 com.sap.ui.core.client.Scrolling getVerticalScrolling()
          Getter for property verticalScrolling The vertical scrolling mode.
 String getWidth()
          Getter for property width The width of the AbsoluteLayout.
 int indexOfContent(com.sap.ui.core.client.Control content)
          Checks for the provided com.sap.ui.core.client.Control in the content-aggregation and returns its index if found or -1 otherwise.
 AbsoluteLayout insertContent(com.sap.ui.core.client.Control content, int index)
          Inserts some content into the aggregation named content.
 boolean isVisible()
          Getter for property visible The visibility of the AbsoluteLayout
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllContent()
          Removes all the items in the content-aggregation.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeContent(int index)
          Removes a content from the aggregation named content.
 AbsoluteLayout setHeight(String value)
          Setter for property height
 AbsoluteLayout setHorizontalScrolling(com.sap.ui.core.client.Scrolling value)
          Setter for property horizontalScrolling
Default value is: Hidden
 void setPositionOfChild(com.sap.ui.core.client.Control child, Object position)
          Adds some position information to the child oChild in the aggregation named children.
 AbsoluteLayout setVerticalScrolling(com.sap.ui.core.client.Scrolling value)
          Setter for property verticalScrolling
Default value is: Hidden
 AbsoluteLayout setVisible(boolean value)
          Setter for property visible
Default value is: true
 AbsoluteLayout setWidth(String value)
          Setter for property width
 
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

AbsoluteLayout

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

Method Detail

create

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


create

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

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

create

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

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

isVisible

public final boolean isVisible()
Getter for property visible The visibility of the AbsoluteLayout

Returns:
the value of property visible

setVisible

public final AbsoluteLayout setVisible(boolean value)
Setter for property visible
Default value is: true

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

getWidth

public final String getWidth()
Getter for property width The width of the AbsoluteLayout. When not set, 100% is used.

Returns:
the value of property width

setWidth

public final AbsoluteLayout setWidth(String value)
Setter for property width

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

getHeight

public final String getHeight()
Getter for property height The height of the AbsoluteLayout. When not set, 100% is used.

Returns:
the value of property height

setHeight

public final AbsoluteLayout setHeight(String value)
Setter for property height

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

getVerticalScrolling

public final com.sap.ui.core.client.Scrolling getVerticalScrolling()
Getter for property verticalScrolling The vertical scrolling mode. When not set, 'Hidden' is used.

Returns:
the value of property verticalScrolling

setVerticalScrolling

public final AbsoluteLayout setVerticalScrolling(com.sap.ui.core.client.Scrolling value)
Setter for property verticalScrolling
Default value is: Hidden

Parameters:
value - com.sap.ui.core.client.Scrolling
Returns:
this to allow method chaining

getHorizontalScrolling

public final com.sap.ui.core.client.Scrolling getHorizontalScrolling()
Getter for property horizontalScrolling The horizontal scrolling mode. When not set, 'Hidden' is used.

Returns:
the value of property horizontalScrolling

setHorizontalScrolling

public final AbsoluteLayout setHorizontalScrolling(com.sap.ui.core.client.Scrolling value)
Setter for property horizontalScrolling
Default value is: Hidden

Parameters:
value - com.sap.ui.core.client.Scrolling
Returns:
this to allow method chaining

getContent

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getContent()
Getter for aggregation content Child Controls within the layout.

Returns:
com.sap.ui.core.client.Control[]

insertContent

public final AbsoluteLayout insertContent(com.sap.ui.core.client.Control content,
                                          int index)
Inserts some content into the aggregation named content.

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

addContent

public final AbsoluteLayout addContent(com.sap.ui.core.client.Control content)
Appends a content to the aggregation content.

Parameters:
content - com.sap.ui.core.client.Control the content to add
Returns:
this to allow method chaining

removeContent

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> removeContent(int index)
Removes a content from the aggregation named content.

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

removeAllContent

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control>> removeAllContent()
Removes all the items in the content-aggregation.

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

indexOfContent

public final int indexOfContent(com.sap.ui.core.client.Control content)
Checks for the provided com.sap.ui.core.client.Control in the content-aggregation and returns its index if found or -1 otherwise.

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

destroyContent

public final AbsoluteLayout destroyContent()
Destroys all the content in the Content-aggregation.

Returns:
this to allow method chaining

setPositionOfChild

public final void setPositionOfChild(com.sap.ui.core.client.Control child,
                                     Object position)
Adds some position information to the child oChild in the aggregation named children.

Parameters:
child - The child to add the position information; if empty or not contained in aggregation named children, nothing is inserted
position - JSON-like object which defines the position of the child control in the absolute layout. The object is expected to have one or more out of the attributes top, bottom, left, right (each with a value of type sap.ui.core.CSSSize). If no object is given the default (left=0px,right=0px) is used.


Copyright © 2011 SAP. All Rights Reserved.