Class ViewportRange

    • 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