62 |
import net.sf.juife.NavigationPage; |
import net.sf.juife.NavigationPage; |
63 |
|
|
64 |
import org.jsampler.CC; |
import org.jsampler.CC; |
65 |
|
import org.jsampler.HF; |
66 |
import org.jsampler.MidiDeviceModel; |
import org.jsampler.MidiDeviceModel; |
67 |
|
|
68 |
import org.jsampler.event.MidiDeviceEvent; |
import org.jsampler.event.MidiDeviceEvent; |
72 |
import org.jsampler.event.ParameterEvent; |
import org.jsampler.event.ParameterEvent; |
73 |
import org.jsampler.event.ParameterListener; |
import org.jsampler.event.ParameterListener; |
74 |
|
|
75 |
|
import org.jsampler.task.CreateMidiDevice; |
76 |
import org.jsampler.task.DestroyMidiDevice; |
import org.jsampler.task.DestroyMidiDevice; |
77 |
import org.jsampler.task.EnableMidiDevice; |
import org.jsampler.task.EnableMidiDevice; |
78 |
import org.jsampler.task.SetMidiInputPortCount; |
import org.jsampler.task.SetMidiInputPortCount; |
311 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
312 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
313 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
314 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
315 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
316 |
|
} |
317 |
|
|
318 |
setEnabled(false); |
setEnabled(false); |
319 |
} |
} |
320 |
|
|
321 |
public void |
public void |
322 |
actionPerformed(ActionEvent e) { |
actionPerformed(ActionEvent e) { |
323 |
JOptionPane.showMessageDialog ( |
int i = devicesTable.getSelectedRow(); |
324 |
CC.getMainFrame(), "Not implemented yet", |
if(i < 0) { |
325 |
"", |
CC.getLogger().info("There's no selected MIDI device to duplicate"); |
326 |
JOptionPane.INFORMATION_MESSAGE |
return; |
327 |
); |
} |
328 |
|
MidiDeviceModel m; |
329 |
|
m = ((MidiDevicesTableModel)devicesTable.getModel()).getMidiDeviceModel(i); |
330 |
|
String d = m.getDeviceInfo().getDriverName(); |
331 |
|
Parameter[] pS = m.getDeviceInfo().getAdditionalParameters(); |
332 |
|
for(Parameter p : pS) System.out.println(p.getName()); |
333 |
|
CC.getTaskQueue().add(new CreateMidiDevice(d, pS)); |
334 |
} |
} |
335 |
} |
} |
336 |
|
|
348 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
349 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
350 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
351 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
352 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
353 |
|
} |
354 |
|
|
355 |
setEnabled(false); |
setEnabled(false); |
356 |
} |
} |
381 |
ImageIcon icon = new ImageIcon(url); |
ImageIcon icon = new ImageIcon(url); |
382 |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
383 |
putValue(Action.SMALL_ICON, icon); |
putValue(Action.SMALL_ICON, icon); |
384 |
} catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); } |
} catch(Exception x) { |
385 |
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
386 |
|
} |
387 |
|
|
388 |
setEnabled(false); |
setEnabled(false); |
389 |
} |
} |