532 |
components.add(instrumentPane); |
components.add(instrumentPane); |
533 |
add(instrumentPane); |
add(instrumentPane); |
534 |
|
|
535 |
|
add(Box.createRigidArea(new Dimension(0, 3))); |
536 |
|
|
537 |
JPanel p = new JPanel(); |
JPanel p = new JPanel(); |
538 |
components.add(p); |
components.add(p); |
539 |
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); |
p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS)); |
662 |
|
|
663 |
protected void |
protected void |
664 |
updateScreenInfo(SamplerChannel sc) { |
updateScreenInfo(SamplerChannel sc) { |
665 |
|
String s = btnInstr.getToolTipText(); |
666 |
|
|
667 |
int status = sc.getInstrumentStatus(); |
int status = sc.getInstrumentStatus(); |
668 |
if(status >= 0 && status < 100) { |
if(status >= 0 && status < 100) { |
669 |
btnInstr.setText(i18n.getLabel("ChannelScreen.loadingInstrument", status)); |
btnInstr.setText(i18n.getLabel("ChannelScreen.loadingInstrument", status)); |
670 |
|
if(s != null) btnInstr.setToolTipText(null); |
671 |
} else if(status == -1) { |
} else if(status == -1) { |
672 |
btnInstr.setText(i18n.getButtonLabel("ChannelScreen.btnInstr")); |
btnInstr.setText(i18n.getButtonLabel("ChannelScreen.btnInstr")); |
673 |
|
if(s != null) btnInstr.setToolTipText(null); |
674 |
} else if(status < -1) { |
} else if(status < -1) { |
675 |
btnInstr.setText(i18n.getLabel("ChannelScreen.errorLoadingInstrument")); |
btnInstr.setText(i18n.getLabel("ChannelScreen.errorLoadingInstrument")); |
676 |
|
if(s != null) btnInstr.setToolTipText(null); |
677 |
} else { |
} else { |
678 |
if(sc.getInstrumentName() != null) btnInstr.setText(sc.getInstrumentName()); |
if(sc.getInstrumentName() != null) btnInstr.setText(sc.getInstrumentName()); |
679 |
else btnInstr.setText(i18n.getButtonLabel("ChannelScreen.btnInstr")); |
else btnInstr.setText(i18n.getButtonLabel("ChannelScreen.btnInstr")); |
680 |
|
|
681 |
|
btnInstr.setToolTipText(sc.getInstrumentName()); |
682 |
} |
} |
683 |
|
|
684 |
instrumentPane.update(); |
instrumentPane.update(); |
685 |
|
|
686 |
if(sc.getEngine() != null) { |
if(sc.getEngine() != null) { |
687 |
String s = sc.getEngine().getName(); |
s = sc.getEngine().getName(); |
688 |
s += " engine"; |
s += " engine"; |
689 |
if(!s.equals(btnEngine.getText())) { |
if(!s.equals(btnEngine.getText())) { |
690 |
btnEngine.setText(s); |
btnEngine.setText(s); |