org.jscience.swing.joggle
Interface JoggleModel

All Known Implementing Classes:
DefaultJoggleModel

public interface JoggleModel

A model representing a bounded or unbounded double value sequence. In relation to a Joggle this model keeps a value depending on the current rotationAngle of the joggle. To convert a model's value to a rotationAngle, a joggle calls getTransmissionRatio().


Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          DOCUMENT ME!
 double getMaximum()
          Return the upper limit of the represented value sequence.
 double getMinimum()
          Return the lower limit of the represented value sequence.
 double getTransmissionRatio()
          Return the ratio converting the rotationAngle of a Joggle to the value in this Model.
 double getValue()
          Returns the current value.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          DOCUMENT ME!
 void setMaximum(double newMax)
          Set the upper limit of the represented value sequence.
 void setMinimum(double newMin)
          Set the lower limit of the represented value sequence.
 void setValue(double value)
          Set a new value contained in the value sequence.
 

Method Detail

addChangeListener

void addChangeListener(javax.swing.event.ChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

removeChangeListener

void removeChangeListener(javax.swing.event.ChangeListener l)
DOCUMENT ME!

Parameters:
l - DOCUMENT ME!

setMaximum

void setMaximum(double newMax)
Set the upper limit of the represented value sequence.

Parameters:
newMax - a new upper limit.

getMaximum

double getMaximum()
Return the upper limit of the represented value sequence.

Returns:
the upper limit.

setMinimum

void setMinimum(double newMin)
Set the lower limit of the represented value sequence.

Parameters:
newMin - a new lower limit.

getMinimum

double getMinimum()
Return the lower limit of the represented value sequence.

Returns:
the lower limit.

setValue

void setValue(double value)
Set a new value contained in the value sequence.

Parameters:
value - the value to be set.

getValue

double getValue()
Returns the current value. If you are using this model with a joggle instance the returned value will be the result of the transmissionRatio multiplied with the current rotationAngle of the joggle.

value=rotationAngletransmissionRatio;

Returns:
DOCUMENT ME!
See Also:
getTransmissionRatio(), Joggle.getRotationAngle()

getTransmissionRatio

double getTransmissionRatio()
Return the ratio converting the rotationAngle of a Joggle to the value in this Model. Usually this Model's value should be the rotationAngle of the Joggle multiplied with the transmission ratio.

Returns:
DOCUMENT ME!