M
- The type of the item stored in the cellS
- The type of the item represented by the virtualised control (e.g. TableViewC
- The type of the virtualised control (e.g TableView, TreeTableView)B
- The Behavior of the virtualised controlI
- 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,B extends BehaviorBase<C>,I extends IndexedCell<M>,TC extends TableColumnBase<S,?>> extends VirtualContainerBase<C,B,I>
Modifier and Type | Field and Description |
---|---|
protected boolean |
forceCellRecreate |
protected boolean |
needCellsRebuilt |
protected boolean |
needCellsReconfigured |
protected boolean |
needCellsRecreated |
static String |
RECREATE |
static String |
REFRESH
*
Static Fields *
*
|
flow, rowCountDirty
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TableViewSkinBase(C control,
B behavior)
*
Constructors *
*
|
Modifier and Type | Method and Description |
---|---|
protected abstract ObjectProperty<Callback<ResizeFeaturesBase,Boolean>> |
columnResizePolicyProperty() |
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred height of this
SkinBase . |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase . |
protected TableHeaderRow |
createTableHeaderRow() |
void |
dispose()
Called by a Skinnable when the Skin is replaced on the Skinnable.
|
protected abstract void |
edit(int index,
TC column) |
Region |
getColumnReorderLine() |
protected abstract ObservableList<TC> |
getColumns() |
protected abstract TablePositionBase<? extends TC> |
getFocusedCell() |
protected abstract TableFocusModel<S,TC> |
getFocusModel() |
protected abstract TableSelectionModel<S> |
getSelectionModel()
*
Abstract Methods *
*
|
protected abstract ObservableList<TC> |
getSortOrder() |
TableHeaderRow |
getTableHeaderRow() |
protected abstract TC |
getVisibleLeafColumn(int col) |
protected abstract ObservableList<? extends TC> |
getVisibleLeafColumns() |
protected abstract int |
getVisibleLeafIndex(TC tc) |
protected void |
handleControlPropertyChanged(String p)
*
Public API *
*
|
protected void |
horizontalScroll() |
protected void |
init(C control) |
protected abstract ObjectProperty<ObservableList<S>> |
itemsProperty() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
protected void |
onFocusNextCell() |
protected void |
onFocusPreviousCell() |
protected void |
onMoveToFirstCell() |
protected void |
onMoveToLastCell() |
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.
|
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.
|
protected void |
onSelectLeftCell() |
protected void |
onSelectNextCell() |
protected void |
onSelectPreviousCell() |
protected void |
onSelectRightCell() |
protected abstract ObjectProperty<Node> |
placeholderProperty() |
protected Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
Object... parameters) |
protected abstract boolean |
resizeColumn(TC tc,
double delta) |
protected abstract void |
resizeColumnToFitContent(TC tc,
int maxRows) |
protected abstract ObjectProperty<Callback<C,I>> |
rowFactoryProperty() |
protected void |
scrollHorizontally() |
protected void |
scrollHorizontally(TC col) |
protected abstract BooleanProperty |
tableMenuButtonVisibleProperty() |
protected void |
updatePlaceholderRegionVisibility() |
protected void |
updateRowCount() |
void |
updateTableItems(ObservableList<S> oldList,
ObservableList<S> newList) |
checkState, createCell, createVirtualFlow, getItemCount
getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
public static final String REFRESH
public static final String RECREATE
protected boolean needCellsRebuilt
protected boolean needCellsRecreated
protected boolean needCellsReconfigured
protected boolean forceCellRecreate
protected void init(C control)
protected abstract TableSelectionModel<S> getSelectionModel()
protected abstract TableFocusModel<S,TC> getFocusModel()
protected abstract TablePositionBase<? extends TC> getFocusedCell()
protected abstract ObservableList<? extends TC> getVisibleLeafColumns()
protected abstract int getVisibleLeafIndex(TC tc)
protected abstract TC getVisibleLeafColumn(int col)
protected abstract ObservableList<TC> getColumns()
protected abstract ObservableList<TC> getSortOrder()
protected abstract ObjectProperty<ObservableList<S>> itemsProperty()
protected abstract ObjectProperty<Callback<C,I>> rowFactoryProperty()
protected abstract ObjectProperty<Node> placeholderProperty()
protected abstract BooleanProperty tableMenuButtonVisibleProperty()
protected abstract ObjectProperty<Callback<ResizeFeaturesBase,Boolean>> columnResizePolicyProperty()
protected abstract boolean resizeColumn(TC tc, double delta)
protected abstract void resizeColumnToFitContent(TC tc, int maxRows)
protected abstract void edit(int index, TC column)
protected void handleControlPropertyChanged(String p)
handleControlPropertyChanged
in class BehaviorSkinBase<C extends Control,B extends BehaviorBase<C>>
public void dispose()
BehaviorSkinBase
Skin.getSkinnable()
and Skin.getNode()
should return null following a call to dispose. Calling dispose twice
has no effect.protected TableHeaderRow createTableHeaderRow()
public TableHeaderRow getTableHeaderRow()
public Region getColumnReorderLine()
public int onScrollPageDown(boolean isFocusDriven)
public int onScrollPageUp(boolean isFocusDriven)
protected void horizontalScroll()
protected void updateRowCount()
updateRowCount
in class VirtualContainerBase<C extends Control,B extends BehaviorBase<C>,I extends IndexedCell<M>>
protected void onFocusPreviousCell()
protected void onFocusNextCell()
protected void onSelectPreviousCell()
protected void onSelectNextCell()
protected void onSelectLeftCell()
protected void onSelectRightCell()
protected void onMoveToFirstCell()
protected void onMoveToLastCell()
public void updateTableItems(ObservableList<S> oldList, ObservableList<S> newList)
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
SkinBase
. The default
implementation calculates this height as the height of the area occupied
by its managed children when they are positioned at their current
positions at their preferred heights.computePrefHeight
in class SkinBase<C extends Control>
width
- the width that should be used if preferred height depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
. The default
implementation calculates this width as the width of the area occupied
by its managed children when they are positioned at their
current positions at their preferred widths.computePrefWidth
in class SkinBase<C extends Control>
height
- the height that should be used if preferred width depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected void layoutChildren(double x, double y, double w, double h)
layoutChildren
in class VirtualContainerBase<C extends Control,B extends BehaviorBase<C>,I extends IndexedCell<M>>
protected final void updatePlaceholderRegionVisibility()
protected void scrollHorizontally()
protected void scrollHorizontally(TC col)
protected Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
queryAccessibleAttribute
in class SkinBase<C extends Control>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)
Copyright © 2020. All rights reserved.