|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.swing.joggle.DefaultJoggleModel
public class DefaultJoggleModel
A default implementation of the JoggleModel interface.
| Constructor Summary | |
|---|---|
DefaultJoggleModel()
Creates a new DefaultJoggleModel with an initial value of
0.0, a transmissionRatio of 1.0 and no maximum and no minimum. |
|
DefaultJoggleModel(double value)
Creates a new DefaultJoggleModel with a transmissionRatio
of 1.0 and no maximum and no minimum. |
|
DefaultJoggleModel(double value,
double transmissionRatio)
Creates a new DefaultJoggleModel with the specified value and transmission ratio and no maximum and no minimum. |
|
DefaultJoggleModel(double value,
double transmissionRatio,
double min,
double max)
Creates a new DefaultJoggleModel with the specified value, transmission ratio, minimum and maximum. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
DOCUMENT ME! |
protected void |
fireStateChanged()
DOCUMENT ME! |
double |
getMaximum()
DOCUMENT ME! |
double |
getMinimum()
DOCUMENT ME! |
double |
getTransmissionRatio()
Return the ratio the rotationAngle of a Joggle must be multiplied with to get the
value in this model. |
double |
getValue()
Returns the current value held in this model. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
DOCUMENT ME! |
void |
setMaximum(double newMax)
Sets the maximum to newMax and fits the minimum respectively the value to newMax if they are larger than newMax. |
void |
setMinimum(double newMin)
Sets the minimum to newMin and fits the maximum respectively the value to newMin if they are less than newMin. |
void |
setTransmissionRatio(double newRatio)
Sets the ratio the rotationAngle of a Joggle must be multiplied with to get the
value in this model. |
void |
setValue(double newVal)
Sets value to newVal but only if newVal is between the current minimum and maximum. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultJoggleModel()
DefaultJoggleModel with an initial value of
0.0, a transmissionRatio of 1.0 and no maximum and no minimum.
public DefaultJoggleModel(double value)
DefaultJoggleModel with a transmissionRatio
of 1.0 and no maximum and no minimum.
value - the initial value for this model
public DefaultJoggleModel(double value,
double transmissionRatio)
value - the initial value for this modeltransmissionRatio - factor between the physical rotationAngle of a Joggle and
the value in this model.
public DefaultJoggleModel(double value,
double transmissionRatio,
double min,
double max)
value - the initial value for this modeltransmissionRatio - factor between the physical rotationAngle of a Joggle and
the value in this model.min - a lower limit this model's value is not able to exceed; use
Double.NEGATIVE_INFINITY for no limitationmax - an upper limit this model's value is not able to exceed; use
Double.POSITIVE_INFINITY for no limitation| Method Detail |
|---|
public void setMaximum(double newMax)
setMaximum in interface JoggleModelnewMax - DOCUMENT ME!public double getMaximum()
getMaximum in interface JoggleModelpublic void setMinimum(double newMin)
setMinimum in interface JoggleModelnewMin - DOCUMENT ME!public double getMinimum()
getMinimum in interface JoggleModelpublic void setValue(double newVal)
setValue in interface JoggleModelnewVal - DOCUMENT ME!public double getValue()
rotationAngle of a
Joggle. To get the rotationAngle of a Joggle you have to divide this
value by the transmissionRatio.
getValue in interface JoggleModelgetTransmissionRatio()public double getTransmissionRatio()
rotationAngle of a Joggle must be multiplied with to get the
value in this model.
getTransmissionRatio in interface JoggleModelrotationAngle of
a Joggle must be multiplied with to get the value in
this model.public void setTransmissionRatio(double newRatio)
rotationAngle of a Joggle must be multiplied with to get the
value in this model.
newRatio - factor between the physical rotationAngle of a Joggle and
the value in this model.public void addChangeListener(javax.swing.event.ChangeListener l)
addChangeListener in interface JoggleModell - DOCUMENT ME!public void removeChangeListener(javax.swing.event.ChangeListener l)
removeChangeListener in interface JoggleModell - DOCUMENT ME!protected void fireStateChanged()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||