Package org.pepsoft.util.swing
Class SpinnerUtils
java.lang.Object
org.pepsoft.util.swing.SpinnerUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetMaximum(JSpinner spinner, Comparable<?> newMaximum) Set the maximum of aJSpinnerwith a number spinner model to a new value, adjusting the current value first if necessary.static voidsetMaximum(SpinnerNumberModel model, Comparable<?> newMaximum) Set the maximum of a number spinner model to a new value, adjusting the current value first if necessary.static voidsetMinimum(JSpinner spinner, Comparable<?> newMinimum) Set the minimum of aJSpinnerwith a number spinner model to a new value, adjusting the current value first if necessary.static voidsetMinimum(SpinnerNumberModel model, Comparable<?> newMinimum) Set the minimum of a number spinner model to a new value, adjusting the current value first if necessary.
-
Method Details
-
setMinimum
Set the minimum of aJSpinnerwith a number spinner model to a new value, adjusting the current value first if necessary.- Parameters:
spinner- The spinner of which to set the minimum. Must have aSpinnerNumberModel.newMinimum- The value to set the minimum to. Must be aNumber.
-
setMinimum
Set the minimum of a number spinner model to a new value, adjusting the current value first if necessary.- Parameters:
model- The model of which to set the minimum.newMinimum- The value to set the minimum to. Must be aNumber.
-
setMaximum
Set the maximum of aJSpinnerwith a number spinner model to a new value, adjusting the current value first if necessary.- Parameters:
spinner- The spinner of which to set the maximum. Must have aSpinnerNumberModel.newMaximum- The value to set the maximum to. Must be aNumber.
-
setMaximum
Set the maximum of a number spinner model to a new value, adjusting the current value first if necessary.- Parameters:
model- The model of which to set the maximum.newMaximum- The value to set the maximum to. Must be aNumber.
-