|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.sap.ui.core.client.Element
com.sap.ui.core.client.Control
com.sap.ui.table.client.DataTable
public class DataTable
The class DataTable is the GWT wrapper
for the Phoenix control: sap.ui.table.DataTable.
The DataTable Control.
| Constructor Summary | |
|---|---|
protected |
DataTable()
constructs the class DataTablehidden due to JavaScriptObject restriction |
| Method Summary | |
|---|---|
DataTable |
addColumn(Column column)
Appends a column to the aggregation columns. |
void |
addSelectedIndex(int index)
Adds the given index to current selection. |
void |
addSelectedIndices(Integer[] indices)
Adds the given indices to selection. |
DataTable |
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 |
DataTable |
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. |
static DataTable |
create()
creates a new instance of the class DataTable |
static DataTable |
create(String idOrConfig)
creates a new instance of the class DataTable |
static DataTable |
create(String id,
String config)
creates a new instance of the class DataTable |
DataTable |
destroyColumns()
Destroys all the columns in the Columns-aggregation. |
DataTable |
destroyToolbar()
Destroys the toolbar in the Toolbar-aggregation. |
DataTable |
detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener
fired when a column of the table has been selected |
DataTable |
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. |
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. |
DataTable |
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. |
com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Column>> |
removeAllColumns()
Removes all the items in the columns-aggregation. |
com.sap.ui.core.client.js.JsArray<Column> |
removeColumn(int index)
Removes a column from the aggregation named columns. |
void |
removeSelectedIndex(int index)
Removes the given index from this selection. |
DataTable |
setEditable(boolean value)
Setter for property editableDefault value is: false |
DataTable |
setExpanded(boolean value)
Setter for property expandedDefault value is: false |
DataTable |
setExpandedVisibleRowCount(int value)
Setter for property expandedVisibleRowCount |
DataTable |
setFirstVisibleRow(int value)
Setter for property firstVisibleRowDefault value is: 0 |
DataTable |
setHierarchical(boolean value)
Setter for property hierarchicalDefault 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. |
DataTable |
setSelectionMode(SelectionMode value)
Setter for property selectionModeDefault value is: Multi |
DataTable |
setTitle(String value)
Setter for property title |
DataTable |
setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
Setter for the aggregated toolbar. |
DataTable |
setVisibleRowCount(int value)
Setter for property visibleRowCountDefault value is: 10 |
DataTable |
setWidth(String value)
Setter for property widthDefault value is: auto |
void |
unbindRows()
Unbinds the rows of the DataTable. |
| 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 |
|---|
protected DataTable()
DataTableJavaScriptObject restriction
| Method Detail |
|---|
public static DataTable create()
DataTable
public static DataTable create(String idOrConfig)
DataTable
id - id of the DataTable or configuration JSON string
public static DataTable create(String id,
String config)
DataTable
id - id of the DataTableconfig - configuration JSON stringpublic final String getTitle()
title
Title of the Table (if not set/empty) the title will be hidden)
public final DataTable setTitle(String value)
title
value - String
this to allow method chainingpublic final String getWidth()
width
Width of the Table
public final DataTable setWidth(String value)
widthauto
value - String
this to allow method chainingpublic final int getVisibleRowCount()
visibleRowCount
Count of visible rows
public final DataTable setVisibleRowCount(int value)
visibleRowCount10
value - int
this to allow method chainingpublic final int getExpandedVisibleRowCount()
expandedVisibleRowCount
Count of visible rows when expanded
public final DataTable setExpandedVisibleRowCount(int value)
expandedVisibleRowCount
value - int
this to allow method chainingpublic final int getFirstVisibleRow()
firstVisibleRow
First visible row
public final DataTable setFirstVisibleRow(int value)
firstVisibleRow0
value - int
this to allow method chainingpublic final SelectionMode getSelectionMode()
selectionMode
Selection mode of the Table
public final DataTable setSelectionMode(SelectionMode value)
selectionModeMulti
value - com.sap.ui.table.client.SelectionMode
this to allow method chainingpublic final boolean isEditable()
editable
Flag whether the controls of the Table are editable or not
public final DataTable setEditable(boolean value)
editablefalse
value - boolean
this to allow method chainingpublic final boolean isExpanded()
expanded
Flag whether the Table is expanded or not
public final DataTable setExpanded(boolean value)
expandedfalse
value - boolean
this to allow method chainingpublic final boolean isHierarchical()
hierarchical
Flag, whether the table displays its content hierarchical or not **experimental**!!
public final DataTable setHierarchical(boolean value)
hierarchicalfalse
value - boolean
this to allow method chainingpublic final com.sap.ui.core.client.js.JsArray<Column> getColumns()
public final DataTable insertColumn(Column column,
int index)
columns.
column - the column to insertindex - int the 0-based index the column should be inserted at.
this to allow method chainingpublic final DataTable addColumn(Column column)
columns.
column - com.sap.ui.table.client.Column the column to add
this to allow method chainingpublic final com.sap.ui.core.client.js.JsArray<Column> removeColumn(int index)
columns.
index - int the position of the column to remove.
public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Column>> removeAllColumns()
public final int indexOfColumn(Column column)
com.sap.ui.table.client.Column in the columns-aggregation and
returns its index if found or -1 otherwise.
column - the column whose index is looked for.
public final DataTable destroyColumns()
this to allow method chainingpublic final com.sap.ui.commons.client.Toolbar getToolbar()
public final DataTable setToolbar(com.sap.ui.commons.client.Toolbar toolbar)
otoolbar - {com.sap.ui.commons.client.Toolbar}
this to allow method chainingpublic final DataTable destroyToolbar()
this to allow method chainingpublic final DataTable attachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
fired when a row of the table has been selected
listener - reference to the EventListener
this to allow method chainingpublic final DataTable detachRowSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
fired when a row of the table has been selected
listener - reference to the EventListener
this to allow method chainingpublic final DataTable attachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
fired when a column of the table has been selected
listener - reference to the EventListener
this to allow method chainingpublic final DataTable detachColumnSelectEvent(com.sap.ui.core.client.event.EventListener listener)
EventListener
fired when a column of the table has been selected
listener - reference to the EventListener
this to allow method chaining
public final void bindRows(String path,
Object sorter,
Object[] filters)
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).public final void unbindRows()
public final int getSelectedIndex()
public final void setSelectedIndex(int index)
index - Index to be selected.public final void addSelectedIndex(int index)
index - Index to add to selection.public final void removeSelectedIndex(int index)
index - Index that shall be removed from selection.public final Integer[] getSelectedIndices()
public final void setSelectedIndices(Integer[] indices)
indices - Indices of the items to be selected.public final void addSelectedIndices(Integer[] indices)
indices - Indices of the items that shall additionally be selected.public final boolean isIndexSelected(int index)
index - Index which is checked for selection state.public final void clearSelection()
public final Object getContextByIndex(int index)
index - Index of the row to return the context from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||