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

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

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

revision 1871 by iliev, Sun Mar 22 18:11:39 2009 UTC revision 1872 by iliev, Mon Mar 23 15:34:50 2009 UTC
# Line 36  import javax.swing.Box; Line 36  import javax.swing.Box;
36  import javax.swing.BoxLayout;  import javax.swing.BoxLayout;
37  import javax.swing.JButton;  import javax.swing.JButton;
38  import javax.swing.JCheckBox;  import javax.swing.JCheckBox;
39    import javax.swing.JLabel;
40  import javax.swing.JPanel;  import javax.swing.JPanel;
41    import javax.swing.JSpinner;
42  import javax.swing.JTabbedPane;  import javax.swing.JTabbedPane;
43    import javax.swing.SpinnerNumberModel;
44    
45  import net.sf.juife.EnhancedDialog;  import net.sf.juife.EnhancedDialog;
46  import net.sf.juife.JuifeUtils;  import net.sf.juife.JuifeUtils;
# Line 355  class ChannelsPropsPane extends JPanel { Line 358  class ChannelsPropsPane extends JPanel {
358                    
359          private final JCheckBox checkShowStreamVoiceCount =          private final JCheckBox checkShowStreamVoiceCount =
360                  new JCheckBox(i18n.getLabel("ChannelsPropsPane.checkShowStreamVoiceCount"));                  new JCheckBox(i18n.getLabel("ChannelsPropsPane.checkShowStreamVoiceCount"));
361    
362            private final JLabel lChannelLaneNumber =
363                    new JLabel(i18n.getLabel("ChannelsPropsPane.lChannelLaneNumber"));
364    
365            private JSpinner spChannelLaneNumber;
366                    
367          ChannelsPropsPane() {          ChannelsPropsPane() {
368                  setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));                  setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
369                                    
370                    add(createChannelLanesPane());
371                  add(createSmallViewPane());                  add(createSmallViewPane());
372    
373                  JPanel p = new JPanel();                  JPanel p = new JPanel();
374                  p.setLayout(new BorderLayout());                  p.setLayout(new BorderLayout());
375                  add(p);                  add(p);
# Line 375  class ChannelsPropsPane extends JPanel { Line 385  class ChannelsPropsPane extends JPanel {
385                                    
386                  b = checkShowStreamVoiceCount.isSelected();                  b = checkShowStreamVoiceCount.isSelected();
387                  preferences().setBoolProperty("channel.smallView.showStreamVoiceCount", b);                  preferences().setBoolProperty("channel.smallView.showStreamVoiceCount", b);
388    
389                    int i = Integer.parseInt(spChannelLaneNumber.getValue().toString());
390                    preferences().setIntProperty("channelLanes.count", i);
391          }          }
392                    
393          private JPanel          private JPanel
# Line 403  class ChannelsPropsPane extends JPanel { Line 416  class ChannelsPropsPane extends JPanel {
416                                    
417                  return p;                  return p;
418          }          }
419    
420            private JPanel
421            createChannelLanesPane() {
422                    int max = MainFrame.MAX_CHANNEL_LANE_NUMBER;
423    
424                    int i = preferences().getIntProperty("channelLanes.count");
425                    if(i < 1 || i > max) i = max;
426                    spChannelLaneNumber = new JSpinner(new SpinnerNumberModel(i, 1, max, 1));
427    
428                    JPanel p = new JPanel();
429                    p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
430                    p.add(lChannelLaneNumber);
431                    p.add(Box.createRigidArea(new Dimension(5, 0)));
432                    p.add(spChannelLaneNumber);
433                    p.setAlignmentX(LEFT_ALIGNMENT);
434                    p.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
435    
436                    JPanel p2 = new JPanel();
437                    p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS));
438                    String s = i18n.getLabel("ChannelsPropsPane.channelLanes");
439                    p2.setBorder(BorderFactory.createTitledBorder(s));
440                    p2.setMaximumSize(new Dimension(Short.MAX_VALUE, p.getPreferredSize().height));
441                    p2.add(p);
442                    p2.setAlignmentX(LEFT_ALIGNMENT);
443    
444                    return p2;
445            }
446  }  }
447    
448  class ConsolePane extends JSLSConsolePropsPane {  class ConsolePane extends JSLSConsolePropsPane {

Legend:
Removed from v.1871  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC