public interface ColumnConfiguration
Escalator.Escalator.getColumnConfiguration()| Modifier and Type | Method and Description |
|---|---|
int |
getColumnCount()
Returns the number of columns in the escalator.
|
double |
getColumnWidth(int index)
Returns the user-defined width of a column.
|
double |
getColumnWidthActual(int index)
Returns the actual width of a column.
|
int |
getFrozenColumnCount()
Get the number of leftmost columns that are not affected by horizontal
scrolling.
|
void |
insertColumns(int index,
int numberOfColumns)
Adds columns at a certain index.
|
void |
refreshColumns(int index,
int numberOfColumns)
Refreshes a range of columns in the current row containers in each
Escalator section.
|
void |
removeColumns(int index,
int numberOfColumns)
Removes columns at certain indices.
|
void |
setColumnWidth(int index,
double px)
Sets (or unsets) an explicit width for a column.
|
void |
setColumnWidths(Map<Integer,Double> indexWidthMap)
Sets widths for a set of columns.
|
void |
setColumnWidths(Map<Integer,Double> indexWidthMap,
boolean recalculateElementSizes)
Sets widths for a set of columns.
|
void |
setFrozenColumnCount(int count)
Sets the number of leftmost columns that are not affected by horizontal
scrolling.
|
void removeColumns(int index,
int numberOfColumns)
throws IndexOutOfBoundsException,
IllegalArgumentException
If any of the removed columns were frozen, the number of frozen columns will be reduced by the number of the removed columns that were frozen.
Note: This method simply removes the given columns, and does not
do much of anything else. Especially if you have column spans, you
probably need to run refreshColumns(int, int) or
RowContainer.refreshRows(int, int)
index - the index of the first column to be removednumberOfColumns - the number of rows to remove, starting from indexIndexOutOfBoundsException - if the entire range of removed columns is not currently
present in the escalatorIllegalArgumentException - if numberOfColumns is less than 1.void insertColumns(int index,
int numberOfColumns)
throws IndexOutOfBoundsException,
IllegalArgumentException
The new columns will be inserted between the column at the index, and the column before (an index of 0 means that the columns are inserted at the beginning). Therefore, the columns at the index and afterwards will be moved to the right.
The contents of the inserted columns will be queried from the respective cell renderers in the header, body and footer.
If there are frozen columns and the first added column is to the left of the last frozen column, the number of frozen columns will be increased by the number of inserted columns.
Note: Only the contents of the inserted columns will be
rendered. If inserting new columns affects the contents of existing
columns (e.g. you have column spans),
RowContainer.refreshRows(int, int) or
refreshColumns(int, int) needs to be called as appropriate.
index - the index of the column before which new columns are inserted,
or getColumnCount() to add new columns at the endnumberOfColumns - the number of columns to insert after the indexIndexOutOfBoundsException - if index is not an integer in the range
[0..getColumnCount()]IllegalArgumentException - if numberOfColumns is less than 1.int getColumnCount()
void setFrozenColumnCount(int count)
throws IllegalArgumentException
count - the number of columns to freezeIllegalArgumentException - if the column count is < 0 or > the number of columnsint getFrozenColumnCount()
void setColumnWidth(int index,
double px)
throws IllegalArgumentException
index - the index of the column for which to set a widthpx - the number of pixels the indicated column should be, or a
negative number to let the escalator decideIllegalArgumentException - if index is not a valid column indexdouble getColumnWidth(int index)
throws IllegalArgumentException
index - the index of the column for which to retrieve the widthIllegalArgumentException - if index is not a valid column indexvoid setColumnWidths(Map<Integer,Double> indexWidthMap) throws IllegalArgumentException
indexWidthMap - a map from column index to its respective width to be set. If
the given width for a column index is negative, the column is
resized-to-fit.IllegalArgumentException - if indexWidthMap is nullIllegalArgumentException - if any column index in indexWidthMap is invalidNullPointerException - If any value in the map is nullvoid setColumnWidths(Map<Integer,Double> indexWidthMap, boolean recalculateElementSizes) throws IllegalArgumentException
indexWidthMap - a map from column index to its respective width to be set. If
the given width for a column index is negative, the column is
resized-to-fit.recalculateElementSizes - should the element size recalculation be triggered for
elements that require manual calculationIllegalArgumentException - if indexWidthMap is nullIllegalArgumentException - if any column index in indexWidthMap is invalidNullPointerException - If any value in the map is nulldouble getColumnWidthActual(int index)
throws IllegalArgumentException
index - the index of the column for which to retrieve the widthIllegalArgumentException - if index is not a valid column indexvoid refreshColumns(int index,
int numberOfColumns)
throws IndexOutOfBoundsException,
IllegalArgumentException
The data for the refreshed columns is queried from the current cell renderer.
index - the index of the first column that will be updatednumberOfColumns - the number of columns to update, starting from the indexIndexOutOfBoundsException - if any integer number in the range
[index..(index+numberOfColumns)] is not an
existing column index.IllegalArgumentException - if numberOfColumns is less than 1.RowContainer.setEscalatorUpdater(EscalatorUpdater),
Escalator.getHeader(),
Escalator.getBody(),
Escalator.getFooter()Copyright © 2021 Vaadin Ltd. All rights reserved.