30 |
import javax.swing.JPopupMenu; |
import javax.swing.JPopupMenu; |
31 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
32 |
|
|
33 |
|
import org.jsampler.AudioDeviceModel; |
34 |
import org.jsampler.CC; |
import org.jsampler.CC; |
35 |
import org.jsampler.JSPrefs; |
import org.jsampler.JSPrefs; |
36 |
|
|
38 |
import org.jsampler.view.InstrumentsDbTreeView; |
import org.jsampler.view.InstrumentsDbTreeView; |
39 |
import org.jsampler.view.BasicIconSet; |
import org.jsampler.view.BasicIconSet; |
40 |
import org.jsampler.view.JSMainFrame; |
import org.jsampler.view.JSMainFrame; |
|
import org.jsampler.view.JSViewConfig; |
|
41 |
import org.jsampler.view.fantasia.basic.MultiColumnMenu; |
import org.jsampler.view.fantasia.basic.MultiColumnMenu; |
42 |
|
import org.jsampler.view.std.JSDestEffectChooser; |
43 |
|
import org.jsampler.view.std.StdViewConfig; |
44 |
|
|
45 |
import org.pushingpixels.substance.api.SubstanceConstants; |
import org.pushingpixels.substance.api.SubstanceConstants; |
46 |
import org.pushingpixels.substance.api.SubstanceLookAndFeel; |
import org.pushingpixels.substance.api.SubstanceLookAndFeel; |
51 |
* |
* |
52 |
* @author Grigor Iliev |
* @author Grigor Iliev |
53 |
*/ |
*/ |
54 |
public class ViewConfig extends JSViewConfig { |
public class ViewConfig extends StdViewConfig { |
55 |
private InstrumentsDbTreeView instrumentsDbTreeView = new TreeView(); |
private InstrumentsDbTreeView instrumentsDbTreeView = new TreeView(); |
56 |
private InstrumentsDbTableView instrumentsDbTableView = new TableView(); |
private InstrumentsDbTableView instrumentsDbTableView = new TableView(); |
57 |
private SamplerBrowserView samplerBrowserView = new SamplerBrowserView(); |
private SamplerBrowserView samplerBrowserView = new SamplerBrowserView(); |
295 |
|
|
296 |
@Override |
@Override |
297 |
public Icon |
public Icon |
298 |
|
getOpenIcon() { return Res.iconFolderOpen16; } |
299 |
|
|
300 |
|
@Override |
301 |
|
public Icon |
302 |
|
getCloseIcon() { return Res.iconFolder16; } |
303 |
|
|
304 |
|
@Override |
305 |
|
public Icon |
306 |
|
getChannelLaneOpenIcon() { return Res.iconFolderOpen16; } |
307 |
|
|
308 |
|
@Override |
309 |
|
public Icon |
310 |
|
getChannelLaneCloseIcon() { return Res.iconFolder16; } |
311 |
|
|
312 |
|
@Override |
313 |
|
public Icon |
314 |
|
getSamplerChannelIcon() { return Res.iconSamplerChannel16; } |
315 |
|
|
316 |
|
@Override |
317 |
|
public Icon |
318 |
|
getFxSendsOpenIcon() { return Res.iconFolderOpen16; } |
319 |
|
|
320 |
|
@Override |
321 |
|
public Icon |
322 |
|
getFxSendsCloseIcon() { return Res.iconFolder16; } |
323 |
|
|
324 |
|
@Override |
325 |
|
public Icon |
326 |
|
getFxSendIcon() { return Res.iconFxSend16; } |
327 |
|
|
328 |
|
@Override |
329 |
|
public Icon |
330 |
|
getDestEffectDirIcon() { return Res.iconDestEffect16; } |
331 |
|
|
332 |
|
@Override |
333 |
|
public Icon |
334 |
|
getDestEffectIcon() { return Res.iconEffectInstanceLnk16; } |
335 |
|
|
336 |
|
@Override |
337 |
|
public Icon |
338 |
getAudioDevicesOpenIcon() { return Res.iconAudioDevsOpen16; } |
getAudioDevicesOpenIcon() { return Res.iconAudioDevsOpen16; } |
339 |
|
|
340 |
@Override |
@Override |
378 |
getIcon(Object value, boolean b) { |
getIcon(Object value, boolean b) { |
379 |
if(value instanceof SamplerTreeNode) return getSamplerIcon(); |
if(value instanceof SamplerTreeNode) return getSamplerIcon(); |
380 |
|
|
381 |
|
if(value instanceof SamplerChannelDirTreeNode) { |
382 |
|
if(b) return getOpenIcon(); |
383 |
|
else return getCloseIcon(); |
384 |
|
} |
385 |
|
|
386 |
|
if(value instanceof ChannelLaneTreeNode) { |
387 |
|
if(b) return getChannelLaneOpenIcon(); |
388 |
|
else return getChannelLaneCloseIcon(); |
389 |
|
} |
390 |
|
|
391 |
|
if(value instanceof SamplerChannelTreeNode) return getSamplerChannelIcon(); |
392 |
|
|
393 |
|
if(value instanceof FxSendDirTreeNode) { |
394 |
|
if(b) return getFxSendsOpenIcon(); |
395 |
|
else return getFxSendsCloseIcon(); |
396 |
|
} |
397 |
|
|
398 |
|
if(value instanceof FxSendTreeNode) return getFxSendIcon(); |
399 |
|
|
400 |
if(value instanceof AudioDevicesTreeNode) { |
if(value instanceof AudioDevicesTreeNode) { |
401 |
if(b) return getAudioDevicesOpenIcon(); |
if(b) return getAudioDevicesOpenIcon(); |
402 |
else return getAudioDevicesCloseIcon(); |
else return getAudioDevicesCloseIcon(); |
403 |
} |
} |
404 |
|
|
405 |
|
if(value instanceof DestEffectDirTreeNode) return getDestEffectDirIcon(); |
406 |
|
if(value instanceof DestEffectTreeNode) return getDestEffectIcon(); |
407 |
|
|
408 |
if(value instanceof AudioDeviceTreeNode) return getAudioDeviceIcon(); |
if(value instanceof AudioDeviceTreeNode) return getAudioDeviceIcon(); |
409 |
|
|
410 |
if(value instanceof SendEffectChainsTreeNode) { |
if(value instanceof SendEffectChainsTreeNode) { |
441 |
public JPopupMenu |
public JPopupMenu |
442 |
createMultiColumnPopupMenu() |
createMultiColumnPopupMenu() |
443 |
{ return new MultiColumnMenu.FantasiaPopupMenu(); } |
{ return new MultiColumnMenu.FantasiaPopupMenu(); } |
444 |
|
|
445 |
|
@Override |
446 |
|
public DestEffectChooser |
447 |
|
createDestEffectChooser(AudioDeviceModel dev) { return new DestEffectChooser(dev); } |
448 |
} |
} |