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

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

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

A matrix layout arranges controls in a grid structure, using rows which need not have the same number of cells.

It uses predefined cell classes that guarantee appropriate distances between cells in the grid. The cell's vGutter property lets you specify additional horizontal distances easily. You can set these additional distances (known as gutters) with or without separators. The distance for each cell is specified by assigning a specific enumeration value of the class LayoutCellSeparator of the matrix data object.

You should avoid nesting matrix layouts. You should only use a matrix layout if you need to align controls horizontally across rows.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: d029921)

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
  MatrixLayoutWidget()
          constructs the class MatrixLayoutWidget
protected MatrixLayoutWidget(MatrixLayout control)
          constructs the class MatrixLayoutWidget
  MatrixLayoutWidget(String id)
          constructs the class MatrixLayoutWidget
 
Method Summary
 void addRow(MatrixLayoutRow row)
          Appends some row to the rows-aggregation.
 MatrixLayout createRow(com.sap.ui.core.client.Control... controls)
          Creates a new matrix layout row and appends it to this matrix layout.
 void destroyRows()
          Destroys all the rows in the Rows-aggregation.
 int getColumns()
          Getter for property columns Number of columns.
 MatrixLayout getControl()
          returns the reference to the Phoenix Control
 String getHeight()
          Getter for property height CSS height of the matrix layout.
 com.sap.ui.core.client.js.JsArray<MatrixLayoutRow> getRows()
          Getter for aggregation rows The matrix layout's individual rows.
 String getWidth()
          Getter for property width CSS width of the matrix layout.
 int indexOfRow(MatrixLayoutRow row)
          Checks for the provided com.sap.ui.commons.client.layout.MatrixLayoutRow in the rows-aggregation and returns its index if found or -1 otherwise.
 void insertRow(MatrixLayoutRow row, int index)
          Inserts some row into the aggregation named rows.
 boolean isLayoutFixed()
          Getter for property layoutFixed Sets the table layout.
 boolean isVisible()
          Getter for property visible Determines whether the matrix layout, including all its content, is visible.
 void removeAllRows()
          Removes all the items in the rows-aggregation.
 void removeRow(int index)
          Removes the row at position index in the rows-aggregation named.
 void setColumns(int value)
          Setter for property columns
 void setHeight(String value)
          Setter for property height
 void setLayoutFixed(boolean value)
          Setter for property layoutFixed
Default value is: true
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
 MatrixLayout setWidths(String... widths)
          Set the widths of the colums.
 
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

MatrixLayoutWidget

public MatrixLayoutWidget()
constructs the class MatrixLayoutWidget


MatrixLayoutWidget

public MatrixLayoutWidget(String id)
constructs the class MatrixLayoutWidget

Parameters:
id - id of the MatrixLayoutWidget

MatrixLayoutWidget

protected MatrixLayoutWidget(MatrixLayout control)
constructs the class MatrixLayoutWidget

Parameters:
control - reference to an existing MatrixLayout
Method Detail

getControl

public MatrixLayout 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 Determines whether the matrix layout, including all its content, is visible. An invisible control will not be rendered.

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 CSS width of the matrix layout. If the LayoutFixed = true a adequate width should be provided.

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 CSS height of the matrix layout.

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

isLayoutFixed

public boolean isLayoutFixed()
Getter for property layoutFixed Sets the table layout. If fixed the width parameter of a column has priority, if not the width of the content of the colums has priority. The default is "fixed". If the fixed layout is used a adequate width of the MatrixLayout should be provided. Otherwise the column width displayed could be different than the given ones because of browser dependend optimazations.

Returns:
the value of property layoutFixed

setLayoutFixed

public void setLayoutFixed(boolean value)
Setter for property layoutFixed
Default value is: true

Parameters:
value - boolean

getColumns

public int getColumns()
Getter for property columns Number of columns. If not specified, the number of columns will be determined from the given cells.

Returns:
the value of property columns

setColumns

public void setColumns(int value)
Setter for property columns

Parameters:
value - int

getRows

public com.sap.ui.core.client.js.JsArray<MatrixLayoutRow> getRows()
Getter for aggregation rows The matrix layout's individual rows.

Returns:
com.sap.ui.commons.client.layout.MatrixLayoutRow[]

insertRow

public void insertRow(MatrixLayoutRow row,
                      int index)
Inserts some row into the aggregation named rows.

Parameters:
row - the row to insert
index - int the 0-based index the row should be inserted at.

addRow

public void addRow(MatrixLayoutRow row)
Appends some row to the rows-aggregation.

Parameters:
row - com.sap.ui.commons.client.layout.MatrixLayoutRow the row to add

removeRow

public void removeRow(int index)
Removes the row at position index in the rows-aggregation named.

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

removeAllRows

public void removeAllRows()
Removes all the items in the rows-aggregation.


indexOfRow

public int indexOfRow(MatrixLayoutRow row)
Checks for the provided com.sap.ui.commons.client.layout.MatrixLayoutRow in the rows-aggregation and returns its index if found or -1 otherwise.

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

destroyRows

public void destroyRows()
Destroys all the rows in the Rows-aggregation.


createRow

public MatrixLayout createRow(com.sap.ui.core.client.Control... controls)
Creates a new matrix layout row and appends it to this matrix layout.

Parameters:
controls - Each argument must be either a matrix layout cell, which is added to the row "as is", or an arbitrary content control, which is wrapped with a new (default) matrix layout cell first and then added to the row. Supports a variable number of arguments!

setWidths

public MatrixLayout setWidths(String... widths)
Set the widths of the colums. This property supports a variable number of arguments! For each column a width must be defined. If a column shall get a default (not specified) witdth set the value to null. If this method is used to set the column widths the whidth parameter of the MatrixCells is ignored.

Parameters:
widths - Widths of the columns. Use an array to define the widths of the columns.


Copyright © 2011 SAP. All Rights Reserved.