Class DecimalField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants
Direct Known Subclasses:
TTrack.TrackDecimalField

public class DecimalField extends NumberField
This is a NumberField that displays numbers in decimal format with a fixed number of decimal places.
Version:
1.0
Author:
Douglas Brown
See Also:
  • Field Details

    • defaultPattern

      protected String defaultPattern
  • Constructor Details

    • DecimalField

      public DecimalField(int columns, int places)
      Constructs a DecimalField.
      Parameters:
      columns - the number of character columns
      places - the number of decimal places to display
  • Method Details

    • setDecimalPlaces

      public void setDecimalPlaces(int places)
      Sets the number of decimal places.
      Parameters:
      places - the number of decimal places to display
    • 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
    • setFixedPattern

      public void setFixedPattern(String pattern)
      Description copied from class: NumberField
      Sets a fixed user pattern.
      Overrides:
      setFixedPattern in class NumberField
      Parameters:
      pattern - the desired pattern (may be null)