Package com.vaadin.featurepack.ui
Class FGrid.StaticSection<ROWTYPE extends FGrid.StaticSection.StaticRow<?>>
java.lang.Object
com.vaadin.featurepack.ui.FGrid.StaticSection<ROWTYPE>
- Type Parameters:
ROWTYPE- the type of the rows in the section
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FGrid.Footer,FGrid.Header
- Enclosing class:
FGrid
public abstract static class FGrid.StaticSection<ROWTYPE extends FGrid.StaticSection.StaticRow<?>>
extends Object
implements Serializable
Abstract base class for Grid header and footer sections.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration, specifying the content type of a Cell in a GridStaticSection.static classFGrid.StaticSection.StaticRow<CELLTYPE extends com.vaadin.featurepack.ui.FGrid.StaticSection.StaticCell>Abstract base class for Grid header and footer rows. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds a column for given property id to the section.addRowAt(int index) Inserts a new row at the given position.Adds a new row at the bottom of this section.protected abstract ROWTYPEgetRow(int rowIndex) Gets row at given index.intGets the amount of rows in this section.booleanReturns the visibility of this section.protected voidInforms the grid that state has changed and it should be redrawn.Adds a new row at the top of this section.protected voidremoveColumn(Object propertyId) Removes a column for given property id from the section.removeRow(int rowIndex) Removes the row at the given position.voidRemoves the given row from the section.protected voidPerforms a sanity check that section is in correct state.voidsetVisible(boolean visible) Sets the visibility of the whole section.
-
Field Details
-
grid
-
rows
-
-
Constructor Details
-
StaticSection
public StaticSection()
-
-
Method Details
-
setVisible
public void setVisible(boolean visible) Sets the visibility of the whole section.- Parameters:
visible- true to show this section, false to hide
-
isVisible
public boolean isVisible()Returns the visibility of this section.- Returns:
- true if visible, false otherwise.
-
removeRow
Removes the row at the given position.- Parameters:
rowIndex- the position of the row- Throws:
IllegalArgumentException- if no row exists at given index- See Also:
-
removeRow
Removes the given row from the section.- Parameters:
row- the row to be removed- Throws:
IllegalArgumentException- if the row does not exist in this section- See Also:
-
getRow
Gets row at given index.- Parameters:
rowIndex- 0 based index for row. Counted from top to bottom- Returns:
- row at given index
-
prependRow
Adds a new row at the top of this section.- Returns:
- the new row
- See Also:
-
appendRow
Adds a new row at the bottom of this section.- Returns:
- the new row
- See Also:
-
addRowAt
Inserts a new row at the given position.- Parameters:
index- the position at which to insert the row- Returns:
- the new row
- Throws:
IndexOutOfBoundsException- if the index is out of bounds- See Also:
-
getRowCount
public int getRowCount()Gets the amount of rows in this section.- Returns:
- row count
-
createRow
-
markAsDirty
protected void markAsDirty()Informs the grid that state has changed and it should be redrawn. -
removeColumn
Removes a column for given property id from the section.- Parameters:
propertyId- property to be removed
-
addColumn
Adds a column for given property id to the section.- Parameters:
propertyId- property to be added
-
sanityCheck
Performs a sanity check that section is in correct state.- Throws:
IllegalStateException- if merged cells are not i n continuous range
-