Class ConverterRangeModel

  • All Implemented Interfaces:
    javax.swing.BoundedRangeModel

    public class ConverterRangeModel
    extends java.lang.Object
    implements javax.swing.BoundedRangeModel
    Based on the source code for DefaultBoundedRangeModel, this class stores its value as a double, rather than an int. The minimum value and extent are always 0.
    Since:
    Ptolemy II 1.0
    Version:
    $Id$
    Author:
    Brian Vogel
    Pt.AcceptedRating:
    Red (vogel)
    Pt.ProposedRating:
    Red (vogel)
    • Field Detail

      • changeEvent

        protected javax.swing.event.ChangeEvent changeEvent
      • listenerList

        protected javax.swing.event.EventListenerList listenerList
      • maximum

        protected int maximum
      • minimum

        protected int minimum
      • extent

        protected int extent
      • value

        protected double value
      • multiplier

        protected double multiplier
      • isAdjusting

        protected boolean isAdjusting
    • Constructor Detail

      • ConverterRangeModel

        public ConverterRangeModel()
    • Method Detail

      • getMultiplier

        public double getMultiplier()
      • setMultiplier

        public void setMultiplier​(double multiplier)
      • getMaximum

        public int getMaximum()
        Specified by:
        getMaximum in interface javax.swing.BoundedRangeModel
      • setMaximum

        public void setMaximum​(int newMaximum)
        Specified by:
        setMaximum in interface javax.swing.BoundedRangeModel
      • getMinimum

        public int getMinimum()
        Specified by:
        getMinimum in interface javax.swing.BoundedRangeModel
      • setMinimum

        public void setMinimum​(int newMinimum)
        Specified by:
        setMinimum in interface javax.swing.BoundedRangeModel
      • getValue

        public int getValue()
        Specified by:
        getValue in interface javax.swing.BoundedRangeModel
      • setValue

        public void setValue​(int newValue)
        Specified by:
        setValue in interface javax.swing.BoundedRangeModel
      • getDoubleValue

        public double getDoubleValue()
      • setDoubleValue

        public void setDoubleValue​(double newValue)
      • getExtent

        public int getExtent()
        Specified by:
        getExtent in interface javax.swing.BoundedRangeModel
      • setExtent

        public void setExtent​(int newExtent)
        Specified by:
        setExtent in interface javax.swing.BoundedRangeModel
      • getValueIsAdjusting

        public boolean getValueIsAdjusting()
        Specified by:
        getValueIsAdjusting in interface javax.swing.BoundedRangeModel
      • setValueIsAdjusting

        public void setValueIsAdjusting​(boolean b)
        Specified by:
        setValueIsAdjusting in interface javax.swing.BoundedRangeModel
      • setRangeProperties

        public void setRangeProperties​(int newValue,
                                       int newExtent,
                                       int newMin,
                                       int newMax,
                                       boolean newAdjusting)
        Specified by:
        setRangeProperties in interface javax.swing.BoundedRangeModel
      • setRangeProperties

        public void setRangeProperties​(double newValue,
                                       int unusedExtent,
                                       int unusedMin,
                                       int newMax,
                                       boolean newAdjusting)
      • addChangeListener

        public void addChangeListener​(javax.swing.event.ChangeListener l)
        Specified by:
        addChangeListener in interface javax.swing.BoundedRangeModel
      • removeChangeListener

        public void removeChangeListener​(javax.swing.event.ChangeListener l)
        Specified by:
        removeChangeListener in interface javax.swing.BoundedRangeModel
      • fireStateChanged

        protected void fireStateChanged()