|
Adempiere 3.4.0s | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractListModel
org.zkoss.zul.ListModelList
org.adempiere.webui.component.ListModelTable
public class ListModelTable
This is a ListModel to be used with Listbox.
The model allows for a table structure to be created, with columns
in addition to the rows provided by ListModelList.
| Field Summary | |
|---|---|
protected ArrayList<WTableModelListener> |
m_listeners
Array of listeners to changes in the table model. |
| Fields inherited from class org.zkoss.zul.ListModelList |
|---|
_list |
| Constructor Summary | |
|---|---|
ListModelTable()
Default constructor. |
|
ListModelTable(Collection collection)
Construct the ListModel with a collection of objects. |
|
| Method Summary | |
|---|---|
void |
addColumn()
Add a column to the model. |
void |
addTableModelListener(WTableModelListener listener)
Add a listener for events from the data model. |
Object |
getDataAt(int rowIndex,
int columnIndex)
Returns the cell value at rowIndex and columnIndex. |
int |
getNoColumns()
Query thenumber of columns in the table. |
int |
getNoRows()
Query the number of rows in the table. |
void |
removeTableModelListener(WTableModelListener listener)
|
void |
setDataAt(Object aValue,
int row,
int col)
Set the cell value at row and column. |
void |
setNoColumns(int columns)
Set the number of columns that the table is to contain. |
void |
setNoRows(int rowCount)
Set the number of rows in the table and initialise new rows. |
void |
sort(Comparator cmpr,
boolean ascending)
|
| Methods inherited from class org.zkoss.zul.ListModelList |
|---|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, getElementAt, getInnerList, getSize, hashCode, indexOf, instance, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, toString |
| Methods inherited from class org.zkoss.zul.AbstractListModel |
|---|
addListDataListener, fireEvent, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<WTableModelListener> m_listeners
| Constructor Detail |
|---|
public ListModelTable()
public ListModelTable(Collection collection)
collection - The collection of objects with which to initialise the list| Method Detail |
|---|
public int getNoColumns()
public void addColumn()
public void setNoColumns(int columns)
columns - The number of columns.public int getNoRows()
public Object getDataAt(int rowIndex,
int columnIndex)
rowIndex and columnIndex.
rowIndex - the index of the row whose value is to be queriedcolumnIndex - the index of the column whose value is to be queried
public void setDataAt(Object aValue,
int row,
int col)
row and column.
aValue - The value to setrow - the index of the row whose value is to be setcol - the index of the column whose value is to be setpublic void setNoRows(int rowCount)
setNoColumns(int) is created.
Please note that the number of rows in a table cannot be decreased.
rowCount - The number of rows to be contained in the tablepublic void addTableModelListener(WTableModelListener listener)
listener - A listener for changes in the table modepublic void removeTableModelListener(WTableModelListener listener)
public void sort(Comparator cmpr,
boolean ascending)
sort in interface org.zkoss.zul.ListModelExtsort in class org.zkoss.zul.ListModelList
|
Adempiere 3.4.0s | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||