Module jEdit

Class NumericTextField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ComboBoxEditor, Scrollable, SwingConstants

public class NumericTextField extends JTextField implements ComboBoxEditor
A TextField that accepts only numeric values. The numeric values may be either integer or float values.
Since:
jEdit 4.3pre15
Version:
$Id: KeyEventWorkaround.java 12889 2008-06-23 20:14:00Z kpouer $
Author:
Matthieu Casanova
See Also:
  • Constructor Details

    • NumericTextField

      public NumericTextField(String text)
    • NumericTextField

      public NumericTextField(String text, boolean positiveOnly)
    • NumericTextField

      public NumericTextField(String text, boolean positiveOnly, boolean integerOnly)
    • NumericTextField

      public NumericTextField(String text, int columns, boolean positiveOnly)
    • NumericTextField

      public NumericTextField(String text, int columns, boolean positiveOnly, boolean integerOnly)
  • Method Details

    • setMinValue

      public void setMinValue(Number n)
    • setMaxValue

      public void setMaxValue(Number n)
    • getValue

      public Number getValue()
      Returns:
      The value of the text field as either an Integer or a Float, depending on whether this text field allows Integers or Floats.
    • getEditorComponent

      public Component getEditorComponent()
      Specified by:
      getEditorComponent in interface ComboBoxEditor
    • getItem

      public Object getItem()
      Specified by:
      getItem in interface ComboBoxEditor
    • setItem

      public void setItem(Object item)
      Specified by:
      setItem in interface ComboBoxEditor