Search in sources :

Example 26 with NumberFormatter

use of javax.swing.text.NumberFormatter in project mzmine2 by mzmine.

the class RangeComponent method setNumberFormat.

public void setNumberFormat(NumberFormat format) {
    DefaultFormatterFactory fac = new DefaultFormatterFactory(new NumberFormatter(format));
    minTxtField.setFormatterFactory(fac);
    maxTxtField.setFormatterFactory(fac);
}
Also used : DefaultFormatterFactory(javax.swing.text.DefaultFormatterFactory) NumberFormatter(javax.swing.text.NumberFormatter)

Aggregations

NumberFormatter (javax.swing.text.NumberFormatter)26 JFormattedTextField (javax.swing.JFormattedTextField)10 NumberFormat (java.text.NumberFormat)9 DefaultFormatterFactory (javax.swing.text.DefaultFormatterFactory)9 DecimalFormat (java.text.DecimalFormat)8 JLabel (javax.swing.JLabel)4 ParseException (java.text.ParseException)3 JButton (javax.swing.JButton)3 ActionEvent (java.awt.event.ActionEvent)2 ActionListener (java.awt.event.ActionListener)2 PropertyChangeEvent (java.beans.PropertyChangeEvent)2 PropertyChangeListener (java.beans.PropertyChangeListener)2 JPanel (javax.swing.JPanel)2 Border (javax.swing.border.Border)2 ExtrapolationMethod (cbit.vcell.solvers.mb.MovingBoundarySolverOptions.ExtrapolationMethod)1 RedistributionMode (cbit.vcell.solvers.mb.MovingBoundarySolverOptions.RedistributionMode)1 RedistributionVersion (cbit.vcell.solvers.mb.MovingBoundarySolverOptions.RedistributionVersion)1 ComboBox (com.intellij.openapi.ui.ComboBox)1 ColoredListCellRenderer (com.intellij.ui.ColoredListCellRenderer)1 DocumentAdapter (com.intellij.ui.DocumentAdapter)1