com.sap.ui.table.client
Class DataTableWidget

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

The class DataTable is the GWT wrapper for the Phoenix control: sap.ui.table.DataTable.

The DataTable Control.

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
  DataTableWidget()
          constructs the class DataTableWidget
protected DataTableWidget(DataTable control)
          constructs the class DataTableWidget
  DataTableWidget(String id)
          constructs the class DataTableWidget
 
Method Summary
 void addColumn(Column column)
          Appends some column to the columns-aggregation.
 void addSelectedIndex(int index)
          Adds the given index to current selection.
 void addSelectedIndices(Integer[] indices)
          Adds the given indices to selection.
 void attachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener fired when a column of the table has been selected
Event Parameters: {sap.ui.table/Column} column reference to the clicked column
 void attachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener fired when a row of the table has been selected
Event Parameters: {sap.ui.core/int} rowIndex index of the selected row {sap.ui.core/object} rowContext binding context of the selected row
 void bindRows(String path, Object sorter, Object[] filters)
          Binds the rows of the DataTable against the given binding path.
 void clearSelection()
          Removes complete selection.
 void destroyColumns()
          Destroys all the columns in the Columns-aggregation.
 void destroyToolbar()
          Destroys the toolbar in the Toolbar-aggregation.
 void detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener fired when a column of the table has been selected
 void detachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener fired when a row of the table has been selected
 com.sap.ui.core.client.js.JsArray<Column> getColumns()
          Getter for aggregation columns Columns of the Table
 Object getContextByIndex(int index)
          Returns the context of a row by its index.
 DataTable getControl()
          returns the reference to the Phoenix Control
 int getExpandedVisibleRowCount()
          Getter for property expandedVisibleRowCount Count of visible rows when expanded
 int getFirstVisibleRow()
          Getter for property firstVisibleRow First visible row
 int getSelectedIndex()
          Zero-based index of selected item.
 Integer[] getSelectedIndices()
          Zero-based indices of selected items, wrapped in an array.
 SelectionMode getSelectionMode()
          Getter for property selectionMode Selection mode of the Table
 String getTitle()
          Getter for property title Title of the Table (if not set/empty) the title will be hidden)
 com.sap.ui.commons.client.Toolbar getToolbar()
          Getter for aggregation toolbar Toolbar of the Table (if not set it will be hidden)
 int getVisibleRowCount()
          Getter for property visibleRowCount Count of visible rows
 String getWidth()
          Getter for property width Width of the Table
 int indexOfColumn(Column column)
          Checks for the provided com.sap.ui.table.client.Column in the columns-aggregation and returns its index if found or -1 otherwise.
 void insertColumn(Column column, int index)
          Inserts some column into the aggregation named columns.
 boolean isEditable()
          Getter for property editable Flag whether the controls of the Table are editable or not
 boolean isExpanded()
          Getter for property expanded Flag whether the Table is expanded or not
 boolean isHierarchical()
          Getter for property hierarchical Flag, whether the table displays its content hierarchical or not **experimental**!!
 boolean isIndexSelected(int index)
          Returns whether the given index is selected.
 void removeAllColumns()
          Removes all the items in the columns-aggregation.
 void removeColumn(int index)
          Removes the column at position index in the columns-aggregation named.
 void removeSelectedIndex(int index)
          Removes the given index from this selection.
 void setEditable(boolean value)
          Setter for property editable
Default value is: false
 void setExpanded(boolean value)
          Setter for property expanded
Default value is: false
 void setExpandedVisibleRowCount(int value)
          Setter for property expandedVisibleRowCount
 void setFirstVisibleRow(int value)
          Setter for property firstVisibleRow
Default value is: 0
 void setHierarchical(boolean value)
          Setter for property hierarchical
Default value is: false
 void setSelectedIndex(int index)
          Sets the zero-based index of the currently selected item.
 void setSelectedIndices(Integer[] indices)
          Zero-based indices of selected items, wrapped in an array.
 void setSelectionMode(SelectionMode value)
          Setter for property selectionMode
Default value is: Multi
 void setTitle(String value)
          Setter for property title
 void setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
          Setter for the aggregated toolbar.
 void setVisibleRowCount(int value)
          Setter for property visibleRowCount
Default value is: 10
 void setWidth(String value)
          Setter for property width
Default value is: auto
 void unbindRows()
          Unbinds the rows of the DataTable.
 
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, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataTableWidget

public DataTableWidget()
constructs the class DataTableWidget


DataTableWidget

public DataTableWidget(String id)
constructs the class DataTableWidget

Parameters:
id - id of the DataTableWidget

DataTableWidget

protected DataTableWidget(DataTable control)
constructs the class DataTableWidget

Parameters:
control - reference to an existing DataTable
Method Detail

getControl

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

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

getTitle

public String getTitle()
Getter for property title Title of the Table (if not set/empty) the title will be hidden)

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

setTitle

public void setTitle(String value)
Setter for property title

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

getWidth

public String getWidth()
Getter for property width Width of the Table

Returns:
the value of property width

setWidth

public void setWidth(String value)
Setter for property width
Default value is: auto

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

getVisibleRowCount

public int getVisibleRowCount()
Getter for property visibleRowCount Count of visible rows

Returns:
the value of property visibleRowCount

setVisibleRowCount

public void setVisibleRowCount(int value)
Setter for property visibleRowCount
Default value is: 10

Parameters:
value - int

getExpandedVisibleRowCount

public int getExpandedVisibleRowCount()
Getter for property expandedVisibleRowCount Count of visible rows when expanded

Returns:
the value of property expandedVisibleRowCount

setExpandedVisibleRowCount

public void setExpandedVisibleRowCount(int value)
Setter for property expandedVisibleRowCount

Parameters:
value - int

