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

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

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

revision 1742 by iliev, Thu Feb 14 16:52:36 2008 UTC revision 1743 by iliev, Sat May 31 23:04:01 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 80  import static org.jsampler.view.std.StdP Line 80  import static org.jsampler.view.std.StdP
80   * @author Grigor Iliev   * @author Grigor Iliev
81   */   */
82  public class PrefsDlg extends EnhancedDialog {  public class PrefsDlg extends EnhancedDialog {
83            private final JTabbedPane tabbedPane = new JTabbedPane();
84            
85          private final GeneralPane genPane = new GeneralPane();          private final GeneralPane genPane = new GeneralPane();
86          private final ViewPane viewPane = new ViewPane();          private final ViewPane viewPane = new ViewPane();
87          private final ConsolePane consolePane = new ConsolePane();          private final ConsolePane consolePane = new ConsolePane();
# Line 100  public class PrefsDlg extends EnhancedDi Line 102  public class PrefsDlg extends EnhancedDi
102                  installListeners();                  installListeners();
103                                    
104                  setLocation(JuifeUtils.centerLocation(this, frm));                  setLocation(JuifeUtils.centerLocation(this, frm));
105                    
106                    int i = preferences().getIntProperty("PrefsDlg.tabIndex");
107                    
108                    if(i >= 0 && i < tabbedPane.getTabCount()) tabbedPane.setSelectedIndex(i);
109          }          }
110                    
111          private void          private void
112          initPrefsDlg() {          initPrefsDlg() {
113                  JTabbedPane tp = new JTabbedPane();                  JTabbedPane tp = tabbedPane;
114                    tp.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
115                    
116                  tp.addTab(i18n.getLabel("PrefsDlg.tabGeneral"), genPane);                  tp.addTab(i18n.getLabel("PrefsDlg.tabGeneral"), genPane);
117                  tp.addTab(i18n.getLabel("PrefsDlg.tabView"), viewPane);                  tp.addTab(i18n.getLabel("PrefsDlg.tabView"), viewPane);
118                  tp.addTab(i18n.getLabel("PrefsDlg.tabConsole"), consolePane);                  tp.addTab(i18n.getLabel("PrefsDlg.tabConsole"), consolePane);
# Line 170  public class PrefsDlg extends EnhancedDi Line 178  public class PrefsDlg extends EnhancedDi
178                  connectionPane.apply();                  connectionPane.apply();
179                  defaultsPane.apply();                  defaultsPane.apply();
180                                    
181                    preferences().setIntProperty("PrefsDlg.tabIndex", tabbedPane.getSelectedIndex());
182                    
183                  setVisible(false);                  setVisible(false);
184          }          }
185                    

Legend:
Removed from v.1742  
changed lines
  Added in v.1743

  ViewVC Help
Powered by ViewVC