Class DoubleInputText


  • public class DoubleInputText
    extends java.lang.Object
    A SWT text which only allow double input. It also has the possibility for range check.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String previousText  
      private Range range  
      private org.eclipse.swt.widgets.Text text  
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleInputText​(org.eclipse.swt.widgets.Composite parent, int style)  
      DoubleInputText​(org.eclipse.swt.widgets.Composite parent, int style, double max, double min)  
    • Field Detail

      • text

        private org.eclipse.swt.widgets.Text text
      • previousText

        private java.lang.String previousText
      • range

        private Range range
    • Constructor Detail

      • DoubleInputText

        public DoubleInputText​(org.eclipse.swt.widgets.Composite parent,
                               int style)
      • DoubleInputText

        public DoubleInputText​(org.eclipse.swt.widgets.Composite parent,
                               int style,
                               double max,
                               double min)
    • Method Detail

      • getRange

        public Range getRange()
        Returns:
        the range
      • setRange

        public void setRange​(Range range)
        Parameters:
        range - the range to set. null for no range check.
      • getText

        public org.eclipse.swt.widgets.Text getText()
        Returns:
        the text
      • getDoubleValue

        public double getDoubleValue()