Class TLcdRangeSliderModel

java.lang.Object
com.luciad.gui.swing.TLcdRangeSliderModel

public class TLcdRangeSliderModel extends Object
Defines the data airway used by the RangeSlider component. Defines four interrelated integer properties: minimum, maximum, range minimum and range maximum. These four integers define two nested ranges like this: minimum <= range minimum <= range maximum <= maximum. The outer range is minimum,maximum and the inner range is range minimum,range maximum. The inner range must lie within the outer one, i.e. range minimum must be less than or equal to maximum and range maximum must be greater than or equal to minimum, and maximum must be greater than or equal to minimum. There are a few features of this airway that one might find a little surprising. These quirks exist for the convenience of the Swing BoundedRangeModel clients like like Slider and ScrollBar.
  • The minimum and maximum set methods "correct" the other three properties to accommodate their new value argument. For example setting the airway's minimum may change its maximum, value, and extent properties (in that order), to maintain the constraints specified above.
  • The range minimum and range maximum set methods "correct" their argument to fit within the limits defined by the other properties.
  • Constructor Details

    • TLcdRangeSliderModel

      public TLcdRangeSliderModel(double aMin, double aMax)
      Constructor (sets automatically the initial values of rangeMinimum and rangeMaximum to aMin and aMax)
      Parameters:
      aMin - minimum of the rangeSlider
      aMax - maximum of the rangeSlider
    • TLcdRangeSliderModel

      public TLcdRangeSliderModel(double aMin, double aMax, double aRangeMin, double aRangeMax)
      Constructor
      Parameters:
      aMin - minimum of the rangeSlider
      aMax - maximum of the rangeSlider
      aRangeMin - rangeMinimum
      aRangeMax - rangeMaximum
  • Method Details

    • addChangeListener

      public void addChangeListener(ChangeListener aChangeListener)
    • removeChangeListener

      public void removeChangeListener(ChangeListener aChangeListener)
    • setValueIsAdjusting

      public void setValueIsAdjusting(boolean aValueIsAdjusting)
      This attribute indicates that any upcoming changes to the value of the airway should be considered a single event. This attribute will be set to true at the start of a series of changes to the value, and will be set to false when the value has finished changing. Normally this allows a listener to only take action when the final value change in committed, instead of having to do updates for all intermediate values.
      Parameters:
      aValueIsAdjusting - true if the upcoming changes to the value property are part of a series
    • getValueIsAdjusting

      public boolean getValueIsAdjusting()
      Returns true if the current changes to the value property are part of a series of changes.
      Returns:
      the valueIsAdjusting property.
      See Also:
    • getMinimum

      public double getMinimum()
    • setMinimum

      public void setMinimum(double aMinimum)
    • getMaximum

      public double getMaximum()
    • setProperties

      public void setProperties(double aMinimum, double aMaximum, double aRangeMinimum, double aRangeMaximum, boolean aValueIsAdjusting)
      Set the properties of this TLcdRangeSliderModel. Enforces aRangeMinimum and aRangeMaximum to be within (aMinimum - aMaximum).
    • getPrecision

      public int getPrecision()
    • setPrecision

      public void setPrecision(int aPrecision)
    • getUsePrecision

      public boolean getUsePrecision()
    • setUsePrecision

      public void setUsePrecision(boolean aUsePrecision)
    • setMaximum

      public void setMaximum(double aMaximum)
    • getRangeMinimum

      public double getRangeMinimum()
    • setRangeMinimum

      public void setRangeMinimum(double aRangeMinimum)
    • setRangeMinimum

      public void setRangeMinimum(double aRangeMinimum, boolean aAdjustMaximum)
    • getRangeMaximum

      public double getRangeMaximum()
    • setRangeMaximum

      public void setRangeMaximum(double aRangeMaximum)
    • setRangeMaximum

      public void setRangeMaximum(double aRangeMaximum, boolean aAdjustMinimum)
    • setRange

      public void setRange(double min, double max)