com.sap.ui.commons.client
Class RowRepeaterWidget

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

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

This control displays items in a stacked list format, allowing the user to page in order to see more items or to use the offered filtering and sorting capabilities in order to manipulate the displayed data.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: SAP AG)

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
  RowRepeaterWidget()
          constructs the class RowRepeaterWidget
protected RowRepeaterWidget(RowRepeater control)
          constructs the class RowRepeaterWidget
  RowRepeaterWidget(String id)
          constructs the class RowRepeaterWidget
 
Method Summary
 void addFilter(RowRepeaterFilter filter)
          Appends some filter to the filters-aggregation.
 void addRow(com.sap.ui.core.client.Control row)
          Appends some row to the rows-aggregation.
 void addSorter(RowRepeaterSorter sorter)
          Appends some sorter to the sorters-aggregation.
 void applyFilter(String id)
          Applies a filter.
 void attachFilterEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event is triggered when a filter is set.
 void attachPageEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event is triggered when paging was executed.
 void attachResizeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event is triggered when the number of rows was changed.
 void attachSortEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener This event is triggered when a sorting is applied.
 void bindRows(String path, com.sap.ui.core.client.Element template)
          Binder for aggregation rows.
 void destroyFilters()
          Destroys all the filters in the Filters-aggregation.
 void destroyRows()
          Destroys all the rows in the Rows-aggregation.
 void destroySorters()
          Destroys all the sorters in the Sorters-aggregation.
 void destroyTitle()
          Destroys the title in the Title-aggregation.
 void detachFilterEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event is triggered when a filter is set.
 void detachPageEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event is triggered when paging was executed.
 void detachResizeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event is triggered when the number of rows was changed.
 void detachSortEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener This event is triggered when a sorting is applied.
 void firstPage()
          Switch to first page.
 RowRepeater getControl()
          returns the reference to the Phoenix Control
 int getCurrentPage()
          Getter for property currentPage The index of the page currently displayed.
 RowRepeaterDesign getDesign()
          Getter for property design The visual design of the control.
 com.sap.ui.core.client.js.JsArray<RowRepeaterFilter> getFilters()
          Getter for aggregation filters Filters to be provided in toolbar.
 String getFixedRowHeight()
          Getter for property fixedRowHeight Row height adapts to rendered content.
 int getNumberOfRows()
          Getter for property numberOfRows Number of rows displayed.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getRows()
          Getter for aggregation rows Rows to be repeated.
 int getShowMoreSteps()
          Getter for property showMoreSteps Step size used to increase the numberOfRows value.
 com.sap.ui.core.client.js.JsArray<RowRepeaterSorter> getSorters()
          Getter for aggregation sorters Sorters to be provided in secondary toolbar.
 Title getTitle_()
          Getter for aggregation title Title to be displayed in top left corner.
 void gotoPage(int pageNumber)
          Switch to specified page.
 int indexOfFilter(RowRepeaterFilter filter)
          Checks for the provided com.sap.ui.commons.client.RowRepeaterFilter in the filters-aggregation and returns its index if found or -1 otherwise.
 int indexOfRow(com.sap.ui.core.client.Control row)
          Checks for the provided com.sap.ui.core.client.Control in the rows-aggregation and returns its index if found or -1 otherwise.
 int indexOfSorter(RowRepeaterSorter sorter)
          Checks for the provided com.sap.ui.commons.client.RowRepeaterSorter in the sorters-aggregation and returns its index if found or -1 otherwise.
 void insertFilter(RowRepeaterFilter filter, int index)
          Inserts some filter into the aggregation named filters.
 void insertRow(com.sap.ui.core.client.Control row, int index)
          Inserts some row into the aggregation named rows.
 void insertSorter(RowRepeaterSorter sorter, int index)
          Inserts some sorter into the aggregation named sorters.
 boolean isVisible()
          Getter for property visible Invisible row-repeaters are not rendered.
 void lastPage()
          Switch to last page.
 void nextPage()
          Switch to next page.
 void previousPage()
          Switch to previous page.
 void removeAllFilters()
          Removes all the items in the filters-aggregation.
 void removeAllRows()
          Removes all the items in the rows-aggregation.
 void removeAllSorters()
          Removes all the items in the sorters-aggregation.
 void removeFilter(int index)
          Removes the filter at position index in the filters-aggregation named.
 void removeRow(int index)
          Removes the row at position index in the rows-aggregation named.
 void removeSorter(int index)
          Removes the sorter at position index in the sorters-aggregation named.
 void resize(int numberOfRows)
          Resizes the row repeater by changing the number of displayed rows.
 void setCurrentPage(int value)
          Setter for property currentPage
Default value is: 1
 void setDesign(RowRepeaterDesign value)
          Setter for property design
Default value is: Standard
 void setFixedRowHeight(String value)
          Setter for property fixedRowHeight
 void setNumberOfRows(int value)
          Setter for property numberOfRows
Default value is: 5
 void setShowMoreSteps(int value)
          Setter for property showMoreSteps
Default value is: 0
 void setTitle(Title title)
          Setter for the aggregated title.
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void triggerShowMore()
          Increments the number of rows.
 void triggerSort(String id)
          Sort the data.
 void unbindRows()
          Unbinder for aggregation rows.
 
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, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RowRepeaterWidget

public RowRepeaterWidget()
constructs the class RowRepeaterWidget


RowRepeaterWidget

public RowRepeaterWidget(String id)
constructs the class RowRepeaterWidget

Parameters:
id - id of the RowRepeaterWidget

RowRepeaterWidget

protected RowRepeaterWidget(RowRepeater control)
constructs the class RowRepeaterWidget

Parameters:
control - reference to an existing RowRepeater
Method Detail

getControl

public RowRepeater 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 Invisible row-repeaters are not 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

getNumberOfRows

public int getNumberOfRows()
Getter for property numberOfRows Number of rows displayed.

Returns:
the value of property numberOfRows

setNumberOfRows

public void setNumberOfRows(int value)
Setter for property numberOfRows
Default value is: 5

Parameters:
value - int

getCurrentPage

public int getCurrentPage()
Getter for property currentPage The index of the page currently displayed. The index starts at 1.

Returns:
the value of property currentPage

setCurrentPage

public void setCurrentPage(int value)
Setter for property currentPage
Default value is: 1

Parameters:
value - int

getShowMoreSteps

public int getShowMoreSteps()
Getter for property showMoreSteps Step size used to increase the numberOfRows value. This feature is only active if value is greater than 0. This will deactivate the paging feature.

Returns:
the value of property showMoreSteps

setShowMoreSteps

public void setShowMoreSteps(int value)
Setter for property showMoreSteps
Default value is: 0

Parameters:
value - int

getFixedRowHeight

public String getFixedRowHeight()
Getter for property fixedRowHeight Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

Returns:
the value of property fixedRowHeight

setFixedRowHeight

public void setFixedRowHeight(String value)
Setter for property fixedRowHeight

Parameters:
value - String

getDesign

public RowRepeaterDesign getDesign()
Getter for property design The visual design of the control.

Returns:
the value of property design

setDesign

public void setDesign(RowRepeaterDesign value)
Setter for property design
Default value is: Standard

Parameters:
value - com.sap.ui.commons.client.RowRepeaterDesign

getRows

public com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.Control> getRows()
Getter for aggregation rows Rows to be repeated.

Returns:
com.sap.ui.core.client.Control[]

insertRow

public void insertRow(com.sap.ui.core.client.Control 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(com.sap.ui.core.client.Control row)
Appends some row to the rows-aggregation.

Parameters:
row - com.sap.ui.core.client.Control 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(com.sap.ui.core.client.Control row)
Checks for the provided com.sap.ui.core.client.Control 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.


bindRows

public final void bindRows(String path,
                           com.sap.ui.core.client.Element template)
Binder for aggregation rows.

Parameters:
path - path to a list in the model
template - the template Element for this aggregation

unbindRows

public final void unbindRows()
Unbinder for aggregation rows.


getTitle_

public Title getTitle_()
Getter for aggregation title Title to be displayed in top left corner. Either text or icon.

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

setTitle

public void setTitle(Title title)
Setter for the aggregated title.

Parameters:
title - {com.sap.ui.commons.client.Title}

destroyTitle

public void destroyTitle()
Destroys the title in the Title-aggregation.


getFilters

public com.sap.ui.core.client.js.JsArray<RowRepeaterFilter> getFilters()
Getter for aggregation filters Filters to be provided in toolbar.

Returns:
com.sap.ui.commons.client.RowRepeaterFilter[]

insertFilter

public void insertFilter(RowRepeaterFilter filter,
                         int index)
Inserts some filter into the aggregation named filters.

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

addFilter

public void addFilter(RowRepeaterFilter filter)
Appends some filter to the filters-aggregation.

Parameters:
filter - com.sap.ui.commons.client.RowRepeaterFilter the filter to add

removeFilter

public void removeFilter(int index)
Removes the filter at position index in the filters-aggregation named.

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

removeAllFilters

public void removeAllFilters()
Removes all the items in the filters-aggregation.


indexOfFilter

public int indexOfFilter(RowRepeaterFilter filter)
Checks for the provided com.sap.ui.commons.client.RowRepeaterFilter in the filters-aggregation and returns its index if found or -1 otherwise.

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

destroyFilters

public void destroyFilters()
Destroys all the filters in the Filters-aggregation.


getSorters

public com.sap.ui.core.client.js.JsArray<RowRepeaterSorter> getSorters()
Getter for aggregation sorters Sorters to be provided in secondary toolbar.

Returns:
com.sap.ui.commons.client.RowRepeaterSorter[]

insertSorter

public void insertSorter(RowRepeaterSorter sorter,
                         int index)
Inserts some sorter into the aggregation named sorters.

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

addSorter

public void addSorter(RowRepeaterSorter sorter)
Appends some sorter to the sorters-aggregation.

Parameters:
sorter - com.sap.ui.commons.client.RowRepeaterSorter the sorter to add

removeSorter

public void removeSorter(int index)
Removes the sorter at position index in the sorters-aggregation named.

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

removeAllSorters

public void removeAllSorters()
Removes all the items in the sorters-aggregation.


indexOfSorter

public int indexOfSorter(RowRepeaterSorter sorter)
Checks for the provided com.sap.ui.commons.client.RowRepeaterSorter in the sorters-aggregation and returns its index if found or -1 otherwise.

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

destroySorters

public void destroySorters()
Destroys all the sorters in the Sorters-aggregation.


attachFilterEvent

public void attachFilterEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener This event is triggered when a filter is set.
Event Parameters:
{sap.ui.core/string} filterId The ID of the filter that has just been applied.

Parameters:
listener - reference to the EventListener

detachFilterEvent

public void detachFilterEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener This event is triggered when a filter is set.

Parameters:
listener - reference to the EventListener

attachSortEvent

public void attachSortEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener This event is triggered when a sorting is applied.
Event Parameters:
{sap.ui.core/string} sorterId The ID of the sorter that has just been applied.

Parameters:
listener - reference to the EventListener

detachSortEvent

public void detachSortEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener This event is triggered when a sorting is applied.

Parameters:
listener - reference to the EventListener

attachPageEvent

public void attachPageEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener This event is triggered when paging was executed.
Event Parameters:
{int} currentPage The value of the currentPage property after the change.
{int} previousPage The value of the currentPage property before the change.

Parameters:
listener - reference to the EventListener

detachPageEvent

public void detachPageEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener This event is triggered when paging was executed.

Parameters:
listener - reference to the EventListener

attachResizeEvent

public void attachResizeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener This event is triggered when the number of rows was changed.
Event Parameters:
{int} numberOfRows The value of the numberOfRows property after the change.
{int} previousNumberOfRows The value of the numberOfRows property before the change.

Parameters:
listener - reference to the EventListener

detachResizeEvent

public void detachResizeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener This event is triggered when the number of rows was changed.

Parameters:
listener - reference to the EventListener

triggerShowMore

public void triggerShowMore()
Increments the number of rows. This method will only trigger a showMore if the property showMoreSteps is set.


resize

public void resize(int numberOfRows)
Resizes the row repeater by changing the number of displayed rows. This method will only resize the RowRepeater if the property showMoreSteps is set.

Parameters:
numberOfRows - The new value of number of rows displayed.

applyFilter

public void applyFilter(String id)
Applies a filter.

Parameters:
id - The ID if the filter.

triggerSort

public void triggerSort(String id)
Sort the data.

Parameters:
id - The ID of the sorter.

firstPage

public void firstPage()
Switch to first page.


lastPage

public void lastPage()
Switch to last page.


previousPage

public void previousPage()
Switch to previous page.


nextPage

public void nextPage()
Switch to next page.


gotoPage

public void gotoPage(int pageNumber)
Switch to specified page.

Parameters:
pageNumber - The index of the page to go to.


Copyright © 2011 SAP. All Rights Reserved.