Class Spinners


  • public final class Spinners
    extends java.lang.Object
    Utility methods to set up spinners in a safe way.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.lang.Number>
      void
      makeEditableSafely​(javafx.scene.control.Spinner<T> spinner, java.text.NumberFormat format, T defaultValue)
      Makes the spinner editable.
      • Methods inherited from class java.lang.Object

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

      • makeEditableSafely

        public static <T extends java.lang.Number> void makeEditableSafely​(javafx.scene.control.Spinner<T> spinner,
                                                                           java.text.NumberFormat format,
                                                                           T defaultValue)
        Makes the spinner editable. Ensures that the values will be committed when focus is lost.
        Type Parameters:
        T - The number type of the spinner
        Parameters:
        defaultValue - The value to use if nothing is entered