|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectqx.core.Object
qx.core.Target
qx.ui.table.model.Abstract
qx.ui.table.model.Simple
public class Simple
A simple table model that provides an API for changing the model data.
Constructor Summary | |
---|---|
Simple()
|
Method Summary | |
---|---|
void |
_clearSorting()
Clears the sorting. |
java.lang.Object |
_mapArray2RowArr(java.lang.Object mapArr,
boolean rememberMaps)
Creates an array of maps to an array of arrays. |
void |
addRows(java.lang.Object rowArr,
java.lang.Integer startIndex)
Adds some rows to the model. |
void |
addRowsAsMapArray(java.lang.Object mapArr,
java.lang.Integer startIndex,
boolean rememberMaps)
Adds some rows to the model. |
boolean |
getCaseSensitiveSorting()
Returns the (computed) value of the property caseSensitiveSorting . |
java.lang.Object |
getData()
Returns the data of this model. |
java.lang.Integer |
getRowCount()
Returns the number of rows in the model. |
java.lang.Object |
getRowData(java.lang.Integer rowIndex)
Returns the data of one row. |
java.lang.Object |
getRowDataAsMap(java.lang.Integer rowIndex)
Returns the data of one row as map containing the column IDs as key and the cell values as value. |
java.lang.Integer |
getSortColumnIndex()
Returns the column index the model is sorted by. |
java.lang.Object |
getValue(java.lang.Integer columnIndex,
java.lang.Integer rowIndex)
Returns a cell value by column index. |
void |
initCaseSensitiveSorting(boolean arg)
Calls the apply method and dispatches the change event of the property caseSensitiveSorting
with the default value defined by the class developer. |
boolean |
isCaseSensitiveSorting()
Check whether the (computed) value of the boolean property caseSensitiveSorting equals true . |
boolean |
isColumnEditable(java.lang.Integer columnIndex)
Returns whether a column is editable. |
boolean |
isColumnSortable(java.lang.Integer columnIndex)
Returns whether a column is sortable. |
boolean |
isSortAscending()
Returns whether the model is sorted ascending. |
void |
removeRows(java.lang.Integer startIndex,
java.lang.Integer howMany)
Removes some rows from the model. |
void |
resetCaseSensitiveSorting()
Resets the user value of the property caseSensitiveSorting . |
void |
setCaseSensitiveSorting(boolean arg)
Sets the user value of the property caseSensitiveSorting . |
void |
setColumnEditable(java.lang.Integer columnIndex,
boolean editable)
Sets whether a column is editable. |
void |
setColumnSortable(java.lang.Integer columnIndex,
boolean sortable)
Sets whether a column is sortable. |
void |
setData(java.lang.Object rowArr,
boolean clearSorting)
Sets the whole data in a bulk. |
void |
setDataAsMapArray(java.lang.Object mapArr,
boolean rememberMaps,
boolean clearSorting)
Sets the whole data in a bulk. |
void |
setEditable(boolean editable)
Sets all columns editable or not editable. |
void |
setSortMethods(java.lang.Integer columnIndex,
java.lang.Object methods)
Specify the methods to use for ascending and descending sorts of a particular column. |
void |
setValue(java.lang.Integer columnIndex,
java.lang.Integer rowIndex,
java.lang.Object value)
Sets a cell value by column index. |
void |
sortByColumn(java.lang.Integer columnIndex,
boolean ascending)
Sorts the model by a column. |
boolean |
toggleCaseSensitiveSorting()
Toggles the (computed) value of the boolean property caseSensitiveSorting . |
Methods inherited from class qx.ui.table.model.Abstract |
---|
getColumnCount, getColumnId, getColumnIndexById, getColumnName, getValueById, prefetchRows, setColumnIds, setColumnNamesById, setColumnNamesByIndex, setColumns, setValueById |
Methods inherited from class qx.core.Target |
---|
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener |
Methods inherited from class qx.core.Object |
---|
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Simple()
Method Detail |
---|
public void _clearSorting()
Clears the sorting.
public java.lang.Object _mapArray2RowArr(java.lang.Object mapArr, boolean rememberMaps)
Creates an array of maps to an array of arrays.
public void addRows(java.lang.Object rowArr, java.lang.Integer startIndex)
Adds some rows to the model.
Warning: The given array will be altered!
public void addRowsAsMapArray(java.lang.Object mapArr, java.lang.Integer startIndex, boolean rememberMaps)
Adds some rows to the model.
Warning: The given array (mapArr) will be altered!
public boolean getCaseSensitiveSorting()
Returns the (computed) value of the property caseSensitiveSorting
.
For further details take a look at the property definition: caseSensitiveSorting
.
public java.lang.Object getData()
Returns the data of this model.
Warning: Do not alter this array! If you want to change the data use
setData(java.lang.Object, boolean)
, setDataAsMapArray(java.lang.Object, boolean, boolean)
or setValue(java.lang.Integer, java.lang.Integer, java.lang.Object)
instead.
public java.lang.Integer getRowCount()
ITableModel
Returns the number of rows in the model.
getRowCount
in interface ITableModel
getRowCount
in class Abstract
public java.lang.Object getRowData(java.lang.Integer rowIndex)
ITableModel
Returns the data of one row. This function may be overriden by models which hold all data of a row in one object. By using this function, clients have a way of quickly retrieving the entire row data.
Important:Models which do not have their row data accessible in one object may return null.
getRowData
in interface ITableModel
getRowData
in class Abstract
public java.lang.Object getRowDataAsMap(java.lang.Integer rowIndex)
Returns the data of one row as map containing the column IDs as key and the cell values as value.
public java.lang.Integer getSortColumnIndex()
ITableModel
Returns the column index the model is sorted by. If the model is not sorted -1 is returned.
getSortColumnIndex
in interface ITableModel
getSortColumnIndex
in class Abstract
public java.lang.Object getValue(java.lang.Integer columnIndex, java.lang.Integer rowIndex)
ITableModel
Returns a cell value by column index.
getValue
in interface ITableModel
getValue
in class Abstract
public void initCaseSensitiveSorting(boolean arg)
Calls the apply method and dispatches the change event of the property caseSensitiveSorting
with the default value defined by the class developer. This function can
only be called from the constructor of a class.
For further details take a look at the property definition: caseSensitiveSorting
.
public boolean isCaseSensitiveSorting()
Check whether the (computed) value of the boolean property caseSensitiveSorting
equals true
.
For further details take a look at the property definition: caseSensitiveSorting
.
public boolean isColumnEditable(java.lang.Integer columnIndex)
ITableModel
Returns whether a column is editable.
isColumnEditable
in interface ITableModel
isColumnEditable
in class Abstract
public boolean isColumnSortable(java.lang.Integer columnIndex)
ITableModel
Returns whether a column is sortable.
isColumnSortable
in interface ITableModel
isColumnSortable
in class Abstract
public boolean isSortAscending()
ITableModel
Returns whether the model is sorted ascending.
isSortAscending
in interface ITableModel
isSortAscending
in class Abstract
public void removeRows(java.lang.Integer startIndex, java.lang.Integer howMany)
Removes some rows from the model.
public void resetCaseSensitiveSorting()
Resets the user value of the property caseSensitiveSorting
.
The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.
For further details take a look at the property definition: caseSensitiveSorting
.
public void setCaseSensitiveSorting(boolean arg)
Sets the user value of the property caseSensitiveSorting
.
For further details take a look at the property definition: caseSensitiveSorting
.
public void setColumnEditable(java.lang.Integer columnIndex, boolean editable)
Sets whether a column is editable.
public void setColumnSortable(java.lang.Integer columnIndex, boolean sortable)
Sets whether a column is sortable.
public void setData(java.lang.Object rowArr, boolean clearSorting)
Sets the whole data in a bulk.
public void setDataAsMapArray(java.lang.Object mapArr, boolean rememberMaps, boolean clearSorting)
Sets the whole data in a bulk.
public void setEditable(boolean editable)
Sets all columns editable or not editable.
public void setSortMethods(java.lang.Integer columnIndex, java.lang.Object methods)
Specify the methods to use for ascending and descending sorts of a particular column.
public void setValue(java.lang.Integer columnIndex, java.lang.Integer rowIndex, java.lang.Object value)
ITableModel
Sets a cell value by column index.
setValue
in interface ITableModel
setValue
in class Abstract
public void sortByColumn(java.lang.Integer columnIndex, boolean ascending)
ITableModel
Sorts the model by a column.
sortByColumn
in interface ITableModel
sortByColumn
in class Abstract
public boolean toggleCaseSensitiveSorting()
Toggles the (computed) value of the boolean property caseSensitiveSorting
.
For further details take a look at the property definition: caseSensitiveSorting
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |