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; |
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); |
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 |
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 { |