GridData.Range, GridData.SelectedCell| Modifier and Type | Field and Description |
|---|---|
protected List<GridColumn<?>> |
columns |
protected int |
headerRowCount |
protected BaseGridDataIndexManager |
indexManager |
protected boolean |
isColumnDraggingEnabled |
protected boolean |
isMerged |
protected boolean |
isRowDraggingEnabled |
protected List<GridRow> |
rows |
protected List<GridData.SelectedCell> |
selectedCells |
protected List<GridData.SelectedCell> |
selectedHeaderCells |
protected BaseGridDataSelectionsManager |
selectionsManager |
| Constructor and Description |
|---|
BaseGridData() |
BaseGridData(boolean isMerged) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendColumn(GridColumn<?> column)
Appends a column to the end of the grid.
|
void |
appendRow(GridRow row)
Appends a row to the end of the grid.
|
void |
clearSelections()
Clears all cell selections.
|
void |
collapseCell(int rowIndex,
int columnIndex)
Collapses a cell and corresponding rows.
|
GridData.Range |
deleteCell(int rowIndex,
int columnIndex)
Deletes a cell at the specified physical coordinate.
|
void |
deleteColumn(GridColumn<?> column)
Deletes a column from the grid.
|
GridData.Range |
deleteRow(int rowIndex)
Deletes a row from the grid at the specified index.
|
protected GridData.Range |
doSetCell(int rowIndex,
int columnIndex,
Function<Map.Entry<Integer,Integer>,GridCell<?>> cellSupplier) |
void |
expandCell(int rowIndex,
int columnIndex)
Expands a cell and corresponding rows.
|
GridCell<?> |
getCell(int rowIndex,
int columnIndex)
Returns a cell at the specified physical coordinate.
|
int |
getColumnCount()
Returns the total number of columns in the grid, including hidden columns.
|
List<GridColumn<?>> |
getColumns()
Returns the columns associated with the grid.
|
int |
getHeaderRowCount()
Returns the number of rows in the grid's header.
|
GridRow |
getRow(int rowIndex)
Returns the row at the specified index.
|
int |
getRowCount()
Returns the total number of rows in the grid, including collapsed rows.
|
List<GridRow> |
getRows()
Returns the rows associated with the grid.
|
List<GridData.SelectedCell> |
getSelectedCells()
Returns all selected cells.
|
GridData.SelectedCell |
getSelectedCellsOrigin()
Returns the origin of a selected range.
|
List<GridData.SelectedCell> |
getSelectedHeaderCells()
Returns all selected header cells.
|
int |
getVisibleHeight()
Get visible height
|
int |
getVisibleWidth()
Get visible width
|
protected double |
getWidth() |
void |
insertColumn(int index,
GridColumn<?> column)
Inserts a column to the grid at the specified index.
|
void |
insertRow(int rowIndex,
GridRow row)
Inserts a row to the grid at the specified index.
|
protected boolean |
internalRefreshWidth(boolean changedNumberOfColumn,
OptionalDouble optionalCurrentWidth) |
boolean |
isColumnDraggingEnabled()
Returns whether columns can be repositioned by dragging and dropping.
|
boolean |
isMerged()
Returns whether the data in a merged state.
|
boolean |
isRowDraggingEnabled()
Returns whether rows can be repositioned by dragging and dropping.
|
void |
moveColumnsTo(int index,
List<GridColumn<?>> columns)
Moves columns to a new index within the grid
|
void |
moveColumnTo(int index,
GridColumn<?> column)
Moves a column to a new index within the grid
|
void |
moveRowsTo(int index,
List<GridRow> rows)
Moves rowss to a new index within the grid
|
void |
moveRowTo(int index,
GridRow row)
Moves a row to a new index within the grid
|
boolean |
refreshWidth()
Updates the width of columns with
GridColumn.ColumnWidthMode.AUTO |
boolean |
refreshWidth(double currentWidth)
Updates the width of columns with
GridColumn.ColumnWidthMode.AUTO |
GridData.Range |
selectCell(int rowIndex,
int columnIndex)
Selects a cell at the specified physical coordinate.
|
GridData.Range |
selectCells(int rowIndex,
int columnIndex,
int width,
int height)
Selects a cell at the specified physical coordinate.
|
GridData.Range |
selectHeaderCell(int headerRowIndex,
int headerColumnIndex)
Selects a header cell at the specified physical coordinate.
|
GridData.Range |
setCell(int rowIndex,
int columnIndex,
Supplier<GridCell<?>> cellSupplier)
Sets a cell at the specified physical coordinate.
|
GridData.Range |
setCellValue(int rowIndex,
int columnIndex,
GridCellValue<?> value)
Sets a cell value at the specified physical coordinate.
|
void |
setColumnDraggingEnabled(boolean enabled)
Sets whether columns can be repositioned by dragging and dropping.
|
void |
setHeaderRowCount(int headerRowCount)
Sets the number of rows in the grid's header.
|
void |
setMerged(boolean isMerged)
Sets whether the data is in merged state.
|
void |
setRowDraggingEnabled(boolean enabled)
Set whether rows can be repositioned by dragging and dropping.
|
boolean |
setVisibleSizeAndRefresh(int width,
int height)
Update visible size information and refresh columns width.
|
void |
updateColumn(int index,
GridColumn<?> column)
Updates a column in the grid at the specified index.
|
protected boolean isMerged
protected boolean isRowDraggingEnabled
protected boolean isColumnDraggingEnabled
protected List<GridColumn<?>> columns
protected List<GridData.SelectedCell> selectedCells
protected List<GridData.SelectedCell> selectedHeaderCells
protected int headerRowCount
protected BaseGridDataIndexManager indexManager
protected BaseGridDataSelectionsManager selectionsManager
public BaseGridData()
public BaseGridData(boolean isMerged)
public List<GridColumn<?>> getColumns()
GridDatagetColumns in interface GridDatapublic int getColumnCount()
GridDatagetColumnCount in interface GridDatapublic void appendColumn(GridColumn<?> column)
GridDataappendColumn in interface GridDatapublic void insertColumn(int index,
GridColumn<?> column)
GridDatainsertColumn in interface GridDatapublic void deleteColumn(GridColumn<?> column)
GridDatadeleteColumn in interface GridDatapublic void moveColumnTo(int index,
GridColumn<?> column)
GridDatamoveColumnTo in interface GridDatapublic void moveColumnsTo(int index,
List<GridColumn<?>> columns)
GridDatamoveColumnsTo in interface GridDatapublic List<GridRow> getRows()
GridDatapublic GridRow getRow(int rowIndex)
GridDatapublic void appendRow(GridRow row)
GridDatapublic void insertRow(int rowIndex,
GridRow row)
GridDatapublic GridData.Range deleteRow(int rowIndex)
GridDatapublic void moveRowTo(int index,
GridRow row)
GridDatapublic void moveRowsTo(int index,
List<GridRow> rows)
GridDatamoveRowsTo in interface GridDatapublic int getRowCount()
GridDatagetRowCount in interface GridDatapublic int getHeaderRowCount()
GridDatagetHeaderRowCount in interface GridDatapublic void setHeaderRowCount(int headerRowCount)
GridDatasetHeaderRowCount in interface GridDataheaderRowCount - Cannot be less than 1.public GridCell<?> getCell(int rowIndex, int columnIndex)
GridDatapublic GridData.SelectedCell getSelectedCellsOrigin()
GridDatagetSelectedCellsOrigin in interface GridDatapublic List<GridData.SelectedCell> getSelectedCells()
GridDatagetSelectedCells in interface GridDatapublic List<GridData.SelectedCell> getSelectedHeaderCells()
GridDatagetSelectedHeaderCells in interface GridDatapublic void clearSelections()
GridDataclearSelections in interface GridDatapublic void updateColumn(int index,
GridColumn<?> column)
GridDataupdateColumn in interface GridDatapublic boolean isMerged()
GridDatapublic void setMerged(boolean isMerged)
GridDatapublic boolean isRowDraggingEnabled()
GridDataisRowDraggingEnabled in interface GridDatapublic void setRowDraggingEnabled(boolean enabled)
GridDatasetRowDraggingEnabled in interface GridDataenabled - true if drag and drop is enabled.public boolean isColumnDraggingEnabled()
GridDataisColumnDraggingEnabled in interface GridDatapublic void setColumnDraggingEnabled(boolean enabled)
GridDatasetColumnDraggingEnabled in interface GridDataenabled - true if drag and drop is enabled.public GridData.Range setCell(int rowIndex, int columnIndex, Supplier<GridCell<?>> cellSupplier)
GridDatapublic GridData.Range setCellValue(int rowIndex, int columnIndex, GridCellValue<?> value)
GridDatasetCellValue in interface GridDataprotected GridData.Range doSetCell(int rowIndex, int columnIndex, Function<Map.Entry<Integer,Integer>,GridCell<?>> cellSupplier)
public GridData.Range deleteCell(int rowIndex, int columnIndex)
GridDatadeleteCell in interface GridDatapublic GridData.Range selectCell(int rowIndex, int columnIndex)
GridDataselectCell in interface GridDatapublic GridData.Range selectCells(int rowIndex, int columnIndex, int width, int height)
GridDataselectCells in interface GridDatapublic GridData.Range selectHeaderCell(int headerRowIndex, int headerColumnIndex)
GridDataselectHeaderCell in interface GridDatapublic void collapseCell(int rowIndex,
int columnIndex)
GridDatacollapseCell in interface GridDatapublic void expandCell(int rowIndex,
int columnIndex)
GridDataexpandCell in interface GridDatapublic boolean refreshWidth()
GridDataGridColumn.ColumnWidthMode.AUTOrefreshWidth in interface GridDatapublic boolean refreshWidth(double currentWidth)
GridDataGridColumn.ColumnWidthMode.AUTOrefreshWidth in interface GridDatacurrentWidth - is the grid width before this resize iterationprotected boolean internalRefreshWidth(boolean changedNumberOfColumn,
OptionalDouble optionalCurrentWidth)
protected double getWidth()
public boolean setVisibleSizeAndRefresh(int width,
int height)
GridDataGridData.refreshWidth()setVisibleSizeAndRefresh in interface GridDatapublic int getVisibleWidth()
GridDatagetVisibleWidth in interface GridDatapublic int getVisibleHeight()
GridDatagetVisibleHeight in interface GridDataCopyright © 2012–2020 JBoss by Red Hat. All rights reserved.