- java.lang.Object
-
- javafx.beans.value.ObservableValueBase<com.google.common.collect.Range<Integer>>
-
- com.iamsoft.util.ui.javafx.table.ViewportRange
-
- All Implemented Interfaces:
javafx.beans.Observable
,javafx.beans.value.ObservableValue<com.google.common.collect.Range<Integer>>
public class ViewportRange extends javafx.beans.value.ObservableValueBase<com.google.common.collect.Range<Integer>>
Observable value capturing visible rows within a table.
-
-
Constructor Summary
Constructors Constructor Description ViewportRange(javafx.scene.control.TableView<?> pTableView)
ViewportRange(javafx.scene.control.TableView<?> pTableView, float pResizeTopFactor, float pResizeBottomFactor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.Range<Integer>
getValue()
static int[]
getVisibleRows(javafx.scene.control.TableView<?> pTableView)
This is a total hack.
-
-
-
Constructor Detail
-
ViewportRange
public ViewportRange(javafx.scene.control.TableView<?> pTableView)
-
ViewportRange
public ViewportRange(javafx.scene.control.TableView<?> pTableView, float pResizeTopFactor, float pResizeBottomFactor)
- Parameters:
pResizeTopFactor
- Specifies a scale factor (against range size) to use to resize range from start. For example, if range is [7,10) and scale factor is 2, range is resized to [1,10).pResizeBottomFactor
- Specifies a scale factor (against range size) to use to resize range from end. For example, if range is [7,10) and scale factor is 3, range is resized to [7,19).
-
-
Method Detail
-
getValue
public com.google.common.collect.Range<Integer> getValue()
-
getVisibleRows
public static int[] getVisibleRows(javafx.scene.control.TableView<?> pTableView)
This is a total hack. We need it as scrollTo jumps the selected row to the top of the table. Jarring if the row is already visible. As a workaround, we only scroll if the row isn't already visible- Returns:
- A 2 element ray with the start and end index of visible rows
-
-