/[svn]/jsampler/trunk/src/org/jsampler/view/classic/ViewConfig.java
ViewVC logotype

Annotation of /jsampler/trunk/src/org/jsampler/view/classic/ViewConfig.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1752 - (hide annotations) (download)
Mon Aug 11 22:51:24 2008 UTC (15 years, 8 months ago) by iliev
File size: 2907 byte(s)
* Added toolbar to the Database Instrument Chooser dialog
* Instrument Chooser and Database Instrument Chooser dialogs
  are now resizable
* Fantasia: Added toolbar to the Right-Side Pane's Instruments Database

1 iliev 1286 /*
2     * JSampler - a java front-end for LinuxSampler
3     *
4 iliev 1752 * Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>
5 iliev 1286 *
6     * This file is part of JSampler.
7     *
8     * JSampler is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License version 2
10     * as published by the Free Software Foundation.
11     *
12     * JSampler is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with JSampler; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20     * MA 02111-1307 USA
21     */
22    
23     package org.jsampler.view.classic;
24    
25     import javax.swing.Icon;
26    
27     import org.jsampler.JSPrefs;
28    
29     import org.jsampler.view.InstrumentsDbTableView;
30     import org.jsampler.view.InstrumentsDbTreeView;
31 iliev 1752 import org.jsampler.view.BasicIconSet;
32 iliev 1286 import org.jsampler.view.JSViewConfig;
33    
34     /**
35     *
36     * @author Grigor Iliev
37     */
38     public class ViewConfig extends JSViewConfig {
39     private InstrumentsDbTreeView instrumentsDbTreeView = new TreeView();
40     private InstrumentsDbTableView instrumentsDbTableView = new TableView();
41 iliev 1752 private IconSet basicIconSet = new IconSet();
42 iliev 1286
43     /** Creates a new instance of <code>ViewConfig</code> */
44     public
45     ViewConfig() {
46    
47     }
48    
49     public JSPrefs
50     preferences() { return ClassicPrefs.preferences(); }
51    
52     public InstrumentsDbTreeView
53     getInstrumentsDbTreeView() { return instrumentsDbTreeView; }
54    
55     public InstrumentsDbTableView
56     getInstrumentsDbTableView() { return instrumentsDbTableView; }
57    
58 iliev 1752 public BasicIconSet
59     getBasicIconSet() { return basicIconSet; }
60    
61 iliev 1286 private class TreeView implements InstrumentsDbTreeView {
62     public Icon
63     getRootIcon() { return Res.iconDb16; }
64    
65     public Icon
66     getClosedIcon() { return Res.iconFolder16; }
67    
68     public Icon
69     getOpenIcon() { return Res.iconFolderOpen16; }
70    
71     public Icon
72     getInstrumentIcon() { return Res.iconInstrument16; }
73    
74     public Icon
75     getGigInstrumentIcon() { return Res.iconInstrument16; }
76     }
77    
78     private static class TableView implements InstrumentsDbTableView {
79     public Icon
80     getFolderIcon() { return Res.iconFolder16; }
81    
82     public Icon
83     getInstrumentIcon() { return Res.iconInstrument16; }
84    
85     public Icon
86     getGigInstrumentIcon() { return Res.iconInstrument16; }
87     }
88    
89 iliev 1752 private class IconSet implements BasicIconSet {
90     public Icon
91     getBack16Icon() { return Res.iconBack16; }
92    
93     public Icon
94     getUp16Icon() { return Res.iconUp16; }
95    
96     public Icon
97     getForward16Icon() { return Res.iconForward16; }
98    
99     public Icon
100     getReload16Icon() { return Res.iconReload16; }
101    
102     public Icon
103     getPreferences16Icon() { return Res.iconPreferences16; }
104     }
105    
106 iliev 1286 public boolean
107     getInstrumentsDbSupport() { return true; }
108     }

  ViewVC Help
Powered by ViewVC