resizing and
relocating a Cell's javafx.scene.Node as well
as handling calls related to whether a cell's node is visible (displayed in the viewport) or not.
| Modifier and Type | Field and Description |
|---|---|
| private final CellListManager | |
| private final OrientationHelper | |
| private final SizeTracker |
| Access | Constructor and Description |
|---|---|
| public | CellPositioner(CellListManager<T, C> cellManager, OrientationHelper orientation, SizeTracker sizeTracker)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public OptionalInt | |
| public Optional | |
| public OptionalInt | |
| public OptionalInt | |
| pack-priv C | getSizedCell(int itemIndex)
Returns properly sized, but not properly positioned cell for the given index. |
| public C | |
| public OptionalInt | |
| public C | placeEndFromEnd(int
the index of the item in the list of all (not currently visible) cells itemIndex, double the amount by which to offset the "layoutY" value of the cell's node endOffEnd)Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by |
| public C | placeEndFromStart(int
the index of the item in the list of all (not currently visible) cells itemIndex, double the amount by which to offset the "layoutY" value of the cell's node endOffStart)Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by |
| public C | placeStartAt(int
the index of the item in the list of all (not currently visible) cells itemIndex, double the amount by which to offset the "layoutY" value of the cell's node startOffStart)Properly resizes the cell's node, and sets its "layoutY" value, so that is the first visible
node in the viewport, and further offsets this value by |
| public C | placeStartFromEnd(int
the index of the item in the list of all (not currently visible) cells itemIndex, double the amount by which to offset the "layoutY" value of the cell's node startOffEnd)Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by |
| private void | |
| public void | |
| public double | shortestDeltaToViewport(C cell)
Gets the shortest delta amount by which to scroll the viewport's length in order to fully display a partially-displayed cell's node. |
| public double |
| cellManager | back to summary |
|---|---|
| private final CellListManager<T, C> cellManager | |
| orientation | back to summary |
|---|---|
| private final OrientationHelper orientation | |
| sizeTracker | back to summary |
|---|---|
| private final SizeTracker sizeTracker | |
| CellPositioner | back to summary |
|---|---|
| public CellPositioner(CellListManager<T, C> cellManager, OrientationHelper orientation, SizeTracker sizeTracker) | |
| cropTo | back to summary |
|---|---|
| public void cropTo(int from, int to) | |
| firstVisibleAfter | back to summary |
|---|---|
| public OptionalInt firstVisibleAfter(int position) | |
| getCellIfVisible | back to summary |
|---|---|
| public Optional | |
| getFirstVisibleIndex | back to summary |
|---|---|
| public OptionalInt getFirstVisibleIndex() | |
| getLastVisibleIndex | back to summary |
|---|---|
| public OptionalInt getLastVisibleIndex() | |
| getSizedCell | back to summary |
|---|---|
| pack-priv C getSizedCell(int itemIndex) Returns properly sized, but not properly positioned cell for the given index. | |
| getVisibleCell | back to summary |
|---|---|
| public C getVisibleCell(int itemIndex) | |
| lastVisibleBefore | back to summary |
|---|---|
| public OptionalInt lastVisibleBefore(int position) | |
| placeEndFromEnd | back to summary |
|---|---|
| public C placeEndFromEnd(int itemIndex, double endOffEnd) Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by
| |
| placeEndFromStart | back to summary |
|---|---|
| public C placeEndFromStart(int itemIndex, double endOffStart) Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by
| |
| placeStartAt | back to summary |
|---|---|
| public C placeStartAt(int itemIndex, double startOffStart) Properly resizes the cell's node, and sets its "layoutY" value, so that is the first visible
node in the viewport, and further offsets this value by
| |
| placeStartFromEnd | back to summary |
|---|---|
| public C placeStartFromEnd(int itemIndex, double startOffEnd) Properly resizes the cell's node, and sets its "layoutY" value, so that is the last visible
node in the viewport, and further offsets this value by
| |
| relocate | back to summary |
|---|---|
| private void relocate(C cell, double breadth0, double length0) | |
| shiftCellBy | back to summary |
|---|---|
| public void shiftCellBy(C cell, double delta) Moves the given cell's node's "layoutY" value by | |
| shortestDeltaToViewport | back to summary |
|---|---|
| public double shortestDeltaToViewport(C cell) Gets the shortest delta amount by which to scroll the viewport's length in order to fully display a partially-displayed cell's node. | |
| shortestDeltaToViewport | back to summary |
|---|---|
| public double shortestDeltaToViewport(C cell, double fromY, double toY) | |