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()
GridData
getColumns
in interface GridData
public int getColumnCount()
GridData
getColumnCount
in interface GridData
public void appendColumn(GridColumn<?> column)
GridData
appendColumn
in interface GridData
public void insertColumn(int index, GridColumn<?> column)
GridData
insertColumn
in interface GridData
public void deleteColumn(GridColumn<?> column)
GridData
deleteColumn
in interface GridData
public void moveColumnTo(int index, GridColumn<?> column)
GridData
moveColumnTo
in interface GridData
public void moveColumnsTo(int index, List<GridColumn<?>> columns)
GridData
moveColumnsTo
in interface GridData
public List<GridRow> getRows()
GridData
public GridRow getRow(int rowIndex)
GridData
public void appendRow(GridRow row)
GridData
public void insertRow(int rowIndex, GridRow row)
GridData
public GridData.Range deleteRow(int rowIndex)
GridData
public void moveRowTo(int index, GridRow row)
GridData
public void moveRowsTo(int index, List<GridRow> rows)
GridData
moveRowsTo
in interface GridData
public int getRowCount()
GridData
getRowCount
in interface GridData
public int getHeaderRowCount()
GridData
getHeaderRowCount
in interface GridData
public void setHeaderRowCount(int headerRowCount)
GridData
setHeaderRowCount
in interface GridData
headerRowCount
- Cannot be less than 1.public GridCell<?> getCell(int rowIndex, int columnIndex)
GridData
public GridData.SelectedCell getSelectedCellsOrigin()
GridData
getSelectedCellsOrigin
in interface GridData
public List<GridData.SelectedCell> getSelectedCells()
GridData
getSelectedCells
in interface GridData
public List<GridData.SelectedCell> getSelectedHeaderCells()
GridData
getSelectedHeaderCells
in interface GridData
public void clearSelections()
GridData
clearSelections
in interface GridData
public void updateColumn(int index, GridColumn<?> column)
GridData
updateColumn
in interface GridData
public boolean isMerged()
GridData
public void setMerged(boolean isMerged)
GridData
public boolean isRowDraggingEnabled()
GridData
isRowDraggingEnabled
in interface GridData
public void setRowDraggingEnabled(boolean enabled)
GridData
setRowDraggingEnabled
in interface GridData
enabled
- true if drag and drop is enabled.public boolean isColumnDraggingEnabled()
GridData
isColumnDraggingEnabled
in interface GridData
public void setColumnDraggingEnabled(boolean enabled)
GridData
setColumnDraggingEnabled
in interface GridData
enabled
- true if drag and drop is enabled.public GridData.Range setCell(int rowIndex, int columnIndex, Supplier<GridCell<?>> cellSupplier)
GridData
public GridData.Range setCellValue(int rowIndex, int columnIndex, GridCellValue<?> value)
GridData
setCellValue
in interface GridData
protected GridData.Range doSetCell(int rowIndex, int columnIndex, Function<Map.Entry<Integer,Integer>,GridCell<?>> cellSupplier)
public GridData.Range deleteCell(int rowIndex, int columnIndex)
GridData
deleteCell
in interface GridData
public GridData.Range selectCell(int rowIndex, int columnIndex)
GridData
selectCell
in interface GridData
public GridData.Range selectCells(int rowIndex, int columnIndex, int width, int height)
GridData
selectCells
in interface GridData
public GridData.Range selectHeaderCell(int headerRowIndex, int headerColumnIndex)
GridData
selectHeaderCell
in interface GridData
public void collapseCell(int rowIndex, int columnIndex)
GridData
collapseCell
in interface GridData
public void expandCell(int rowIndex, int columnIndex)
GridData
expandCell
in interface GridData
public boolean refreshWidth()
GridData
GridColumn.ColumnWidthMode.AUTO
refreshWidth
in interface GridData
public boolean refreshWidth(double currentWidth)
GridData
GridColumn.ColumnWidthMode.AUTO
refreshWidth
in interface GridData
currentWidth
- is the grid width before this resize iterationprotected boolean internalRefreshWidth(boolean changedNumberOfColumn, OptionalDouble optionalCurrentWidth)
protected double getWidth()
public boolean setVisibleSizeAndRefresh(int width, int height)
GridData
GridData.refreshWidth()
setVisibleSizeAndRefresh
in interface GridData
public int getVisibleWidth()
GridData
getVisibleWidth
in interface GridData
public int getVisibleHeight()
GridData
getVisibleHeight
in interface GridData
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.