Class ScrollBarUtil

java.lang.Object
com.iamsoft.util.ui.javafx.ScrollBarUtil

public final class ScrollBarUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static Object
    adjustHScroll(javafx.scene.control.Control pControl)
     
    static Object
    adjustScroll(javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar> pScrollBar)
     
    static Object
    adjustScroll(javafx.scene.control.Control pControl)
     
    static Object
    adjustVScroll(javafx.scene.control.Control pControl)
     
    static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar>
    createHScrollBarProperty(javafx.scene.control.Control pControl)
    Creates a read-only property providing the horizontal scroll bar of the specified control.
    static javafx.beans.value.ObservableValue<javafx.scene.layout.Region>
    createNodeProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar, String pSelector)
    Creates an observable value providing the thumb node of the specified scroll bar.
    static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar>
    createScrollBarProperty(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation)
    Creates a read-only property providing the horizontal/vertical scroll bar of the specified table.
    static javafx.beans.property.ReadOnlyProperty<Double>
    createThumbLengthProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar)
    Creates an observable value providing the thumb node of the specified scroll bar.
    static javafx.beans.property.ReadOnlyProperty<Double>
    createTrackLengthProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar)
    Creates an observable value providing the track node of the specified scroll bar.
    static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar>
    createVScrollBarProperty(javafx.scene.control.Control pControl)
    Creates a read-only property providing the vertical scroll bar of the specified control.
    static double
    getNormalizedHScrollValue(javafx.scene.control.Control pControl)
    Gets the value of the horizontal scroll bar of the specified control and returns a normalized value - in a [0,1] interval.
    static double
    getNormalizedValue(javafx.scene.control.ScrollBar pScrollBar)
     
    static javafx.scene.control.ScrollBar
    getScrollBar(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation)
     
    static javafx.scene.control.ScrollBar
    getScrollBar(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation, String pSelector)
     
    static double
    normalizeValue(double pMin, double pMax, double pVal)
    Translates the corresponding value in a [0,1] interval.
    static double
    normalizeValue(javafx.scene.control.ScrollBar pScrollBar)
     
    static void
    setNormalizedHScrollValue(javafx.scene.control.Control pControl, double pNormalizedValue)
    Sets the value of the horizontal scroll bar of the specified control using the specified normalized value (in a [0,1] interval).
    static void
    setScrollBarValue(javafx.scene.control.ScrollBar pScrollBar, double pNormalizedVal)
     
    static void
    setScrollBarValue(javafx.scene.control.ScrollBar pScrollBar, double pMin, double pMax, double pVal)
     
    static double
    translateNormalizedValue(double pVal, double pNewMin, double pNewMax)
     
    static double
    translateValue(double pMin, double pMax, double pVal, double pNewMin, double pNewMax)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createHScrollBarProperty

      public static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar> createHScrollBarProperty(javafx.scene.control.Control pControl)
      Creates a read-only property providing the horizontal scroll bar of the specified control.
    • createVScrollBarProperty

      public static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar> createVScrollBarProperty(javafx.scene.control.Control pControl)
      Creates a read-only property providing the vertical scroll bar of the specified control.
    • createScrollBarProperty

      public static javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar> createScrollBarProperty(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation)
      Creates a read-only property providing the horizontal/vertical scroll bar of the specified table.
      Parameters:
      pOrientation - Specifies whether to return horizontal or vertical scroll bar property.
    • getScrollBar

      public static javafx.scene.control.ScrollBar getScrollBar(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation)
    • getScrollBar

      public static javafx.scene.control.ScrollBar getScrollBar(javafx.scene.control.Control pControl, javafx.geometry.Orientation pOrientation, String pSelector)
    • createNodeProperty

      public static javafx.beans.value.ObservableValue<javafx.scene.layout.Region> createNodeProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar, String pSelector)
      Creates an observable value providing the thumb node of the specified scroll bar.
    • createThumbLengthProperty

      public static javafx.beans.property.ReadOnlyProperty<Double> createThumbLengthProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar)
      Creates an observable value providing the thumb node of the specified scroll bar.
    • createTrackLengthProperty

      public static javafx.beans.property.ReadOnlyProperty<Double> createTrackLengthProperty(javafx.beans.value.ObservableValue<javafx.scene.control.ScrollBar> pScrollBar)
      Creates an observable value providing the track node of the specified scroll bar.
    • adjustHScroll

      public static Object adjustHScroll(javafx.scene.control.Control pControl)
      Returns:
      Weak reference that mustn't be garbage collected.
    • adjustVScroll

      public static Object adjustVScroll(javafx.scene.control.Control pControl)
      Returns:
      Weak reference that mustn't be garbage collected.
    • adjustScroll

      public static Object adjustScroll(javafx.scene.control.Control pControl)
      Returns:
      Weak reference that mustn't be garbage collected.
    • adjustScroll

      public static Object adjustScroll(javafx.beans.property.ReadOnlyProperty<javafx.scene.control.ScrollBar> pScrollBar)
      Returns:
      Weak reference that mustn't be garbage collected.
    • normalizeValue

      public static double normalizeValue(javafx.scene.control.ScrollBar pScrollBar)
    • normalizeValue

      public static double normalizeValue(double pMin, double pMax, double pVal)
      Translates the corresponding value in a [0,1] interval.
    • translateNormalizedValue

      public static double translateNormalizedValue(double pVal, double pNewMin, double pNewMax)
    • translateValue

      public static double translateValue(double pMin, double pMax, double pVal, double pNewMin, double pNewMax)
    • setScrollBarValue

      public static void setScrollBarValue(javafx.scene.control.ScrollBar pScrollBar, double pNormalizedVal)
    • setScrollBarValue

      public static void setScrollBarValue(javafx.scene.control.ScrollBar pScrollBar, double pMin, double pMax, double pVal)
    • getNormalizedValue

      public static double getNormalizedValue(javafx.scene.control.ScrollBar pScrollBar)
    • getNormalizedHScrollValue

      public static double getNormalizedHScrollValue(javafx.scene.control.Control pControl)
      Gets the value of the horizontal scroll bar of the specified control and returns a normalized value - in a [0,1] interval. If unable to find horizontal scroll bar, -1 is returned.
    • setNormalizedHScrollValue

      public static void setNormalizedHScrollValue(javafx.scene.control.Control pControl, double pNormalizedValue)
      Sets the value of the horizontal scroll bar of the specified control using the specified normalized value (in a [0,1] interval). Nothing is done if unable to find horizontal scroll bar.