Package edu.wpi.grip.ui.util
Class Spinners
- java.lang.Object
-
- edu.wpi.grip.ui.util.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>
voidmakeEditableSafely(javafx.scene.control.Spinner<T> spinner, java.text.NumberFormat format, T defaultValue)
Makes the spinner editable.
-
-
-
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
-
-