public class ListViewSkin<T> extends VirtualContainerBase<ListView<T>,ListViewBehavior<T>,ListCell<T>>
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
EMPTY_LIST_TEXT |
private static boolean |
IS_PANNABLE |
private int |
itemCount |
private InvalidationListener |
itemsChangeListener |
private ObservableList<T> |
listViewItems |
private ListChangeListener<T> |
listViewItemsListener |
private boolean |
needCellsRebuilt |
private boolean |
needCellsReconfigured |
private Node |
placeholderNode |
private StackPane |
placeholderRegion
Region placed over the top of the flow (and possibly the header row) if
there is no data.
|
private MapChangeListener<java.lang.Object,java.lang.Object> |
propertiesMapListener |
static java.lang.String |
RECREATE |
private WeakListChangeListener<T> |
weakListViewItemsListener |
flow, rowCountDirty
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
ListViewSkin(ListView<T> listView) |
Modifier and Type | Method and Description |
---|---|
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 . |
ListCell<T> |
createCell()
Returns a Cell available to be used in the virtual flow.
|
private static <T> ListCell<T> |
createDefaultCellImpl() |
protected void |
executeAccessibleAction(AccessibleAction action,
java.lang.Object... parameters) |
int |
getItemCount()
Returns the total number of items in this container, including those
that are currently hidden because they are out of view.
|
protected void |
handleControlPropertyChanged(java.lang.String p)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
private void |
onFocusNextCell() |
private void |
onFocusPreviousCell() |
private void |
onMoveToFirstCell() |
private void |
onMoveToLastCell() |
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.
|
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.
|
private void |
onSelectNextCell() |
private void |
onSelectPreviousCell() |
protected java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
void |
updateListViewItems() |
protected void |
updatePlaceholderRegionVisibility() |
protected void |
updateRowCount() |
checkState, createVirtualFlow, getMaxCellWidth, getVirtualFlowPreferredHeight
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, consumeMouseEvents, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
public static final java.lang.String RECREATE
private StackPane placeholderRegion
private Node placeholderNode
private static final java.lang.String EMPTY_LIST_TEXT
private static final boolean IS_PANNABLE
private ObservableList<T> listViewItems
private final InvalidationListener itemsChangeListener
private MapChangeListener<java.lang.Object,java.lang.Object> propertiesMapListener
private final ListChangeListener<T> listViewItemsListener
private final WeakListChangeListener<T> weakListViewItemsListener
private int itemCount
private boolean needCellsRebuilt
private boolean needCellsReconfigured
protected void handleControlPropertyChanged(java.lang.String p)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<ListView<T>,ListViewBehavior<T>>
public void updateListViewItems()
public int getItemCount()
VirtualContainerBase
getItemCount
in class VirtualContainerBase<ListView<T>,ListViewBehavior<T>,ListCell<T>>
protected void updateRowCount()
updateRowCount
in class VirtualContainerBase<ListView<T>,ListViewBehavior<T>,ListCell<T>>
protected final void updatePlaceholderRegionVisibility()
public ListCell<T> createCell()
VirtualContainerBase
createCell
in class VirtualContainerBase<ListView<T>,ListViewBehavior<T>,ListCell<T>>
private static <T> ListCell<T> createDefaultCellImpl()
protected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class VirtualContainerBase<ListView<T>,ListViewBehavior<T>,ListCell<T>>
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
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<ListView<T>>
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 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<ListView<T>>
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 insetprivate void onFocusPreviousCell()
private void onFocusNextCell()
private void onSelectPreviousCell()
private void onSelectNextCell()
private void onMoveToFirstCell()
private void onMoveToLastCell()
private int onScrollPageDown(boolean isFocusDriven)
private int onScrollPageUp(boolean isFocusDriven)
protected java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class SkinBase<ListView<T>>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)
protected void executeAccessibleAction(AccessibleAction action, java.lang.Object... parameters)
executeAccessibleAction
in class SkinBase<ListView<T>>
Node.executeAccessibleAction(javafx.scene.AccessibleAction, java.lang.Object...)