Class TextScrollDouble

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TextScrollDouble extends JPanel
This is a class for creating a scroll bar and text box combination which operates with doubles. *
See Also:
  • Constructor Details

    • TextScrollDouble

      public TextScrollDouble()
      An instance the class. Default values used are: orient (relative layout of text and scroll) = 0 (horizontal); tdigits (total number of digits in the text field) = 6; fdigits (digits after the decimal) = 3; dval (initial value in the text box) = 0.0; min (minimum of the range) = 0.0; max (maximum of the range) = 10.0; cincrement (current increment) = 0.01; minincrement (minimum allowable increment) = 0.001;
    • TextScrollDouble

      public TextScrollDouble(int orient, double min, double max, double cincrement)
      An instance the class. Default values used are: tdigits (total number of digits in the text field) = 6; fdigits (digits after the decimal) = 3; dval (initial value in the text box) = 0.0; minincrement (minimum allowable increment) = 0.001;
    • TextScrollDouble

      public TextScrollDouble(int orient, double dval, double min, double max, double cincrement, double mincrement)
      An instance the class. Default values used are: tdigits (total number of digits in the text field) = 6; fdigits (digits after the decimal) = 3;
    • TextScrollDouble

      public TextScrollDouble(int orient, int tdigits, int fdigits, double dval, double min, double max, double cincrement, double mincrement)
      An instance of the class. All values defined by user.
      Parameters:
      orient - the relative layout of the text box and scroll panel (0 is horizontal, 1 is vertical)
      tdigits - the total number of digits in the text field
      fdigits - the number of digits after the decimal
      dval - the initial value in the text box
      min - the minimum of the range
      max - the maximum of the range
      cincrement - the current increment
      mincrement - the minimum allowable increment
  • Method Details

    • setValue

      public void setValue(double value)
      Set the value in the text field
    • setRange

      public void setRange(double minimum, double maximum)
      Set the minimum value of the range
    • setMaximum

      public void setMaximum(double value)
      Set the maximum value of the range
    • setIncrement

      public void setIncrement(double dincrement)
      Set the increment of the scroll bar. Can not be less than the minimum increment.
    • setPreferredSize

      public void setPreferredSize(int width, int heigth)
      Set the size of the scroll bar.
    • getValue

      public double getValue()
      Get the value in the text field.
    • getMinimum

      public double getMinimum()
      Get the minimum value of the range
    • getMaximum

      public double getMaximum()
      Get the maximum value of the range
    • getIncrement

      public int getIncrement()
      Get the current increment
    • disableIt

      public void disableIt()
      Disable.
    • enableIt

      public void enableIt()
      Enable.