public class VirtualFlow<T extends IndexedCell> extends Region
Modifier and Type | Class and Description |
---|---|
static class |
VirtualFlow.ArrayLinkedList<T>
A List-like implementation that is exceedingly efficient for the purposes
of the VirtualFlow.
|
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description |
---|
VirtualFlow() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAllToPile() |
protected void |
addLeadingCells(int currentIndex,
double startOffset)
Adds all the cells prior to and including the given currentIndex, until
no more can be added without falling off the flow.
|
protected boolean |
addTrailingCells(boolean fillEmptyCells)
Adds all the trailing cells that come after the last index in
the cells ObservableList.
|
double |
adjustPixels(double delta)
Given a delta value representing a number of pixels, this method attempts
to move the VirtualFlow in the given direction (positive is down/right,
negative is up/left) the given number of pixels.
|
protected double |
computePrefHeight(double width)
Computes the preferred height of this region for the given width;
Region subclasses should override this method to return an appropriate
value based on their content and layout strategy.
|
protected double |
computePrefWidth(double height)
Computes the preferred width of this region for the given height.
|
protected T |
getAvailableCell(int prefIndex)
Get a cell which can be used in the layout.
|
T |
getCell(int index)
Return a cell for the given index.
|
protected double |
getCellBreadth(Cell cell)
Gets the breadth of a specific cell
|
protected double |
getCellBreadth(int index) |
int |
getCellCount() |
protected int |
getCellIndex(T cell)
Return the index for a given cell.
|
protected double |
getCellLength(int index)
Compute and return the length of the cell for the given index.
|
protected double |
getCellLength(T cell)
Gets the length of a specific cell
|
protected double |
getCellPosition(T cell)
Gets the layout position of the cell along the length axis
|
protected List<T> |
getCells() |
Callback<VirtualFlow,T> |
getCreateCell() |
T |
getFirstVisibleCell()
Locates and returns the first non-empty IndexedCell that is partially or
completely visible.
|
T |
getFirstVisibleCellWithinViewPort() |
protected VirtualScrollBar |
getHbar() |
T |
getLastVisibleCell()
Locates and returns the last non-empty IndexedCell that is currently
partially or completely visible.
|
T |
getLastVisibleCellWithinViewPort() |
protected double |
getMaxPrefBreadth() |
double |
getPosition() |
protected VirtualScrollBar |
getVbar() |
protected double |
getViewportBreadth() |
protected double |
getViewportLength() |
T |
getVisibleCell(int index)
Gets a cell for the given index if the cell has been created and laid out.
|
boolean |
isPannable() |
boolean |
isVertical() |
protected void |
layoutChildren()
Invoked during the layout pass to layout the children in this
Parent . |
protected void |
positionCell(T cell,
double position) |
void |
rebuildCells() |
void |
reconfigureCells() |
void |
recreateCells() |
void |
requestCellLayout() |
void |
requestLayout()
Overridden to implement somewhat more efficient support for layout.
|
protected void |
resizeCellSize(T cell) |
protected void |
scrollBarOn() |
void |
scrollTo(int index) |
void |
scrollToOffset(int offset) |
void |
setCellCount(int i) |
void |
setCellDirty(int index) |
protected void |
setCellIndex(T cell,
int index) |
void |
setCreateCell(Callback<VirtualFlow,T> cc) |
void |
setFixedCellSize(double value) |
protected void |
setHeight(double value) |
protected void |
setMaxPrefBreadth(double value) |
void |
setPannable(boolean value) |
void |
setPosition(double newPosition) |
void |
setVertical(boolean value) |
protected void |
setViewportBreadth(double value) |
protected void |
setWidth(double value) |
void |
show(int index) |
void |
show(T cell)
Adjusts the cells such that the selected cell will be fully visible in
the viewport (but only just).
|
void |
showAsFirst(T firstCell)
Adjust the position of cells so that the specified cell
will be positioned at the start of the viewport.
|
void |
showAsLast(T lastCell)
Adjust the position of cells so that the specified cell
will be positioned at the end of the viewport.
|
protected void |
startSBReleasedAnimation() |
BooleanProperty |
verticalProperty() |
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthProperty
getBaselineOffset, getChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public final void setVertical(boolean value)
public final boolean isVertical()
public final BooleanProperty verticalProperty()
public boolean isPannable()
public void setPannable(boolean value)
public int getCellCount()
public void setCellCount(int i)
public double getPosition()
public void setPosition(double newPosition)
public void setFixedCellSize(double value)
public Callback<VirtualFlow,T> getCreateCell()
public void setCreateCell(Callback<VirtualFlow,T> cc)
protected final void setMaxPrefBreadth(double value)
protected final double getMaxPrefBreadth()
protected final void setViewportBreadth(double value)
protected final double getViewportBreadth()
protected double getViewportLength()
protected final VirtualScrollBar getHbar()
protected final VirtualScrollBar getVbar()
public void requestLayout()
requestLayout
in class Parent
protected void layoutChildren()
Parent
Parent
. By default it will only set the size of managed,
resizable content to their preferred sizes and does not do any node
positioning.
Subclasses should override this function to layout content as needed.
layoutChildren
in class Parent
protected void addLeadingCells(int currentIndex, double startOffset)
protected boolean addTrailingCells(boolean fillEmptyCells)
protected int getCellIndex(T cell)
public T getCell(int index)
protected double getCellLength(int index)
protected double getCellBreadth(int index)
protected double getCellLength(T cell)
protected double getCellBreadth(Cell cell)
protected double getCellPosition(T cell)
protected void positionCell(T cell, double position)
protected void resizeCellSize(T cell)
protected void setCellIndex(T cell, int index)
protected T getAvailableCell(int prefIndex)
protected void addAllToPile()
public T getVisibleCell(int index)
public T getLastVisibleCell()
public T getFirstVisibleCell()
public T getLastVisibleCellWithinViewPort()
public T getFirstVisibleCellWithinViewPort()
public void showAsFirst(T firstCell)
public void showAsLast(T lastCell)
public void show(T cell)
public void show(int index)
public void scrollTo(int index)
public void scrollToOffset(int offset)
public double adjustPixels(double delta)
public void reconfigureCells()
public void recreateCells()
public void rebuildCells()
public void requestCellLayout()
public void setCellDirty(int index)
protected double computePrefWidth(double height)
Region
computePrefWidth
in class Region
height
- the height that should be used if preferred width depends
on itprotected double computePrefHeight(double width)
Region
computePrefHeight
in class Region
width
- the width that should be used if preferred height depends
on itprotected void startSBReleasedAnimation()
protected void scrollBarOn()
Copyright © 2020. All rights reserved.