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

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

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

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: sap.ui.commons.layout.MatrixLayout)

Constructor Summary
protected MatrixLayout()
          constructs the class MatrixLayout
hidden due to JavaScriptObject restriction
 
Method Summary
 MatrixLayout addRow(MatrixLayoutRow row)
          Appends a row to the aggregation rows.
static MatrixLayout create()
          creates a new instance of the class MatrixLayout
static MatrixLayout create(String idOrConfig)
          creates a new instance of the class MatrixLayout
static MatrixLayout create(String id, String config)
          creates a new instance of the class MatrixLayout
 MatrixLayout createRow(com.sap.ui.core.client.Control... controls)
          Creates a new matrix layout row and appends it to this matrix layout.
 MatrixLayout destroyRows()
          Destroys all the rows in the Rows-aggregation.
 int getColumns()
          Getter for property columns Number of columns.
 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.
 MatrixLayout 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.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MatrixLayoutRow>> removeAllRows()
          Removes all the items in the rows-aggregation.
 com.sap.ui.core.client.js.JsArray<MatrixLayoutRow> removeRow(int index)
          Removes a row from the aggregation named rows.
 MatrixLayout setColumns(int value)
          Setter for property columns
 MatrixLayout setHeight(String value)
          Setter for property height
 MatrixLayout setLayoutFixed(boolean value)
          Setter for property layoutFixed
Default value is: true
 MatrixLayout setVisible(boolean value)
          Setter for property visible
Default value is: true
 MatrixLayout 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.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

MatrixLayout

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

Method Detail

create

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


create

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

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

create

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

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

isVisible

public final boolean isVisible()
Getter for property visible Determines whether the matrix layout, including all its content, is visible. An invisible control will not be rendered.

Returns:
the value of property visible

setVisible

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

Returns:
the value of property width

setWidth

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

Returns:
the value of property height

setHeight

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

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

isLayoutFixed

public final 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 final MatrixLayout setLayoutFixed(boolean value)
Setter for property layoutFixed
Default value is: true

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

getColumns

public final 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 final MatrixLayout setColumns(int value)
Setter for property columns

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

getRows

public final 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 final MatrixLayout 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.
Returns:
this to allow method chaining

addRow

public final MatrixLayout addRow(MatrixLayoutRow row)
Appends a row to the aggregation rows.

Parameters:
row - com.sap.ui.commons.client.layout.MatrixLayoutRow the row to add
Returns:
this to allow method chaining

removeRow

public final com.sap.ui.core.client.js.JsArray<MatrixLayoutRow> removeRow(int index)
Removes a row from the aggregation named rows.

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

removeAllRows

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<MatrixLayoutRow>> removeAllRows()
Removes all the items in the rows-aggregation.

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

indexOfRow

public final 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 final MatrixLayout destroyRows()
Destroys all the rows in the Rows-aggregation.

Returns:
this to allow method chaining

createRow

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