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

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.layout.AbsoluteLayoutWidget
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 AbsoluteLayoutWidget
extends com.sap.ui.core.client.ControlWidget

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

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
  AbsoluteLayoutWidget()
          constructs the class AbsoluteLayoutWidget
protected AbsoluteLayoutWidget(AbsoluteLayout control)
          constructs the class AbsoluteLayoutWidget
  AbsoluteLayoutWidget(String id)
          constructs the class AbsoluteLayoutWidget
 
Method Summary
 void addContent(com.sap.ui.core.client.Control content)
          Appends some content to the content-aggregation.
 void 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.
 AbsoluteLayout getControl()
          returns the reference to the Phoenix Control
 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.
 void 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
 void removeAllContent()
          Removes all the items in the content-aggregation.
 void removeContent(int index)
          Removes the content at position index in the content-aggregation named.
 void setHeight(String value)
          Setter for property height
 void 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.
 void setVerticalScrolling(com.sap.ui.core.client.Scrolling value)
          Setter for property verticalScrolling
Default value is: Hidden
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
 
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, getTitle, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbsoluteLayoutWidget

public AbsoluteLayoutWidget()
constructs the class AbsoluteLayoutWidget


AbsoluteLayoutWidget

public AbsoluteLayoutWidget(String id)
constructs the class AbsoluteLayoutWidget

Parameters:
id - id of the AbsoluteLayoutWidget

AbsoluteLayoutWidget

protected AbsoluteLayoutWidget(AbsoluteLayout control)
constructs the class AbsoluteLayoutWidget

Parameters:
control - reference to an existing AbsoluteLayout
Method Detail

getControl

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

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

isVisible

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

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

setVisible

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

Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - boolean

getWidth

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

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

getHeight

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

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

getVerticalScrolling

public 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 void setVerticalScrolling(com.sap.ui.core.client.Scrolling value)
Setter for property verticalScrolling
Default value is: Hidden

Parameters:
value - com.sap.ui.core.client.Scrolling

getHorizontalScrolling

public 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 void setHorizontalScrolling(com.sap.ui.core.client.Scrolling value)
Setter for property horizontalScrolling
Default value is: Hidden

Parameters:
value - com.sap.ui.core.client.Scrolling

getContent

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

addContent

public void addContent(com.sap.ui.core.client.Control content)
Appends some content to the content-aggregation.

Parameters:
content - com.sap.ui.core.client.Control the content to add

removeContent

public void removeContent(int index)
Removes the content at position index in the content-aggregation named.

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

removeAllContent

public void removeAllContent()
Removes all the items in the content-aggregation.


indexOfContent

public 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 void destroyContent()
Destroys all the content in the Content-aggregation.


setPositionOfChild

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