getFirstVisibleRow

public int getFirstVisibleRow()
Getter for property firstVisibleRow First visible row

Returns:
the value of property firstVisibleRow

setFirstVisibleRow

public void setFirstVisibleRow(int value)
Setter for property firstVisibleRow
Default value is: 0

Parameters:
value - int

getSelectionMode

public SelectionMode getSelectionMode()
Getter for property selectionMode Selection mode of the Table

Returns:
the value of property selectionMode

setSelectionMode

public void setSelectionMode(SelectionMode value)
Setter for property selectionMode
Default value is: Multi

Parameters:
value - com.sap.ui.table.client.SelectionMode

isEditable

public boolean isEditable()
Getter for property editable Flag whether the controls of the Table are editable or not

Returns:
the value of property editable

setEditable

public void setEditable(boolean value)
Setter for property editable
Default value is: false

Parameters:
value - boolean

isExpanded

public boolean isExpanded()
Getter for property expanded Flag whether the Table is expanded or not

Returns:
the value of property expanded

setExpanded

public void setExpanded(boolean value)
Setter for property expanded
Default value is: false

Parameters:
value - boolean

isHierarchical

public boolean isHierarchical()
Getter for property hierarchical Flag, whether the table displays its content hierarchical or not **experimental**!!

Returns:
the value of property hierarchical

setHierarchical

public void setHierarchical(boolean value)
Setter for property hierarchical
Default value is: false

Parameters:
value - boolean

getColumns

public com.sap.ui.core.client.js.JsArray<Column> getColumns()
Getter for aggregation columns Columns of the Table

Returns:
com.sap.ui.table.client.Column[]

insertColumn

public void insertColumn(Column column,
                         int index)
Inserts some column into the aggregation named columns.

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

addColumn

public void addColumn(Column column)
Appends some column to the columns-aggregation.

Parameters:
column - com.sap.ui.table.client.Column the column to add

removeColumn

public void removeColumn(int index)
Removes the column at position index in the columns-aggregation named.

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

removeAllColumns

public void removeAllColumns()
Removes all the items in the columns-aggregation.


indexOfColumn

public int indexOfColumn(Column column)
Checks for the provided com.sap.ui.table.client.Column in the columns-aggregation and returns its index if found or -1 otherwise.

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

destroyColumns

public void destroyColumns()
Destroys all the columns in the Columns-aggregation.


getToolbar

public com.sap.ui.commons.client.Toolbar getToolbar()
Getter for aggregation toolbar Toolbar of the Table (if not set it will be hidden)

Returns:
com.sap.ui.commons.client.Toolbar

setToolbar

public void setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
Setter for the aggregated toolbar.

Parameters:
toolbar - {com.sap.ui.commons.client.Toolbar}

destroyToolbar

public void destroyToolbar()
Destroys the toolbar in the Toolbar-aggregation.


attachRowSelectEvent

public void attachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener fired when a row of the table has been selected
Event Parameters:
{sap.ui.core/int} rowIndex index of the selected row
{sap.ui.core/object} rowContext binding context of the selected row

Parameters:
listener - reference to the EventListener

detachRowSelectEvent

public void detachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener fired when a row of the table has been selected

Parameters:
listener - reference to the EventListener

attachColumnSelectEvent

public void attachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener fired when a column of the table has been selected
Event Parameters:
{sap.ui.table/Column} column reference to the clicked column

Parameters:
listener - reference to the EventListener

detachColumnSelectEvent

public void detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener fired when a column of the table has been selected

Parameters:
listener - reference to the EventListener

bindRows

public void bindRows(String path,
                     Object sorter,
                     Object[] filters)
Binds the rows of the DataTable against the given binding path.

Parameters:
path - Binding path for the rows of the DataTable.
sorter - Initial sorting property (defined by sap.ui.model/Sorter).
filters - Predefined filter for the DataTable (defined by sap.ui.model/Filter).

unbindRows

public void unbindRows()
Unbinds the rows of the DataTable.


getSelectedIndex

public int getSelectedIndex()
Zero-based index of selected item. Index value for no selection is -1. When multi-selection is enabled and multiple items are selected, the method returns the first selected item.


setSelectedIndex

public void setSelectedIndex(int index)
Sets the zero-based index of the currently selected item. This method removes any previous selections. When the given index is invalid, the call is ignored.

Parameters:
index - Index to be selected.

addSelectedIndex

public void addSelectedIndex(int index)
Adds the given index to current selection. When multi-selection is disabled, this replaces the current selection. When the given index is invalid, the call is ignored.

Parameters:
index - Index to add to selection.

removeSelectedIndex

public void removeSelectedIndex(int index)
Removes the given index from this selection. When the index is invalid or not selected, the call is ignored.

Parameters:
index - Index that shall be removed from selection.

getSelectedIndices

public Integer[] getSelectedIndices()
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection".


setSelectedIndices

public void setSelectedIndices(Integer[] indices)
Zero-based indices of selected items, wrapped in an array. An empty array means "no selection". When multi-selection is disabled and multiple items are given, the selection is set to the index of the first valid index in the given array. Any invalid indices are ignored.

Parameters:
indices - Indices of the items to be selected.

addSelectedIndices

public void addSelectedIndices(Integer[] indices)
Adds the given indices to selection. Any invalid indices are ignored.

Parameters:
indices - Indices of the items that shall additionally be selected.

isIndexSelected

public boolean isIndexSelected(int index)
Returns whether the given index is selected.

Parameters:
index - Index which is checked for selection state.

clearSelection

public void clearSelection()
Removes complete selection.


getContextByIndex

public Object getContextByIndex(int index)
Returns the context of a row by its index.

Parameters:
index - Index of the row to return the context from.


Copyright © 2011 SAP. All Rights Reserved.