Class StartEndRangeWidget

All Implemented Interfaces:
Drawable

public class StartEndRangeWidget extends Canvas
A widget with which allows you to select a range from a predefine range of values.
  • Constructor Details

    • StartEndRangeWidget

      public StartEndRangeWidget(Composite parent, int style)
      Create a the StartEndRangeWidget widget.
  • Method Details

    • addRangeListener

      public void addRangeListener(RangeListener listener)
      Adds a listener, notified if the range or the selected range changes.
    • removeRangeListener

      public void removeRangeListener(RangeListener listener)
    • getMin

      public double getMin()
      Get the current minimum value of the range.
      Returns:
    • setMin

      @Deprecated public void setMin(double min)
      Deprecated.
    • getMax

      public double getMax()
      Get the current maximum value of the range.
      Returns:
    • setMax

      @Deprecated public void setMax(double max)
      Deprecated.
    • isRangeSet

      public boolean isRangeSet()
      Returns if the widget has a valid range set.
      Returns:
    • resetRange

      public void resetRange()
      Reset the widget.
    • getSelectedMin

      public double getSelectedMin()
      get the minimum value of the selected range.
      Returns:
    • setSelectedMin

      public void setSelectedMin(double selectedMin)
      set the minimum value of the selected range.
      Parameters:
      selectedMin -
    • getSelectedMax

      public double getSelectedMax()
      Get the maximum value of the selected range.
      Returns:
    • setSelectedMax

      public void setSelectedMax(double selectedMax)
      Set the maximum value of the selected range.
      Parameters:
      selectedMax -
    • setSelectedRange

      public void setSelectedRange(double selectedMin, double selectedMax)
      Set the selected range for the widget.
      Parameters:
      selectedMin -
      selectedMax -
    • setRange

      public void setRange(double min, double max)
      Set the new min and max for the widget. The widget will resize while also attempting to retain the previous selected range if possible.
      Parameters:
      min -
      max -
    • setRanges

      public void setRanges(double min, double max, double selectedMin, double selectedMax)
      Set both the range and the selected range of the widget.
      Parameters:
      min -
      max -
      selectedMin -
      selectedMax -
    • setOrientation

      public void setOrientation(StartEndRangeWidget.ORIENTATION orientation)
      Set the orientation of the widget (either horizontal or vertical) StartEndRangeWidget.ORIENTATION.
      Parameters:
      orientation -
    • getRange

      public double getRange()
      Get the size of the current range.
      Returns:
    • getSelectedRange

      public double getSelectedRange()
      Get the size of the selected range
      Returns: