ROWTYPE
- the type of the rows in the sectionpublic abstract static class Grid.StaticSection<ROWTYPE extends Grid.StaticSection.StaticRow<?>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Grid.StaticSection.StaticCell
A header or footer cell.
|
static class |
Grid.StaticSection.StaticRow<CELLTYPE extends Grid.StaticSection.StaticCell>
Abstract base class for Grid header and footer rows.
|
Constructor and Description |
---|
StaticSection() |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumn(Grid.Column<?,?> column) |
ROWTYPE |
addRowAt(int index)
Inserts a new row at the given position.
|
ROWTYPE |
appendRow()
Adds a new row at the bottom of this section.
|
protected abstract ROWTYPE |
createRow()
Creates and returns a new instance of the row type.
|
protected Grid<?> |
getGrid() |
ROWTYPE |
getRow(int index)
Returns the row at the given position.
|
int |
getRowCount()
Returns the number of rows in this section.
|
protected List<ROWTYPE> |
getRows() |
protected int |
getVisibleRowCount() |
boolean |
isVisible()
Returns the visibility of this section.
|
ROWTYPE |
prependRow()
Adds a new row at the top of this section.
|
protected void |
removeColumn(Grid.Column<?,?> column) |
void |
removeRow(int index)
Removes the row at the given position.
|
void |
removeRow(ROWTYPE row)
Removes the given row from the section.
|
protected abstract void |
requestSectionRefresh()
Informs the grid that this section should be re-rendered.
|
protected void |
setGrid(Grid<?> grid) |
void |
setVisible(boolean visible)
Sets the visibility of the whole section.
|
protected void |
updateColSpans() |
protected abstract ROWTYPE createRow()
protected abstract void requestSectionRefresh()
Note that re-render means calling update() on each cell, preAttach()/postAttach()/preDetach()/postDetach() is not called as the cells are not removed from the DOM.
public void setVisible(boolean visible)
visible
- true to show this section, false to hidepublic boolean isVisible()
public ROWTYPE addRowAt(int index)
index
- the position at which to insert the rowIndexOutOfBoundsException
- if the index is out of boundsappendRow()
,
prependRow()
,
removeRow(int)
,
removeRow(StaticRow)
public ROWTYPE prependRow()
appendRow()
,
addRowAt(int)
,
removeRow(int)
,
removeRow(StaticRow)
public ROWTYPE appendRow()
prependRow()
,
addRowAt(int)
,
removeRow(int)
,
removeRow(StaticRow)
public void removeRow(int index)
index
- the position of the rowIndexOutOfBoundsException
- if the index is out of boundsaddRowAt(int)
,
appendRow()
,
prependRow()
,
removeRow(StaticRow)
public void removeRow(ROWTYPE row)
row
- the row to be removedIllegalArgumentException
- if the row does not exist in this sectionaddRowAt(int)
,
appendRow()
,
prependRow()
,
removeRow(int)
public ROWTYPE getRow(int index)
index
- the position of the rowIndexOutOfBoundsException
- if the index is out of boundspublic int getRowCount()
protected int getVisibleRowCount()
protected void addColumn(Grid.Column<?,?> column)
protected void removeColumn(Grid.Column<?,?> column)
protected void setGrid(Grid<?> grid)
protected Grid<?> getGrid()
protected void updateColSpans()
Copyright © 2019 Vaadin Ltd. All rights reserved.