Class ScientificField

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

public class ScientificField extends NumberField
This NumberField displays numbers in scientific format.
Version:
1.0
Author:
Douglas Brown
See Also:
  • Constructor Details

    • ScientificField

      public ScientificField(int columns)
      Constructs a ScientificField with default sigfigs (4).
      Parameters:
      columns - the number of character columns
    • ScientificField

      public ScientificField(int columns, int sigfigs)
      Constructs a ScientificField with specified sigfigs.
      Parameters:
      columns - the number of character columns
      sigfigs - the significant figures
  • Method Details

    • setValue

      public void setValue(double value)
      Overrides NumberField setValue method.
      Overrides:
      setValue in class NumberField
      Parameters:
      value - the value to be entered
    • setSigFigs

      public void setSigFigs(int sigfigs)
      Description copied from class: NumberField
      Sets the number of significant figures for this number field.
      Overrides:
      setSigFigs in class NumberField
      Parameters:
      sigfigs - the number of significant figures (between 2 and 6)
    • setExpectedRange

      public void setExpectedRange(double lower, double upper)
      Description copied from class: NumberField
      Sets the expected range of values for this number field. Note this does not set a firm max or min--only an expectation.
      Overrides:
      setExpectedRange in class NumberField
      Parameters:
      lower - the lower end of the range
      upper - the upper end of the range