Package org.adempiere.webui.event
Class WTableModelEvent
java.lang.Object
org.zkoss.zul.event.ListDataEvent
org.adempiere.webui.event.WTableModelEvent
public class WTableModelEvent
extends org.zkoss.zul.event.ListDataEvent
Change event for
ListModelTable
- Author:
- andy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Specifies all columns in a row or rows.static final int
Specifies all rows.static final int
Identifies the header row.protected int
Fields inherited from class org.zkoss.zul.event.ListDataEvent
CONTENTS_CHANGED, DISABLE_CLIENT_UPDATE, ENABLE_CLIENT_UPDATE, INTERVAL_ADDED, INTERVAL_REMOVED, MULTIPLE_CHANGED, SELECTION_CHANGED, STRUCTURE_CHANGED
-
Constructor Summary
ConstructorDescriptionWTableModelEvent
(org.zkoss.zul.ListModel<?> source) All row data in the table has changed, listeners should discard any state that was based on the rows and requery theTableModel
to get the new row count and all the appropriate values.
TheWListbox
will initiate repaint on receiving this event, querying the model for the cell values that are visible.WTableModelEvent
(org.zkoss.zul.ListModel<?> source, int row) This row of data has been updated.WTableModelEvent
(org.zkoss.zul.ListModel<?> source, int row, int column) The cell in [row,column] has been updated.WTableModelEvent
(org.zkoss.zul.ListModel<?> source, int firstRow, int lastRow, int column, int type) The cells from (firstRow, column) to (lastRow, column) have been changed. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the column for the event.int
Obtain the index of the first affected rowint
Obtain the index of the last affected rowMethods inherited from class org.zkoss.zul.event.ListDataEvent
getIndex0, getIndex1, getModel, getType, toString
-
Field Details
-
ALL_ROWS
public static final int ALL_ROWSSpecifies all rows.- See Also:
-
ALL_COLUMNS
public static final int ALL_COLUMNSSpecifies all columns in a row or rows.- See Also:
-
HEADER_ROW
public static final int HEADER_ROWIdentifies the header row.- See Also:
-
m_column
protected int m_column
-
-
Constructor Details
-
WTableModelEvent
public WTableModelEvent(org.zkoss.zul.ListModel<?> source) All row data in the table has changed, listeners should discard any state that was based on the rows and requery theTableModel
to get the new row count and all the appropriate values.
TheWListbox
will initiate repaint on receiving this event, querying the model for the cell values that are visible.- Parameters:
source
- The list model that has changed
-
WTableModelEvent
public WTableModelEvent(org.zkoss.zul.ListModel<?> source, int row) This row of data has been updated. To denote the arrival of a completely new table with a different structure useHEADER_ROW
as the value for therow
argument.- Parameters:
source
- The list model that has changedrow
- Index of the affected row
-
WTableModelEvent
public WTableModelEvent(org.zkoss.zul.ListModel<?> source, int row, int column) The cell in [row,column] has been updated.- Parameters:
source
- The list model that has changedrow
- Index of the affected rowcolumn
- Index of the affected column
-
WTableModelEvent
public WTableModelEvent(org.zkoss.zul.ListModel<?> source, int firstRow, int lastRow, int column, int type) The cells from (firstRow, column) to (lastRow, column) have been changed. The column refers to the column index of the cell in the model's co-ordinate system. When column is ALL_COLUMNS, all cells in the specified range of rows are considered changed.The type should be one of: CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED.
- Parameters:
source
- The list model that has changedfirstRow
- Index of the first affected rowlastRow
- Index of the last affected rowcolumn
- Index of the affected columntype
- the type of change
-
-
Method Details
-
getColumn
public int getColumn()Returns the column for the event. If the return value isALL_COLUMNS
it means every column in the specified row has been affected.- Returns:
- the affected column, or
ALL_COLUMNS
-
getFirstRow
public int getFirstRow()Obtain the index of the first affected row- Returns:
- the index of the first affected row
-
getLastRow
public int getLastRow()Obtain the index of the last affected row- Returns:
- the index of the last affected row
-