Package jmri.util.swing
Class JSpinnerUtil
- java.lang.Object
-
- jmri.util.swing.JSpinnerUtil
-
public class JSpinnerUtil extends java.lang.Object
Utility class providing common methods for working withJSpinner
components in Swing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
setCommitsOnValidEdit(javax.swing.JSpinner spinner, boolean newVal)
Sets whether theJSpinner
's text editor commits the value to the spinner model.
-
-
-
Method Detail
-
setCommitsOnValidEdit
public static void setCommitsOnValidEdit(javax.swing.JSpinner spinner, boolean newVal)
Sets whether theJSpinner
's text editor commits the value to the spinner model.By default, JSpinners only update their value when enter is pressed or focus leaves the JFormattedTextField.
- Parameters:
spinner
- the JSpinner to modify.newVal
- true to commit on valid edits, else false ( default JSpinner )
-
-