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

Diff of /jsampler/trunk/src/org/jsampler/view/classic/MainFrame.java

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

revision 1784 by iliev, Thu Feb 14 16:52:36 2008 UTC revision 1785 by iliev, Tue Oct 7 00:07:14 2008 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-2007 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 36  import java.io.BufferedReader; Line 36  import java.io.BufferedReader;
36  import java.io.File;  import java.io.File;
37  import java.io.FileNotFoundException;  import java.io.FileNotFoundException;
38  import java.io.FileReader;  import java.io.FileReader;
 import java.io.StringReader;  
39    
40  import java.util.logging.Level;  import java.util.logging.Level;
41  import java.util.Vector;  import java.util.Vector;
# Line 59  import javax.swing.event.ListSelectionEv Line 58  import javax.swing.event.ListSelectionEv
58  import javax.swing.event.ListSelectionListener;  import javax.swing.event.ListSelectionListener;
59    
60  import net.sf.juife.NavigationPage;  import net.sf.juife.NavigationPage;
 import net.sf.juife.NavigationPane;  
61    
62  import org.jsampler.CC;  import org.jsampler.CC;
63  import org.jsampler.HF;  import org.jsampler.HF;
64  import org.jsampler.LSConsoleModel;  import org.jsampler.LSConsoleModel;
65  import org.jsampler.OrchestraModel;  import org.jsampler.OrchestraModel;
 import org.jsampler.Prefs;  
