57 |
* @author Grigor Iliev |
* @author Grigor Iliev |
58 |
*/ |
*/ |
59 |
public class A4n { |
public class A4n { |
60 |
|
private static boolean |
61 |
|
verifyConnection() { |
62 |
|
if(!CC.getClient().isConnected()) { |
63 |
|
HF.showErrorMessage(i18n.getError("notConnected")); |
64 |
|
return false; |
65 |
|
} |
66 |
|
|
67 |
|
return true; |
68 |
|
} |
69 |
|
|
70 |
public final static Action connect = new Connect(); |
public final static Action connect = new Connect(); |
71 |
|
|
72 |
private static class Connect extends AbstractAction { |
private static class Connect extends AbstractAction { |
98 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
99 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
100 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
101 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
102 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
103 |
|
} |
104 |
} |
} |
105 |
|
|
106 |
public void |
public void |
125 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
126 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
127 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
128 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
129 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
130 |
|
} |
131 |
} |
} |
132 |
|
|
133 |
public void |
public void |
165 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
166 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
167 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
168 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
169 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
170 |
|
} |
171 |
} |
} |
172 |
|
|
173 |
public void |
public void |
174 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
175 |
|
if(!verifyConnection()) return; |
176 |
new NewMidiDeviceDlg(CC.getMainFrame()).setVisible(true); |
new NewMidiDeviceDlg(CC.getMainFrame()).setVisible(true); |
177 |
} |
} |
178 |
} |
} |
193 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
194 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
195 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
196 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
197 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
198 |
|
} |
199 |
} |
} |
200 |
|
|
201 |
public void |
public void |
202 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
203 |
|
if(!verifyConnection()) return; |
204 |
new NewAudioDeviceDlg(CC.getMainFrame()).setVisible(true); |
new NewAudioDeviceDlg(CC.getMainFrame()).setVisible(true); |
205 |
} |
} |
206 |
} |
} |
222 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
223 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
224 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
225 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
226 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
227 |
|
} |
228 |
} |
} |
229 |
|
|
230 |
public void |
public void |
261 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
262 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
263 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
264 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
265 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
266 |
|
} |
267 |
} |
} |
268 |
|
|
269 |
public void |
public void |
270 |
actionPerformed(ActionEvent e) { CC.getSamplerModel().createChannel(); } |
actionPerformed(ActionEvent e) { |
271 |
|
if(!verifyConnection()) return; |
272 |
|
CC.getSamplerModel().createChannel(); |
273 |
|
} |
274 |
} |
} |
275 |
|
|
276 |
private static class NewChannelWizard extends AbstractAction { |
private static class NewChannelWizard extends AbstractAction { |
282 |
|
|
283 |
public void |
public void |
284 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
285 |
JOptionPane.showMessageDialog ( |
new org.jsampler.view.classic.NewChannelWizard().showWizard(); |
|
CC.getMainFrame(), "Not implemented yet", |
|
|
"", |
|
|
JOptionPane.INFORMATION_MESSAGE |
|
|
); |
|
|
//new org.jsampler.view.classic.NewChannelWizard().showWizard(); |
|
286 |
} |
} |
287 |
} |
} |
288 |
|
|
300 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
301 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
302 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
303 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
304 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
305 |
|
} |
306 |
|
|
307 |
setEnabled(false); |
setEnabled(false); |
308 |
} |
} |
354 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
355 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
356 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
357 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
358 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
359 |
|
} |
360 |
|
|
361 |
setEnabled(false); |
setEnabled(false); |
362 |
} |
} |
382 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
383 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
384 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
385 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
386 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
387 |
|
} |
388 |
|
|
389 |
setEnabled(false); |
setEnabled(false); |
390 |
} |
} |
492 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
493 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
494 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
495 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
496 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
497 |
|
} |
498 |
|
|
499 |
setEnabled(false); |
setEnabled(false); |
500 |
} |
} |
557 |
if(ii.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(ii.getImageLoadStatus() == MediaTracker.COMPLETE) |
558 |
putValue(Action.SMALL_ICON, ii); |
putValue(Action.SMALL_ICON, ii); |
559 |
} catch(Exception x) { |
} catch(Exception x) { |
560 |
CC.getLogger().log(Level.INFO, x.getMessage(), x); |
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
561 |
}*/ |
}*/ |
562 |
} |
} |
563 |
|
|