M
- The type of the item stored in each row (for TableView, this is the type
of the items list, and for TreeTableView, this is the type of the
TreeItem).S
- The type of the item, as represented by the selection model (for
TableView, this is, again, the type of the items list, and for
TreeTableView, this is TreeItem typed to the same type as M).C
- The type of the virtualised control (e.g TableView, TreeTableView)I
- The type of cell used by this virtualised control (e.g. TableRow, TreeTableRow)TC
- The type of TableColumnBase used by this virtualised control (e.g. TableColumn, TreeTableColumn)public abstract class TableViewSkinBase<M,S,C extends Control,I extends <any>,TC extends <any>> extends VirtualContainerBase<C,I>
javafx.scene.control.TableView
and javafx.scene.control.TreeTableView
(the concrete classes are TableViewSkin
and TreeTableViewSkin
,
respectively).TableView
,
TreeTableView
,
TableViewSkin
,
TreeTableViewSkin
Modifier and Type | Field and Description |
---|---|
private Region |
columnReorderLine
This region is used to overlay atop the table when the user is performing
a column resize operation or a column reordering operation.
|
private Region |
columnReorderOverlay
A region which is resized and positioned such that it perfectly matches
the dimensions of any TableColumn that is being reordered by the user.
|
private boolean |
contentWidthDirty |
private java.lang.String |
EMPTY_TABLE_TEXT
*
Internal Fields *
*
|
(package private) VirtualFlow<I> |
flow |
private static double |
GOLDEN_RATIO_MULTIPLIER
*
Static Fields *
*
|
private static boolean |
IS_PANNABLE |
private int |
itemCount |
private InvalidationListener |
itemsChangeListener |
(package private) boolean |
needCellsReconfigured |
(package private) boolean |
needCellsRecreated |
private java.lang.String |
NO_COLUMNS_TEXT |
private Label |
placeholderLabel |
private StackPane |
placeholderRegion
Region placed over the top of the flow (and possibly the header row) if
there is no data and/or there are no columns specified.
|
private <any> |
propertiesMapListener
*
Listeners *
*
|
private <any> |
rowCountListener |
private <any> |
rowFactory |
private TableHeaderRow |
tableHeaderRow
The entire header region for all columns.
|
private int |
visibleColCount |
private <any> |
visibleLeafColumnsListener |
private WeakInvalidationListener |
weakItemsChangeListener |
private <any> |
weakRowCountListener |
private <any> |
weakVisibleLeafColumnsListener |
private WeakInvalidationListener |
weakWidthListener |
private InvalidationListener |
widthListener |
Constructor and Description |
---|
TableViewSkinBase(C control) |
Modifier and Type | Method and Description |
---|---|
private void |
checkContentWidthState() |
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected TableHeaderRow |
createTableHeaderRow()
Creates a new TableHeaderRow instance.
|
void |
dispose() |
(package private) Region |
getColumnReorderLine() |
private <any> |
getFocusedCell() |
private <any> |
getFocusModel() |
private <any> |
getSelectionModel() |
(package private) TableHeaderRow |
getTableHeaderRow()
*
Private implementation *
*
|
private <any> |
getVisibleLeafColumns() |
(package private) void |
horizontalScroll() |
private boolean |
isCellFocused(int row) |
private boolean |
isCellSelected(int row) |
private boolean |
isLeadIndex(boolean isFocusDriven,
int index) |
protected void |
layoutChildren(double x,
double y,
double w,
double h) |
(package private) void |
onFocusNextCell() |
(package private) void |
onFocusPreviousCell() |
(package private) void |
onMoveToFirstCell() |
(package private) void |
onMoveToLastCell() |
(package private) int |
onScrollPageDown(boolean isFocusDriven)
Function used to scroll the container down by one 'page', although
if this is a horizontal container, then the scrolling will be to the right.
|
(package private) int |
onScrollPageUp(boolean isFocusDriven)
Function used to scroll the container up by one 'page', although
if this is a horizontal container, then the scrolling will be to the left.
|
(package private) void |
onSelectLeftCell() |
(package private) void |
onSelectNextCell() |
(package private) void |
onSelectPreviousCell() |
(package private) void |
onSelectRightCell() |
protected java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
refreshView() |
(package private) void |
scrollHorizontally() |
(package private) void |
scrollHorizontally(TC col) |
private void |
updateContentWidth() |
protected void |
updateItemCount()
This method is called when it is possible that the item count has changed (i.e.
|
(package private) void |
updatePlaceholderRegionVisibility() |
private void |
updateTableItems(<any> oldList,
<any> newList) |
private void |
updateVisibleColumnCount()
Keeps track of how many leaf columns are currently visible in this table.
|
private void |
updateVisibleLeafColumnWidthListeners(java.util.List<? extends TC> added,
java.util.List<? extends TC> removed) |
checkState, createVirtualFlow, getItemCount, getMaxCellWidth, getVirtualFlow, getVirtualFlowPreferredHeight, markItemCountDirty, requestRebuildCells
private static final double GOLDEN_RATIO_MULTIPLIER
private static final boolean IS_PANNABLE
private final java.lang.String EMPTY_TABLE_TEXT
private final java.lang.String NO_COLUMNS_TEXT
VirtualFlow<I extends <any>> flow
private boolean contentWidthDirty
private Region columnReorderLine
private Region columnReorderOverlay
private TableHeaderRow tableHeaderRow
private <any> rowFactory
private StackPane placeholderRegion
private Label placeholderLabel
private int visibleColCount
boolean needCellsRecreated
boolean needCellsReconfigured
private int itemCount
private <any> propertiesMapListener
private <any> rowCountListener
private <any> visibleLeafColumnsListener
private InvalidationListener widthListener
private InvalidationListener itemsChangeListener
private <any> weakRowCountListener
private <any> weakVisibleLeafColumnsListener
private WeakInvalidationListener weakWidthListener
private WeakInvalidationListener weakItemsChangeListener
public TableViewSkinBase(C control)
control
- the controlpublic void dispose()
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
protected void layoutChildren(double x, double y, double w, double h)
layoutChildren
in class VirtualContainerBase<C extends Control,I extends <any>>
protected TableHeaderRow createTableHeaderRow()
final TableHeaderRow getTableHeaderRow()
private <any> getSelectionModel()
private <any> getFocusModel()
private <any> getFocusedCell()
private <any> getVisibleLeafColumns()
protected void updateItemCount()
VirtualContainerBase.getItemCount()
method.updateItemCount
in class VirtualContainerBase<C extends Control,I extends <any>>
private void checkContentWidthState()
void horizontalScroll()
void onFocusPreviousCell()
void onFocusNextCell()
void onSelectPreviousCell()
void onSelectNextCell()
void onSelectLeftCell()
void onSelectRightCell()
void onMoveToFirstCell()
void onMoveToLastCell()
private void updateTableItems(<any> oldList, <any> newList)
Region getColumnReorderLine()
int onScrollPageDown(boolean isFocusDriven)
int onScrollPageUp(boolean isFocusDriven)
private boolean isLeadIndex(boolean isFocusDriven, int index)
private void updateVisibleColumnCount()
private void updateVisibleLeafColumnWidthListeners(java.util.List<? extends TC> added, java.util.List<? extends TC> removed)
final void updatePlaceholderRegionVisibility()
private void updateContentWidth()
private void refreshView()
void scrollHorizontally()
void scrollHorizontally(TC col)
private boolean isCellSelected(int row)
private boolean isCellFocused(int row)
protected java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)