Class Slider

java.lang.Object
  |
  +--Slider

public class Slider
extends Object


Constructor Summary
Slider(String name, double min, double max, double startPoint)
           
 
Method Summary
 void adjustValue(double deltaX)
          This method changes the value of the slider by the integer value that is passed in.
 double getFraction()
          This method returns the percentage of the slider's potential positive or negative value.
 double getValue()
          This method returns the current value of the slider.
 void setValue(double newValue)
          This method sets the value of the slider to a specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slider

public Slider(String name,
              double min,
              double max,
              double startPoint)
Method Detail

getValue

public double getValue()
This method returns the current value of the slider.


getFraction

public double getFraction()
This method returns the percentage of the slider's potential positive or negative value. Since 'max' and 'min' are arbitrary numbers, (rather than set values such as 100). Thus, this method returns a weighted double based on the curent value divided by the potential value.


adjustValue

public void adjustValue(double deltaX)
This method changes the value of the slider by the integer value that is passed in.


setValue

public void setValue(double newValue)
This method sets the value of the slider to a specified value. valueCheck() checks to ensure that the new value is within min and max.