46 |
import org.jsampler.event.SamplerChannelListEvent; |
import org.jsampler.event.SamplerChannelListEvent; |
47 |
import org.jsampler.event.SamplerChannelListListener; |
import org.jsampler.event.SamplerChannelListListener; |
48 |
|
|
49 |
import org.jvnet.substance.SubstanceImageCreator; |
import org.jvnet.substance.utils.SubstanceImageCreator; |
50 |
|
|
51 |
import org.linuxsampler.lscp.SamplerChannel; |
import org.linuxsampler.lscp.SamplerChannel; |
52 |
|
|
370 |
|
|
371 |
private final PropertyChangeListener chnNumberingListener; |
private final PropertyChangeListener chnNumberingListener; |
372 |
private final PropertyChangeListener showMidiInfoListener; |
private final PropertyChangeListener showMidiInfoListener; |
373 |
|
private final PropertyChangeListener showStreamVoiceCountListener; |
374 |
|
|
375 |
private boolean bShowNumbering; |
private boolean bShowNumbering; |
376 |
private boolean bShowMidiInfo; |
private boolean bShowMidiInfo; |
412 |
components.add(btnInstr); |
components.add(btnInstr); |
413 |
|
|
414 |
p.add(btnInstr); |
p.add(btnInstr); |
415 |
|
p.add(streamVoiceCountPane); |
416 |
|
|
417 |
h = p.getPreferredSize().height; |
h = p.getPreferredSize().height; |
418 |
p.setPreferredSize(new Dimension(159, h)); |
p.setPreferredSize(new Dimension(201, h)); |
419 |
p.setMinimumSize(p.getPreferredSize()); |
p.setMinimumSize(p.getPreferredSize()); |
420 |
p.setMaximumSize(p.getPreferredSize()); |
p.setMaximumSize(p.getPreferredSize()); |
421 |
|
|
422 |
add(p); |
add(p); |
|
|
|
423 |
add(Box.createRigidArea(new Dimension(3, 0))); |
add(Box.createRigidArea(new Dimension(3, 0))); |
|
add(streamVoiceCountPane); |
|
424 |
add(volumePane); |
add(volumePane); |
425 |
|
|
426 |
setPreferredSize(new Dimension(270, getPreferredSize().height)); |
setPreferredSize(new Dimension(270, getPreferredSize().height)); |
448 |
channelInfoPane.setShowNumbering(bShowNumbering); |
channelInfoPane.setShowNumbering(bShowNumbering); |
449 |
|
|
450 |
|
|
|
|
|
451 |
final String s2 = "channel.smallView.showMidiInfo"; |
final String s2 = "channel.smallView.showMidiInfo"; |
452 |
|
|
453 |
showMidiInfoListener = new PropertyChangeListener() { |
showMidiInfoListener = new PropertyChangeListener() { |
462 |
|
|
463 |
bShowMidiInfo = preferences().getBoolProperty(s2); |
bShowMidiInfo = preferences().getBoolProperty(s2); |
464 |
channelInfoPane.setShowMidiInfo(bShowMidiInfo); |
channelInfoPane.setShowMidiInfo(bShowMidiInfo); |
465 |
|
|
466 |
|
|
467 |
|
final String s3 = "channel.smallView.showStreamVoiceCount"; |
468 |
|
|
469 |
|
showStreamVoiceCountListener = new PropertyChangeListener() { |
470 |
|
public void |
471 |
|
propertyChange(PropertyChangeEvent e) { |
472 |
|
boolean b = preferences().getBoolProperty(s3); |
473 |
|
streamVoiceCountPane.setVisible(b); |
474 |
|
} |
475 |
|
}; |
476 |
|
|
477 |
|
preferences().addPropertyChangeListener(s3, showStreamVoiceCountListener); |
478 |
|
|
479 |
|
boolean b = preferences().getBoolProperty(s3); |
480 |
|
streamVoiceCountPane.setVisible(b); |
481 |
} |
} |
482 |
|
|
483 |
public void |
public void |
546 |
|
|
547 |
s = "channel.smallView.showMidiInfo"; |
s = "channel.smallView.showMidiInfo"; |
548 |
preferences().removePropertyChangeListener(s, showMidiInfoListener); |
preferences().removePropertyChangeListener(s, showMidiInfoListener); |
549 |
|
|
550 |
|
s = "channel.smallView.showStreamVoiceCount"; |
551 |
|
preferences().removePropertyChangeListener(s, showStreamVoiceCountListener); |
552 |
} |
} |
553 |
} |
} |
554 |
|
|
569 |
|
|
570 |
lInfo = createScreenLabel(""); |
lInfo = createScreenLabel(""); |
571 |
lInfo.setFont(Res.fontScreenMono); |
lInfo.setFont(Res.fontScreenMono); |
|
lInfo.setToolTipText(i18n.getLabel("SmallChannelView.ttMidiPortChannel")); |
|
572 |
|
|
573 |
updateChannelIndex(); |
updateChannelIndex(); |
574 |
|
|
655 |
if(b == showMidiInfo) return; |
if(b == showMidiInfo) return; |
656 |
showMidiInfo = b; |
showMidiInfo = b; |
657 |
|
|
658 |
|
String s = b ? i18n.getLabel("SmallChannelView.ttMidiPortChannel") : null; |
659 |
|
lInfo.setToolTipText(s); |
660 |
|
|
661 |
updateLabelLength(); |
updateLabelLength(); |
662 |
updateChannelInfo(); |
updateChannelInfo(); |
663 |
} |
} |