public abstract class APojoCrossModel<T> extends java.lang.Object implements IPojoGridModel<APojoCrossModel.Row<T>>, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
APojoCrossModel.Cell<T> |
static class |
APojoCrossModel.Column |
static class |
APojoCrossModel.DataColumn<T> |
static class |
APojoCrossModel.IndentColumn |
static class |
APojoCrossModel.Row<T> |
Constructor and Description |
---|
APojoCrossModel(IPojoGridModel<T> model,
java.util.Comparator<T> vComp,
java.util.Comparator<T> hComp) |
APojoCrossModel(IPojoGridModel<T> model,
java.util.Comparator<T> vComp,
java.util.Comparator<T> hComp,
int indentCols) |
Modifier and Type | Method and Description |
---|---|
int |
fetchRows(int rowIndex,
int count)
Used by the ui to ensure that the request rows really exist without the need to retrieve
any column value.
The ui is simply saying that it wants to get access to the given rows. |
APojoCrossModel.Cell<T> |
getCell(APojoCrossModel.Row<T> pojo,
int columnIndex) |
APojoCrossModel.Cell<T> |
getCell(int rowIndex,
int columnIndex) |
abstract java.lang.Object |
getCellValue(APojoCrossModel.Cell<T> cell,
int columnIndex) |
APojoCrossModel.Column |
getColumn(int columnIndex) |
int |
getColumnCount() |
IColumnGroup |
getColumnGroup(java.lang.String groupId) |
java.util.Map<java.lang.String,IColumnGroup> |
getColumnGroupsMap() |
int |
getColumnIndex(java.lang.String columnName) |
java.lang.String |
getColumnName(int columnIndex) |
APojoCrossModel.Cell<T> |
getCurrentCell(int columnIndex) |
APojoCrossModel.Cell<T> |
getCurrentCell(java.lang.String columnName) |
APojoCrossModel.Row<T> |
getCurrentPojo() |
int |
getCurrentRow() |
int |
getCurrentRowCount() |
int |
getDataVersion() |
java.util.List<APojoCrossModel.Row<T>> |
getDataView() |
java.util.List<APojoCrossModel.IndentColumn> |
getIndentColumns() |
abstract java.lang.Object |
getIndentValue(APojoCrossModel.Row<T> pojo,
int columnIndex) |
APojoCrossModel.Row<T> |
getPojo(int rowIndex) |
java.lang.Class<APojoCrossModel.Row<T>> |
getPojoType() |
java.lang.String |
getPropertyName(int columnIndex) |
int |
getRowCount() |
java.lang.Object |
getValue(APojoCrossModel.Row<T> pojo,
int columnIndex) |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex) |
java.lang.String |
gotoCellPojo(T cellPojo) |
boolean |
isCurrentRowFreezed() |
int |
rowIndexOf(APojoCrossModel.Row<T> pojo) |
APojoCrossModel<T> |
setComparators(java.util.Comparator<T> vComp,
java.util.Comparator<T> hComp) |
void |
setCurrentRow(int rowIndex) |
void |
sync()
Called by the framework just before displaying the
AGridFlow .Here is where the model can, as an example, ensure that depending sub models are synchronized or to restore data after a serialization. Keep in mind that after synchronizing the model internal state can be changed. |
public APojoCrossModel(IPojoGridModel<T> model, java.util.Comparator<T> vComp, java.util.Comparator<T> hComp)
public APojoCrossModel(IPojoGridModel<T> model, java.util.Comparator<T> vComp, java.util.Comparator<T> hComp, int indentCols)
public final java.util.List<APojoCrossModel.IndentColumn> getIndentColumns()
public final java.util.Map<java.lang.String,IColumnGroup> getColumnGroupsMap()
public IColumnGroup getColumnGroup(java.lang.String groupId)
getColumnGroup
in interface IGridModel
public APojoCrossModel<T> setComparators(java.util.Comparator<T> vComp, java.util.Comparator<T> hComp)
vComp
- comparator used for rowshComp
- comparator used for colspublic int getColumnCount()
getColumnCount
in interface IGridModel
public int getColumnIndex(java.lang.String columnName)
getColumnIndex
in interface IGridModel
public APojoCrossModel.Column getColumn(int columnIndex)
getColumn
in interface IGridModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface IGridModel
public int getCurrentRowCount()
getCurrentRowCount
in interface IGridModel
IGridModel.getRowCount()
but can be less if the model supports paging.public int getRowCount()
getRowCount
in interface IGridModel
Integer.MAX_VALUE
.public void sync()
IGridModel
AGridFlow
.sync
in interface IGridModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex) throws OutOfBoundsException
getValueAt
in interface IGridModel
OutOfBoundsException
- - used by models providing data pagination.IGridModel.getRowCount()
must return the "real" value.
- if a requested row does not exist (because of random access), the
OutOfBoundsException
must be thrown, and next IGridModel.getRowCount()
requests must return the "real" value and the IGridModel.getCurrentRow()
method
must return a valid current row.public int fetchRows(int rowIndex, int count)
IGridModel
fetchRows
in interface IGridModel
rowIndex
- - starting from this index ...count
- - ... we want this number of rowsIGridModel.getRowCount()
must return the
real rows counter and a call to IGridModel.getCurrentRow()
a valid
row index.public int getCurrentRow()
getCurrentRow
in interface IGridModel
public void setCurrentRow(int rowIndex)
setCurrentRow
in interface IGridModel
public boolean isCurrentRowFreezed()
isCurrentRowFreezed
in interface IGridModel
public APojoCrossModel.Row<T> getPojo(int rowIndex) throws OutOfBoundsException
getPojo
in interface IPojoGridModel<APojoCrossModel.Row<T>>
OutOfBoundsException
- - The contract defined in IGridModel.getValueAt(int, int)
must be
respected.public int rowIndexOf(APojoCrossModel.Row<T> pojo)
rowIndexOf
in interface IPojoGridModel<APojoCrossModel.Row<T>>
public APojoCrossModel.Row<T> getCurrentPojo()
getCurrentPojo
in interface IPojoGridModel<APojoCrossModel.Row<T>>
public java.lang.Class<APojoCrossModel.Row<T>> getPojoType()
getPojoType
in interface IPojoGridModel<APojoCrossModel.Row<T>>
public APojoCrossModel.Cell<T> getCurrentCell(java.lang.String columnName)
columnName
- public APojoCrossModel.Cell<T> getCurrentCell(int columnIndex)
columnName
- public APojoCrossModel.Cell<T> getCell(int rowIndex, int columnIndex)
public APojoCrossModel.Cell<T> getCell(APojoCrossModel.Row<T> pojo, int columnIndex)
public java.lang.Object getValue(APojoCrossModel.Row<T> pojo, int columnIndex)
getValue
in interface IPojoGridModel<APojoCrossModel.Row<T>>
pojo
- - the pojo to extract value from.columnIndex
- - the columnIndex which must be mapped to a pojo property
or to a computed value.public abstract java.lang.Object getIndentValue(APojoCrossModel.Row<T> pojo, int columnIndex)
public abstract java.lang.Object getCellValue(APojoCrossModel.Cell<T> cell, int columnIndex)
public java.util.List<APojoCrossModel.Row<T>> getDataView()
getDataView
in interface IPojoGridModel<APojoCrossModel.Row<T>>
IGridModel.getCurrentRowCount()
.public int getDataVersion()
getDataVersion
in interface IPojoGridModel<APojoCrossModel.Row<T>>
IGridModel.sync()
.public java.lang.String getPropertyName(int columnIndex)
getPropertyName
in interface IPojoGridModel<APojoCrossModel.Row<T>>
public java.lang.String gotoCellPojo(T cellPojo)
cellPojo
-