Class observable.ObservableDbl
All Packages Class Hierarchy This Package Previous Next Index
Class observable.ObservableDbl
java.lang.Object
|
+----java.util.Observable
|
+----observable.ObservableDbl
- public class ObservableDbl
- extends Observable
Observable mechanism for a double variable. Adapted from
Listing 21.14 of "Special Edition, Using Java". Added the
maximum and minimum features.
- Version:
- 1.0 02-24-97
- Author:
- Daren Stotler
- See Also:
- ObservableTest
-
ObservableDbl()
- Simplest constructor with a default value initialization.
-
ObservableDbl(double)
- Initializes the class instance with a specified value for
the observable double.
-
getMaximum()
- Get the maximum allowed value for the ObservableDbl.
-
getMinimum()
- Get the minimum allowed value for the ObservableDbl.
-
getValue()
- Get the current value of the observable.
-
setMaximum(double)
- Set the maximum allowed value for the ObservableDbl.
-
setMinimum(double)
- Set the minimum allowed value for the ObservableDbl.
-
setValue(double)
- Call this method to change the value of the observable.
ObservableDbl
public ObservableDbl()
- Simplest constructor with a default value initialization.
ObservableDbl
public ObservableDbl(double new_value)
- Initializes the class instance with a specified value for
the observable double.
- Parameters:
- new_value - initial value
setValue
public synchronized void setValue(double new_value)
- Call this method to change the value of the observable.
Observers will be notified of the change.
- Parameters:
- new_value - altered value for double.
getValue
public synchronized double getValue()
- Get the current value of the observable.
setMaximum
public synchronized void setMaximum(double m)
- Set the maximum allowed value for the ObservableDbl.
- Parameters:
- m - maximum value
getMaximum
public synchronized double getMaximum()
- Get the maximum allowed value for the ObservableDbl.
setMinimum
public synchronized void setMinimum(double m)
- Set the minimum allowed value for the ObservableDbl.
- Parameters:
- m - minimum value
getMinimum
public synchronized double getMinimum()
- Get the minimum allowed value for the ObservableDbl.
All Packages Class Hierarchy This Package Previous Next Index