public class GridData extends Object implements SkysailData
SkysailData.
A gridData object contains information about the provided columns (see ColumnInfo), the actual rows (a list
of RowData and an optional filter which will decide whether or not a row passed to "addRowData" will actually
be added.
The columns are created using a columnsBuilder which is passed to the constructor. Adding rows is done one by one,
using the addRowData method. If a row is added and matches the filter (if any), the availableRowsCount is increased.| Constructor and Description |
|---|
GridData()
default constructor.
|
GridData(ColumnsBuilder builder)
A constructor expecting a columnsBuilder which is used to create the initial columns.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRowData(RowData rowData)
Adds a row to the rows.
|
boolean |
equals(Object obj) |
Integer |
getAvailableRowsCount() |
Integer |
getColumnId(String key)
Delegates to columns object, provides the id of the column for the given name.
|
Columns |
getColumns() |
Object |
getGridElement(int row,
int col) |
List<RowData> |
getRows() |
int |
getSize() |
String |
getSortingRepresentation() |
String |
getType() |
int |
hashCode() |
void |
removeRow(int j)
removes the grids row at provided position.
|
void |
setColumns(Columns theColumns) |
void |
setColumns(ColumnsBuilder builder) |
void |
setSize(int size)
needed for json deserialization.
|
void |
setSortingRepresentation(int sortingRep)
needed for json deserialization.
|
void |
setType(String type) |
String |
toString() |
public GridData()
public GridData(ColumnsBuilder builder)
builder - the provided ColumnsBuilderpublic String getType()
public void setType(String type)
public final void addRowData(RowData rowData)
rowData - the rowData object to be added to the rowspublic final Integer getAvailableRowsCount()
public final Integer getColumnId(String key)
key - the name of the column for the given id.public Columns getColumns()
public Object getGridElement(int row, int col)
public int getSize()
getSize in interface SkysailDatapublic void setSize(int size)
size - public final String getSortingRepresentation()
public void setSortingRepresentation(int sortingRep)
public void removeRow(int j)
j - the position of the row (0 <= j < size)public void setColumns(Columns theColumns)
public void setColumns(ColumnsBuilder builder)
Copyright © 2011-2013. All Rights Reserved.