/[svn]/jsampler/trunk/src/org/jsampler/view/JSViewConfig.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/JSViewConfig.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1539 by iliev, Fri Aug 10 19:55:03 2007 UTC revision 1540 by iliev, Mon Dec 3 23:22:02 2007 UTC
# Line 22  Line 22 
22    
23  package org.jsampler.view;  package org.jsampler.view;
24    
25    import java.beans.PropertyChangeEvent;
26    import java.beans.PropertyChangeListener;
27    
28  import org.jsampler.JSPrefs;  import org.jsampler.JSPrefs;
29    
30    import static org.jsampler.JSPrefs.VOL_MEASUREMENT_UNIT_DECIBEL;
31    
32  /**  /**
33   * Provides the view configuration.   * Provides the view configuration.
34   * @author Grigor Iliev   * @author Grigor Iliev
35   */   */
36  public abstract class JSViewConfig {  public abstract class JSViewConfig {
37            private boolean measurementUnitDecibel;
38                    
39          /** Creates a new instance of <code>JSViewConfig</code> */          /** Creates a new instance of <code>JSViewConfig</code> */
40          public          public
41          JSViewConfig() {          JSViewConfig() {
42                    measurementUnitDecibel = preferences().getBoolProperty(VOL_MEASUREMENT_UNIT_DECIBEL);
43                                    
44                    String s = VOL_MEASUREMENT_UNIT_DECIBEL;
45                    preferences().addPropertyChangeListener(s, new PropertyChangeListener() {
46                            public void
47                            propertyChange(PropertyChangeEvent e) {
48                                    boolean b;
49                                    b = preferences().getBoolProperty(VOL_MEASUREMENT_UNIT_DECIBEL);
50                                    measurementUnitDecibel = b;
51                            }
52                    });
53          }          }
54                    
55          /**          /**
# Line 54  public abstract class JSViewConfig { Line 70  public abstract class JSViewConfig {
70           */           */
71          public boolean          public boolean
72          getInstrumentsDbSupport() { return false; }          getInstrumentsDbSupport() { return false; }
73            
74            /**
75             * Determines whether the volume values should be shown in decibels.
76             */
77            public boolean
78            isMeasurementUnitDecibel() { return measurementUnitDecibel; }
79  }  }

Legend:
Removed from v.1539  
changed lines
  Added in v.1540

  ViewVC Help
Powered by ViewVC