Package jmri.util.swing
Class JSpinnerUtil
java.lang.Object
jmri.util.swing.JSpinnerUtil
Utility class providing common methods for working with
JSpinner
components in Swing.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetCommitsOnValidEdit(JSpinner spinner, boolean newVal) Sets whether theJSpinner's text editor commits the value to the spinner model.
-
Method Details
-
setCommitsOnValidEdit
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 )
-