|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.twenty11.skysail.common.grids.GridData
public class GridData
A grid-like data structure implementing the interface 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 Summary | |
|---|---|
GridData()
default constructor. |
|
GridData(ColumnsBuilder builder)
A constructor expecting a columnsBuilder which is used to create the initial columns. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GridData()
public GridData(ColumnsBuilder builder)
builder - the provided ColumnsBuilder| Method Detail |
|---|
public 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 List<RowData> getRows()
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)
public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||