|
||||||||||
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
public abstract class Abstract
An abstract table model that performs the column handling, so subclasses only need to care for row handling.
Constructor Summary | |
---|---|
Abstract()
|
Method Summary | |
---|---|
java.lang.Integer |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnId(java.lang.Integer columnIndex)
Returns the ID of column. |
java.lang.Integer |
getColumnIndexById(java.lang.String columnId)
Returns the index of a column. |
java.lang.String |
getColumnName(java.lang.Integer columnIndex)
Returns the name of a column. |
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.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. |
java.lang.Object |
getValueById(java.lang.String columnId,
java.lang.Integer rowIndex)
Returns a cell value by column ID. |
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 |
prefetchRows(java.lang.Integer firstRowIndex,
java.lang.Integer lastRowIndex)
Prefetches some rows. |
void |
setColumnIds(java.lang.String columnIdArr)
Sets the column IDs. |
void |
setColumnNamesById(java.lang.Object columnNameMap)
Sets the column names. |
void |
setColumnNamesByIndex(java.lang.String columnNameArr)
Sets the column names. |
void |
setColumns(java.lang.String columnNameArr,
java.lang.String columnIdArr)
Sets the column names (and optionally IDs) |
void |
setValue(java.lang.Integer columnIndex,
java.lang.Integer rowIndex,
java.lang.Object value)
Sets a cell value by column index. |
java.lang.Object |
setValueById(java.lang.String columnId,
java.lang.Integer rowIndex,
java.lang.Object value)
Sets a cell value by column ID. |
void |
sortByColumn(java.lang.Integer columnIndex,
boolean ascending)
Sorts the model by a column. |
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 Abstract()
Method Detail |
---|
public java.lang.Integer getColumnCount()
ITableModel
Returns the number of columns in the model.
getColumnCount
in interface ITableModel
public java.lang.String getColumnId(java.lang.Integer columnIndex)
ITableModel
Returns the ID of column. The ID may be used to identify columns independent from their index in the model. E.g. for being aware of added columns when saving the width of a column.
getColumnId
in interface ITableModel
public java.lang.Integer getColumnIndexById(java.lang.String columnId)
ITableModel
Returns the index of a column.
getColumnIndexById
in interface ITableModel
public java.lang.String getColumnName(java.lang.Integer columnIndex)
ITableModel
Returns the name of a column. This name will be shown to the user in the table header.
getColumnName
in interface ITableModel
public java.lang.Integer getRowCount()
ITableModel
Returns the number of rows in the model.
getRowCount
in interface ITableModel
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
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
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
public java.lang.Object getValueById(java.lang.String columnId, java.lang.Integer rowIndex)
ITableModel
Returns a cell value by column ID.
Whenever you have the choice, use #getValue()
instead,
because this should be faster.
getValueById
in interface ITableModel
public boolean isColumnEditable(java.lang.Integer columnIndex)
ITableModel
Returns whether a column is editable.
isColumnEditable
in interface ITableModel
public boolean isColumnSortable(java.lang.Integer columnIndex)
ITableModel
Returns whether a column is sortable.
isColumnSortable
in interface ITableModel
public boolean isSortAscending()
ITableModel
Returns whether the model is sorted ascending.
isSortAscending
in interface ITableModel
public void prefetchRows(java.lang.Integer firstRowIndex, java.lang.Integer lastRowIndex)
ITableModel
Prefetches some rows. This is a hint to the model that the specified rows will be read soon.
prefetchRows
in interface ITableModel
public void setColumnIds(java.lang.String columnIdArr)
Sets the column IDs. These IDs may be used internally to identify a column.
Note: This will clear previously set column names.
public void setColumnNamesById(java.lang.Object columnNameMap)
Sets the column names. These names will be shown to the user.
Note: The column IDs have to be defined before.
public void setColumnNamesByIndex(java.lang.String columnNameArr)
Sets the column names. These names will be shown to the user.
Note: The column IDs have to be defined before.
public void setColumns(java.lang.String columnNameArr, java.lang.String columnIdArr)
Sets the column names (and optionally IDs)
Note: You can not change the number of columns this way. The number of columns is highly intertwined in the entire table operation, and dynamically changing it would require as much work as just recreating your table. If you must change the number of columns in a table then you should remove the table and add a new one.
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
public java.lang.Object setValueById(java.lang.String columnId, java.lang.Integer rowIndex, java.lang.Object value)
ITableModel
Sets a cell value by column ID.
Whenever you have the choice, use #setValue()
instead,
because this should be faster.
setValueById
in interface ITableModel
public void sortByColumn(java.lang.Integer columnIndex, boolean ascending)
ITableModel
Sorts the model by a column.
sortByColumn
in interface ITableModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |