1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005 Grigor Kirilov Iliev |
* Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
58 |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkMidiDevices")); |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkMidiDevices")); |
59 |
private LinkButton lnkNewMidiDevice = |
private LinkButton lnkNewMidiDevice = |
60 |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkNewMidiDevice")); |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkNewMidiDevice")); |
61 |
|
private LinkButton lnkMidiInstruments = |
62 |
|
new LinkButton(i18n.getButtonLabel("TasksPage.lnkMidiInstruments")); |
63 |
private LinkButton lnkAudioDevices = |
private LinkButton lnkAudioDevices = |
64 |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkAudioDevices")); |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkAudioDevices")); |
65 |
private LinkButton lnkNewAudioDevice = |
private LinkButton lnkNewAudioDevice = |
74 |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkManageOrchestras")); |
new LinkButton(i18n.getButtonLabel("TasksPage.lnkManageOrchestras")); |
75 |
|
|
76 |
|
|
|
private LinkButton lnkRefreshSampler = |
|
|
new LinkButton(i18n.getButtonLabel("TasksPage.lnkRefreshSampler")); |
|
|
|
|
77 |
/** Creates a new instance of <code>TasksPage</code> */ |
/** Creates a new instance of <code>TasksPage</code> */ |
78 |
public |
public |
79 |
TasksPage() { |
TasksPage() { |
80 |
setTitle(i18n.getLabel("TasksPage.title")); |
setTitle(i18n.getLabel("TasksPage.title")); |
81 |
|
|
|
int h = lnkRefreshSampler.getPreferredSize().height; |
|
|
try { |
|
|
URL url = ClassLoader.getSystemClassLoader().getResource ( |
|
|
"org/jsampler/view/classic/res/icons/Refresh16.gif" |
|
|
); |
|
|
|
|
|
ImageIcon icon = new ImageIcon(url); |
|
|
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
|
|
lnkRefreshSampler.setIcon(icon); |
|
|
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
|
|
|
|
|
lnkRefreshSampler.setText(i18n.getButtonLabel("TasksPage.lnkRefreshSampler")); |
|
|
lnkRefreshSampler.setMaximumSize(lnkRefreshSampler.getPreferredSize()); |
|
82 |
setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); |
setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); |
83 |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); |
84 |
|
|
100 |
|
|
101 |
add(p); |
add(p); |
102 |
|
|
103 |
JLabel lMidiDevices = new JLabel(i18n.getLabel("TasksPage.lMidiDevices")); |
String s = i18n.getLabel("TasksPage.lMidiDevices"); |
104 |
|
JLabel lMidiDevices = new JLabel(s, Res.iconMidi24, JLabel.LEFT); |
105 |
add(lMidiDevices); |
add(lMidiDevices); |
106 |
sep = new JSeparator(); |
sep = new JSeparator(); |
107 |
sep.setMaximumSize(new Dimension(Short.MAX_VALUE, sep.getPreferredSize().height)); |
sep.setMaximumSize(new Dimension(Short.MAX_VALUE, sep.getPreferredSize().height)); |
113 |
|
|
114 |
p.add(lnkNewMidiDevice); |
p.add(lnkNewMidiDevice); |
115 |
p.add(lnkMidiDevices); |
p.add(lnkMidiDevices); |
116 |
|
p.add(lnkMidiInstruments); |
117 |
p.add(Box.createGlue()); |
p.add(Box.createGlue()); |
118 |
p.setMaximumSize(p.getPreferredSize()); |
p.setMaximumSize(p.getPreferredSize()); |
119 |
|
|
120 |
add(p); |
add(p); |
121 |
|
|
122 |
JLabel lAudioDevices = new JLabel(i18n.getLabel("TasksPage.lAudioDevices")); |
s = i18n.getLabel("TasksPage.lAudioDevices"); |
123 |
|
JLabel lAudioDevices = new JLabel(s, Res.iconVol24, JLabel.LEFT); |
124 |
add(lAudioDevices); |
add(lAudioDevices); |
125 |
|
|
126 |
sep = new JSeparator(); |
sep = new JSeparator(); |
158 |
|
|
159 |
add(Box.createGlue()); |
add(Box.createGlue()); |
160 |
|
|
|
sep = new JSeparator(); |
|
|
sep.setMaximumSize(new Dimension(Short.MAX_VALUE, sep.getPreferredSize().height)); |
|
|
add(sep); |
|
|
|
|
161 |
p = new JPanel(); |
p = new JPanel(); |
162 |
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); |
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); |
163 |
p.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); |
p.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); |
164 |
|
|
|
p.add(lnkRefreshSampler); |
|
165 |
p.add(Box.createGlue()); |
p.add(Box.createGlue()); |
166 |
p.setMaximumSize(p.getPreferredSize()); |
p.setMaximumSize(p.getPreferredSize()); |
167 |
|
|
193 |
actionPerformed(ActionEvent e) { getLeftPane().showMidiDevicesPage(); } |
actionPerformed(ActionEvent e) { getLeftPane().showMidiDevicesPage(); } |
194 |
}); |
}); |
195 |
|
|
196 |
|
lnkMidiInstruments.addActionListener(new ActionListener() { |
197 |
|
public void |
198 |
|
actionPerformed(ActionEvent e) { |
199 |
|
getLeftPane().showMidiInstrumentMapsPage(); |
200 |
|
} |
201 |
|
}); |
202 |
|
|
203 |
lnkNewAudioDevice.addActionListener(new ActionListener() { |
lnkNewAudioDevice.addActionListener(new ActionListener() { |
204 |
public void |
public void |
205 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
221 |
public void |
public void |
222 |
actionPerformed(ActionEvent e) { getLeftPane().showManageOrchestrasPage(); } |
actionPerformed(ActionEvent e) { getLeftPane().showManageOrchestrasPage(); } |
223 |
}); |
}); |
|
|
|
|
lnkRefreshSampler.addActionListener(new ActionListener() { |
|
|
public void |
|
|
actionPerformed(ActionEvent e) { A4n.refresh.actionPerformed(null); } |
|
|
}); |
|
224 |
} |
} |
225 |
|
|
226 |
} |
} |