/Users/lyon/j4p/src/gui/run/ObservableFloat.java

1     
2    package gui.run; 
3     
4    import java.util.*; 
5     
6    public class ObservableFloat extends Observable { 
7     
8        private float value = 0; 
9     
10       public synchronized void setValue(float newValue) { 
11           if (newValue != value) { 
12               value = newValue; 
13               super.setChanged(); 
14               super.notifyObservers(this); 
15           } 
16       } 
17    
18       public synchronized float getValue() { 
19           return value; 
20       } 
21   }