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

Constructor Index

 o ObservableDbl()
Simplest constructor with a default value initialization.
 o ObservableDbl(double)
Initializes the class instance with a specified value for the observable double.

Method Index

 o getMaximum()
Get the maximum allowed value for the ObservableDbl.
 o getMinimum()
Get the minimum allowed value for the ObservableDbl.
 o getValue()
Get the current value of the observable.
 o setMaximum(double)
Set the maximum allowed value for the ObservableDbl.
 o setMinimum(double)
Set the minimum allowed value for the ObservableDbl.
 o setValue(double)
Call this method to change the value of the observable.

Constructors

 o ObservableDbl
  public ObservableDbl()
Simplest constructor with a default value initialization.
 o ObservableDbl
  public ObservableDbl(double new_value)
Initializes the class instance with a specified value for the observable double.
Parameters:
new_value - initial value

Methods

 o 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.
 o getValue
  public synchronized double getValue()
Get the current value of the observable.
 o setMaximum
  public synchronized void setMaximum(double m)
Set the maximum allowed value for the ObservableDbl.
Parameters:
m - maximum value
 o getMaximum
  public synchronized double getMaximum()
Get the maximum allowed value for the ObservableDbl.
 o setMinimum
  public synchronized void setMinimum(double m)
Set the minimum allowed value for the ObservableDbl.
Parameters:
m - minimum value
 o getMinimum
  public synchronized double getMinimum()
Get the minimum allowed value for the ObservableDbl.

All Packages  Class Hierarchy  This Package  Previous  Next  Index