146 |
|
|
147 |
devicesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
devicesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
148 |
JScrollPane sp = new JScrollPane(devicesTable); |
JScrollPane sp = new JScrollPane(devicesTable); |
149 |
|
Dimension d; |
150 |
|
d = new Dimension(sp.getMinimumSize().width, sp.getPreferredSize().height); |
151 |
|
sp.setPreferredSize(d); |
152 |
|
|
153 |
JPanel p = new JPanel(); |
JPanel p = new JPanel(); |
154 |
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); |
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); |
155 |
p.add(sp); |
p.add(sp); |
173 |
p = new JPanel(); |
p = new JPanel(); |
174 |
p.setLayout(new BorderLayout()); |
p.setLayout(new BorderLayout()); |
175 |
p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); |
176 |
p.add(new JScrollPane(portParamTable)); |
|
177 |
|
sp = new JScrollPane(portParamTable); |
178 |
|
d = new Dimension(sp.getMinimumSize().width, sp.getPreferredSize().height); |
179 |
|
sp.setPreferredSize(d); |
180 |
|
|
181 |
|
p.add(sp); |
182 |
portsPane.add(p); |
portsPane.add(p); |
183 |
|
|
184 |
portsPane.setBorder ( |
portsPane.setBorder ( |
310 |
super(""); |
super(""); |
311 |
|
|
312 |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttDuplicateMidiDevice")); |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttDuplicateMidiDevice")); |
313 |
|
putValue(Action.SMALL_ICON, Res.iconCopy16); |
|
try { |
|
|
URL url = ClassLoader.getSystemClassLoader().getResource ( |
|
|
"org/jsampler/view/classic/res/icons/Copy16.gif" |
|
|
); |
|
|
|
|
|
ImageIcon icon = new ImageIcon(url); |
|
|
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
|
|
putValue(Action.SMALL_ICON, icon); |
|
|
} catch(Exception x) { |
|
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
|
|
} |
|
314 |
|
|
315 |
setEnabled(false); |
setEnabled(false); |
316 |
} |
} |
326 |
m = ((MidiDevicesTableModel)devicesTable.getModel()).getMidiDeviceModel(i); |
m = ((MidiDevicesTableModel)devicesTable.getModel()).getMidiDeviceModel(i); |
327 |
String d = m.getDeviceInfo().getDriverName(); |
String d = m.getDeviceInfo().getDriverName(); |
328 |
Parameter[] pS = m.getDeviceInfo().getAdditionalParameters(); |
Parameter[] pS = m.getDeviceInfo().getAdditionalParameters(); |
|
for(Parameter p : pS) System.out.println(p.getName()); |
|
329 |
CC.getTaskQueue().add(new CreateMidiDevice(d, pS)); |
CC.getTaskQueue().add(new CreateMidiDevice(d, pS)); |
330 |
} |
} |
331 |
} |
} |
335 |
super(""); |
super(""); |
336 |
|
|
337 |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttRemoveMidiDevice")); |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttRemoveMidiDevice")); |
338 |
|
putValue(Action.SMALL_ICON, Res.iconDelete16); |
|
try { |
|
|
URL url = ClassLoader.getSystemClassLoader().getResource ( |
|
|
"org/jsampler/view/classic/res/icons/Delete16.gif" |
|
|
); |
|
|
|
|
|
ImageIcon icon = new ImageIcon(url); |
|
|
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
|
|
putValue(Action.SMALL_ICON, icon); |
|
|
} catch(Exception x) { |
|
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
|
|
} |
|
339 |
|
|
340 |
setEnabled(false); |
setEnabled(false); |
341 |
} |
} |
357 |
super(""); |
super(""); |
358 |
|
|
359 |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttMidiDeviceProps")); |
putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttMidiDeviceProps")); |
360 |
|
putValue(Action.SMALL_ICON, Res.iconProps16); |
|
try { |
|
|
URL url = ClassLoader.getSystemClassLoader().getResource ( |
|
|
"org/jsampler/view/classic/res/icons/Properties16.gif" |
|
|
); |
|
|
|
|
|
ImageIcon icon = new ImageIcon(url); |
|
|
if(icon.getImageLoadStatus() == MediaTracker.COMPLETE) |
|
|
putValue(Action.SMALL_ICON, icon); |
|
|
} catch(Exception x) { |
|
|
CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x); |
|
|
} |
|
361 |
|
|
362 |
setEnabled(false); |
setEnabled(false); |
363 |
} |
} |