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

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

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

revision 911 by iliev, Mon Aug 7 18:25:58 2006 UTC revision 1204 by iliev, Thu May 24 21:43:45 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005 Grigor Kirilov Iliev   *   Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 22  Line 22 
22    
23  package org.jsampler.view;  package org.jsampler.view;
24    
25    import java.awt.Dialog;
26  import java.awt.Dimension;  import java.awt.Dimension;
27    import java.awt.Frame;
28    
29  import java.awt.event.WindowAdapter;  import java.awt.event.WindowAdapter;
30  import java.awt.event.WindowEvent;  import java.awt.event.WindowEvent;
# Line 39  import org.jsampler.Prefs; Line 41  import org.jsampler.Prefs;
41  import org.jsampler.event.SamplerChannelListEvent;  import org.jsampler.event.SamplerChannelListEvent;
42  import org.jsampler.event.SamplerChannelListListener;  import org.jsampler.event.SamplerChannelListListener;
43    
44    
45  /**  /**
46   * Defines the skeleton of a JSampler's main frame.   * Defines the skeleton of a JSampler's main frame.
47   * @author Grigor Iliev   * @author Grigor Iliev
# Line 71  public abstract class JSMainFrame extend Line 74  public abstract class JSMainFrame extend
74          }          }
75                    
76          /**          /**
77             * Invoked on startup when no JSampler home directory is specified
78             * or the specified JSampler home directory doesn't exist.
79             * This method should ask the user to specify a JSampler
80             * home directory and then set the specified JSampler home directory using
81             * {@link org.jsampler.CC#setJSamplerHome} method.
82             * @see org.jsampler.CC#getJSamplerHome
83             * @see org.jsampler.CC#setJSamplerHome
84             */
85            public abstract void installJSamplerHome();
86            
87            /**
88             * Shows a detailed error information about the specified exception.
89             */
90            public abstract void showDetailedErrorMessage(Frame owner, String err, String details);
91            
92            /**
93             * Shows a detailed error information about the specified exception.
94             */
95            public abstract void showDetailedErrorMessage(Dialog owner, String err, String details);
96            
97            /**
98           * Returns a list containing all <code>JSChannelsPane</code>s added to the view.           * Returns a list containing all <code>JSChannelsPane</code>s added to the view.
99           * @return A list containing all <code>JSChannelsPane</code>s added to the view.           * @return A list containing all <code>JSChannelsPane</code>s added to the view.
100           * @see #addChannelsPane           * @see #addChannelsPane
# Line 147  public abstract class JSMainFrame extend Line 171  public abstract class JSMainFrame extend
171                   */                   */
172                  public void                  public void
173                  channelAdded(SamplerChannelListEvent e) {                  channelAdded(SamplerChannelListEvent e) {
174                          Integer id = e.getChannelModel().getChannelID();                          Integer id = e.getChannelModel().getChannelId();
175                          if(findChannel(id) != null) {                          if(findChannel(id) != null) {
176                                  CC.getLogger().log(Level.WARNING, "JSMainFrame.channelExist!", id);                                  CC.getLogger().log(Level.WARNING, "JSMainFrame.channelExist!", id);
177                                  return;                                  return;
# Line 163  public abstract class JSMainFrame extend Line 187  public abstract class JSMainFrame extend
187                   */                   */
188                  public void                  public void
189                  channelRemoved(SamplerChannelListEvent e) {                  channelRemoved(SamplerChannelListEvent e) {
190                          removeChannel(e.getChannelModel().getChannelID());                          removeChannel(e.getChannelModel().getChannelId());
191                  }                  }
192          }          }
193                    
# Line 177  public abstract class JSMainFrame extend Line 201  public abstract class JSMainFrame extend
201                  if(id < 0) return null;                  if(id < 0) return null;
202                                    
203                  for(JSChannelsPane cp : getChannelsPaneList()) {                  for(JSChannelsPane cp : getChannelsPaneList()) {
204                          for(JSChannel c : cp.getChannels()) if(c.getChannelID() == id) return c;                          for(JSChannel c : cp.getChannels()) if(c.getChannelId() == id) return c;
205                  }                  }
206                                    
207                  return null;                  return null;
# Line 195  public abstract class JSMainFrame extend Line 219  public abstract class JSMainFrame extend
219                                    
220                  for(JSChannelsPane cp : getChannelsPaneList()) {                  for(JSChannelsPane cp : getChannelsPaneList()) {
221                          for(JSChannel c : cp.getChannels()) {                          for(JSChannel c : cp.getChannels()) {
222                                  if(c.getChannelID() == id) {                                  if(c.getChannelId() == id) {
223                                          cp.removeChannel(c);                                          cp.removeChannel(c);
224                                          return c;                                          return c;
225                                  }                                  }
# Line 204  public abstract class JSMainFrame extend Line 228  public abstract class JSMainFrame extend
228                                    
229                  return null;                  return null;
230          }          }
231            
232            /**
233             * Determines whether this view has instruments database support.
234             * @return <code>true</code>
235             */
236            public boolean
237            getInstrumentsDbSupport() { return false; }
238  }  }

Legend:
Removed from v.911  
changed lines
  Added in v.1204

  ViewVC Help
Powered by ViewVC