66  import org.jsampler.Server;  import org.jsampler.Server;
67    
68  import org.jsampler.view.JSChannel;  import org.jsampler.view.JSChannel;
# Line 206  MainFrame extends org.jsampler.view.JSMa Line 203  MainFrame extends org.jsampler.view.JSMa
203          }          }
204                    
205          /** Invoked when this window is about to close. */          /** Invoked when this window is about to close. */
206            @Override
207          protected void          protected void
208          onWindowClose() {          onWindowClose() {
209                  boolean b = preferences().getBoolProperty(CONFIRM_APP_QUIT);                  boolean b = preferences().getBoolProperty(CONFIRM_APP_QUIT);
# Line 663  MainFrame extends org.jsampler.view.JSMa Line 661  MainFrame extends org.jsampler.view.JSMa
661                                    
662                  RecentScriptHandler(String script) { this.script = script; }                  RecentScriptHandler(String script) { this.script = script; }
663                                    
664                    @Override
665                  public void                  public void
666                  actionPerformed(ActionEvent e) {  runScript(script); }                  actionPerformed(ActionEvent e) {  runScript(script); }
667          }          }
# Line 844  MainFrame extends org.jsampler.view.JSMa Line 843  MainFrame extends org.jsampler.view.JSMa
843           * Adds the specified <code>JSChannelsPane</code> to the view.           * Adds the specified <code>JSChannelsPane</code> to the view.
844           * @param chnPane The <code>JSChannelsPane</code> to be added.           * @param chnPane The <code>JSChannelsPane</code> to be added.
845           */           */
846            @Override
847          public void          public void
848          addChannelsPane(JSChannelsPane chnPane) {          addChannelsPane(JSChannelsPane chnPane) {
849                  insertChannelsPane(chnPane, getChannelsPaneCount());                  insertChannelsPane(chnPane, getChannelsPaneCount());
850          }          }
851                    
852            @Override
853          public void          public void
854          insertChannelsPane(JSChannelsPane chnPane, int idx) {          insertChannelsPane(JSChannelsPane chnPane, int idx) {
855                  chnPane.addListSelectionListener(this);                  chnPane.addListSelectionListener(this);
# Line 873  MainFrame extends org.jsampler.view.JSMa Line 874  MainFrame extends org.jsampler.view.JSMa
874           * Gets the <code>JSChannelsPane</code> that is currently shown.           * Gets the <code>JSChannelsPane</code> that is currently shown.
875           * @return The currently shown <code>JSChannelsPane</code>.           * @return The currently shown <code>JSChannelsPane</code>.
876           */           */
877            @Override
878          public JSChannelsPane          public JSChannelsPane
879          getSelectedChannelsPane() {          getSelectedChannelsPane() {
880                  if(getChannelsPaneList().size() == 1) return getChannelsPane(0);                  if(getChannelsPaneList().size() == 1) return getChannelsPane(0);
# Line 883  MainFrame extends org.jsampler.view.JSMa Line 885  MainFrame extends org.jsampler.view.JSMa
885           * Sets the <code>JSChannelsPane</code> to be selected.           * Sets the <code>JSChannelsPane</code> to be selected.
886           * @param pane The <code>JSChannelsPane</code> to be shown.           * @param pane The <code>JSChannelsPane</code> to be shown.
887           */           */
888            @Override
889          public void          public void
890          setSelectedChannelsPane(JSChannelsPane pane) {          setSelectedChannelsPane(JSChannelsPane pane) {
891                  if(getChannelsPaneList().size() == 1) return;                  if(getChannelsPaneList().size() == 1) return;
892                  tabbedPane.setSelectedComponent(pane);                  tabbedPane.setSelectedComponent(pane);
893                    fireChannelsPaneSelectionChanged();
894          }          }
895                    
896          /**          /**
# Line 895  MainFrame extends org.jsampler.view.JSMa Line 899  MainFrame extends org.jsampler.view.JSMa
899           * @return <code>true</code> if the specified code>JSChannelsPane</code>           * @return <code>true</code> if the specified code>JSChannelsPane</code>
900           * is actually removed from the view, <code>false</code> otherwise.           * is actually removed from the view, <code>false</code> otherwise.
901           */           */
902            @Override
903          public boolean          public boolean
904          removeChannelsPane(JSChannelsPane chnPane) {          removeChannelsPane(JSChannelsPane chnPane) {
905                  chnPane.removeListSelectionListener(this);                  chnPane.removeListSelectionListener(this);
# Line 1036  MainFrame extends org.jsampler.view.JSMa Line 1041  MainFrame extends org.jsampler.view.JSMa
1041          public JMenu          public JMenu
1042          getTabsMenu() { return tabsMenu; }          getTabsMenu() { return tabsMenu; }
1043                    
1044            @Override
1045          public void          public void
1046          stateChanged(ChangeEvent e) {          stateChanged(ChangeEvent e) {
1047                  updateTabsMenu();                  updateTabsMenu();
# Line 1043  MainFrame extends org.jsampler.view.JSMa Line 1049  MainFrame extends org.jsampler.view.JSMa
1049                  checkTabSelection();                  checkTabSelection();
1050          }          }
1051                    
1052            @Override
1053          public void          public void
1054          valueChanged(ListSelectionEvent e) {          valueChanged(ListSelectionEvent e) {
1055                  if(e.getValueIsAdjusting()) return;                  if(e.getValueIsAdjusting()) return;
# Line 1191  MainFrame extends org.jsampler.view.JSMa Line 1198  MainFrame extends org.jsampler.view.JSMa
1198                  recentScriptsMenu.setEnabled(recentScripts.size() != 0);                  recentScriptsMenu.setEnabled(recentScripts.size() != 0);
1199          }          }
1200                    
1201            @Override
1202          public void          public void
1203          installJSamplerHome() {          installJSamplerHome() {
1204                  JSamplerHomeChooser chooser = new JSamplerHomeChooser(this);                  JSamplerHomeChooser chooser = new JSamplerHomeChooser(this);
# Line 1200  MainFrame extends org.jsampler.view.JSMa Line 1208  MainFrame extends org.jsampler.view.JSMa
1208                  CC.changeJSamplerHome(chooser.getJSamplerHome());                  CC.changeJSamplerHome(chooser.getJSamplerHome());
1209          }          }
1210                    
1211            @Override
1212          public void          public void
1213          showDetailedErrorMessage(Frame owner, String err, String details) {          showDetailedErrorMessage(Frame owner, String err, String details) {
1214                  JSDetailedErrorDlg dlg = new JSDetailedErrorDlg (                  JSDetailedErrorDlg dlg = new JSDetailedErrorDlg (
# Line 1208  MainFrame extends org.jsampler.view.JSMa Line 1217  MainFrame extends org.jsampler.view.JSMa
1217                  dlg.setVisible(true);                  dlg.setVisible(true);
1218          }          }
1219                    
1220            @Override
1221          public void          public void
1222          showDetailedErrorMessage(Dialog owner, String err, String details) {          showDetailedErrorMessage(Dialog owner, String err, String details) {
1223                  JSDetailedErrorDlg dlg = new JSDetailedErrorDlg (                  JSDetailedErrorDlg dlg = new JSDetailedErrorDlg (
# Line 1220  MainFrame extends org.jsampler.view.JSMa Line 1230  MainFrame extends org.jsampler.view.JSMa
1230           * Gets the server address to which to connect. If the server should be           * Gets the server address to which to connect. If the server should be
1231           * manually selected, a dialog asking the user to choose a server is displayed.           * manually selected, a dialog asking the user to choose a server is displayed.
1232           */           */
1233            @Override
1234          public Server          public Server
1235          getServer() {          getServer() {
1236                  boolean b = preferences().getBoolProperty(MANUAL_SERVER_SELECT_ON_STARTUP);                  boolean b = preferences().getBoolProperty(MANUAL_SERVER_SELECT_ON_STARTUP);
# Line 1231  MainFrame extends org.jsampler.view.JSMa Line 1242  MainFrame extends org.jsampler.view.JSMa
1242           * manually selected, a dialog asking the user to choose a server is displayed.           * manually selected, a dialog asking the user to choose a server is displayed.
1243           * @param manualSelect Determines whether the server should be manually selected.           * @param manualSelect Determines whether the server should be manually selected.
1244           */           */
1245            @Override
1246          public Server          public Server
1247          getServer(boolean manualSelect) {          getServer(boolean manualSelect) {
1248                  if(manualSelect) {                  if(manualSelect) {

Legend:
Removed from v.1784  
changed lines
  Added in v.1785

  ViewVC Help
Powered by ViewVC