Package org.adempiere.webui.adwindow
Class GridTableListModel
- java.lang.Object
-
- org.zkoss.zul.AbstractListModel<Object>
-
- org.adempiere.webui.adwindow.GridTableListModel
-
- All Implemented Interfaces:
Serializable
,EventListener
,TableModelListener
,org.zkoss.zul.ext.Pageable
,org.zkoss.zul.ext.Selectable<Object>
,org.zkoss.zul.ext.Sortable<Object>
,org.zkoss.zul.ListModel<Object>
,org.zkoss.zul.PageableModel
public class GridTableListModel extends org.zkoss.zul.AbstractListModel<Object> implements TableModelListener, org.zkoss.zul.ext.Sortable<Object>
- Author:
- Low Heng Sin
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.zkoss.zul.AbstractListModel
org.zkoss.zul.AbstractListModel.DefaultSelectionControl<E extends Object>
-
-
Constructor Summary
Constructors Constructor Description GridTableListModel(GridTable tableModel, int windowNo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getElementAt(int rowIndex)
int
getPage()
int
getPageSize()
Get number of rows per pageint
getSize()
Get total number of rowsString
getSortDirection(Comparator<Object> cmpr)
void
setEditing(boolean b)
void
setPage(int pg)
set current page no ( starting from 0 )void
setPageSize(int pgSize)
Set number of rows per pagevoid
sort(Comparator<Object> cmpr, boolean ascending)
void
tableChanged(TableModelEvent e)
void
updateComponent(int row)
Request components that attached to this model to re-render a row.void
updateComponent(int fromRow, int toRow)
Request components that attached to this model to re-render a range of row.-
Methods inherited from class org.zkoss.zul.AbstractListModel
addListDataListener, addPagingEventListener, addToSelection, clearSelection, clone, fireEvent, fireSelectionEvent, getActivePage, getPageCount, getSelection, getSelectionControl, isMultiple, isSelected, isSelectionEmpty, newEmptySelection, readSelection, removeAllSelection, removeFromSelection, removeListDataListener, removePagingEventListener, retainAllSelection, setActivePage, setMultiple, setSelection, setSelectionControl, writeSelection
-
-
-
-
Constructor Detail
-
GridTableListModel
public GridTableListModel(GridTable tableModel, int windowNo)
- Parameters:
tableModel
-windowNo
-
-
-
Method Detail
-
getElementAt
public Object getElementAt(int rowIndex)
- Specified by:
getElementAt
in interfaceorg.zkoss.zul.ListModel<Object>
- Parameters:
rowIndex
-- See Also:
ListModel.getElementAt(int)
-
setPage
public void setPage(int pg)
set current page no ( starting from 0 )- Parameters:
pg
-
-
getPage
public int getPage()
- Returns:
- current page no ( starting from 0 )
-
setPageSize
public void setPageSize(int pgSize)
Set number of rows per page- Specified by:
setPageSize
in interfaceorg.zkoss.zul.ext.Pageable
- Overrides:
setPageSize
in classorg.zkoss.zul.AbstractListModel<Object>
- Parameters:
pgSize
-
-
getPageSize
public int getPageSize()
Get number of rows per page- Specified by:
getPageSize
in interfaceorg.zkoss.zul.ext.Pageable
- Overrides:
getPageSize
in classorg.zkoss.zul.AbstractListModel<Object>
- Returns:
- pageSize
-
getSize
public int getSize()
Get total number of rows- Specified by:
getSize
in interfaceorg.zkoss.zul.ListModel<Object>
- Returns:
- int
- See Also:
ListModel.getSize()
-
updateComponent
public void updateComponent(int row)
Request components that attached to this model to re-render a row.- Parameters:
row
-
-
updateComponent
public void updateComponent(int fromRow, int toRow)
Request components that attached to this model to re-render a range of row.- Parameters:
fromRow
-toRow
-
-
sort
public void sort(Comparator<Object> cmpr, boolean ascending)
- Specified by:
sort
in interfaceorg.zkoss.zul.ext.Sortable<Object>
- Parameters:
cmpr
-ascending
-
-
tableChanged
public void tableChanged(TableModelEvent e)
- Specified by:
tableChanged
in interfaceTableModelListener
- Parameters:
e
-- See Also:
TableModelListener.tableChanged(TableModelEvent)
-
setEditing
public void setEditing(boolean b)
- Parameters:
b
-
-
getSortDirection
public String getSortDirection(Comparator<Object> cmpr)
- Specified by:
getSortDirection
in interfaceorg.zkoss.zul.ext.Sortable<Object>
-
-