/[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 2287 by iliev, Tue Jun 28 22:44:39 2011 UTC revision 2288 by iliev, Wed Nov 23 21:19:44 2011 UTC
# Line 22  Line 22 
22    
23  package org.jsampler.view;  package org.jsampler.view;
24    
 import javax.swing.JPopupMenu;  
 import java.awt.event.KeyEvent;  
   
25  import java.beans.PropertyChangeEvent;  import java.beans.PropertyChangeEvent;
26  import java.beans.PropertyChangeListener;  import java.beans.PropertyChangeListener;
27    
# Line 38  import static org.jsampler.JSPrefs.*; Line 35  import static org.jsampler.JSPrefs.*;
35   * Provides the view configuration.   * Provides the view configuration.
36   * @author Grigor Iliev   * @author Grigor Iliev
37   */   */
38  public abstract class JSViewConfig {  public abstract class JSViewConfig<I> {
39          private boolean measurementUnitDecibel;          private boolean measurementUnitDecibel;
40                    
41          private int firstMidiBankNumber;          private int firstMidiBankNumber;
# Line 85  public abstract class JSViewConfig { Line 82  public abstract class JSViewConfig {
82          /**          /**
83           * Provides UI information for instruments database trees.           * Provides UI information for instruments database trees.
84           */           */
85          public abstract InstrumentsDbTreeView getInstrumentsDbTreeView();          public abstract InstrumentsDbTreeView<I> getInstrumentsDbTreeView();
86                    
87          /**          /**
88           * Provides UI information for instruments database tables.           * Provides UI information for instruments database tables.
89           */           */
90          public abstract InstrumentsDbTableView getInstrumentsDbTableView();          public abstract InstrumentsDbTableView<I> getInstrumentsDbTableView();
91                    
92          public abstract SamplerBrowserView getSamplerBrowserView();          public abstract SamplerBrowserView<I> getSamplerBrowserView();
93                    
94          public abstract BasicIconSet getBasicIconSet();          public abstract BasicIconSet<I> getBasicIconSet();
95                    
96          public abstract JSPrefs preferences();          public abstract JSPrefs preferences();
97                    
# Line 105  public abstract class JSViewConfig { Line 102  public abstract class JSViewConfig {
102          public boolean          public boolean
103          getInstrumentsDbSupport() { return false; }          getInstrumentsDbSupport() { return false; }
104                    
105            public abstract void initInstrumentsDbTreeModel();
106            public abstract void resetInstrumentsDbTreeModel();
107            
108          /**          /**
109           * Determines whether the volume values should be shown in decibels.           * Determines whether the volume values should be shown in decibels.
110           */           */
# Line 129  public abstract class JSViewConfig { Line 129  public abstract class JSViewConfig {
129          public int          public int
130          getFirstMidiProgramNumber() { return firstMidiProgramNumber; }          getFirstMidiProgramNumber() { return firstMidiProgramNumber; }
131    
132          public int          public abstract int getDefaultModKey();
         getDefaultModKey() {  
                 return CC.isMacOS() ? KeyEvent.META_MASK : KeyEvent.CTRL_MASK;  
         }  
133    
134          /**          /**
135           * Determines whether main menu is moved to           * Determines whether main menu is moved to
# Line 144  public abstract class JSViewConfig { Line 141  public abstract class JSViewConfig {
141                  String s = System.getProperty("apple.laf.useScreenMenuBar");                  String s = System.getProperty("apple.laf.useScreenMenuBar");
142                  return (s != null && "true".equalsIgnoreCase(s)) ? true : false;                  return (s != null && "true".equalsIgnoreCase(s)) ? true : false;
143          }          }
144            
145          /**  Constructs a new multicolumn menu with the supplied string as its text. */          /**
146          public javax.swing.JMenu           * Shows a dialog with the specified error message.
147          createMultiColumnMenu(String s) { return new net.sf.juife.MultiColumnMenu(s); }           * @param msg The error message to be shown.
148             */
149          /**  Constructs a new multicolumn popup menu. */          public abstract void showErrorMessage(String msg);
150          public JPopupMenu          
151          createMultiColumnPopupMenu()          /**
152          { return new net.sf.juife.MultiColumnMenu.PopupMenu(); }           * Shows a dialog with error message.
153             * @param e The <code>Exception</code> from which the error message is obtained.
154             */
155            public abstract void showErrorMessage(Exception e);
156            
157            /**
158             * Shows a dialog with error message.
159             * @param e The <code>Exception</code> from which the error message is obtained.
160             * @param prefix The prefix to be added to the error message.
161             */
162            public abstract void showErrorMessage(Exception e, String prefix);
163            
164            /**
165             * Sets the default font to be used in the GUI.
166             * @param fontName The name of the font to be used as default.
167             */
168            public abstract void setUIDefaultFont(String fontName);
169  }  }

Legend:
Removed from v.2287  
changed lines
  Added in v.2288

  ViewVC Help
Powered by ViewVC