/[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 1786 - (hide annotations) (download)
Wed Oct 8 22:38:15 2008 UTC (15 years, 6 months ago) by iliev
File size: 3391 byte(s)
* Implemented option to launch the backend if it is not yet started
  (choose Edit/Preferences, then click the `Backend' tab)
* LSCP scripts can now be run by passing them to jsampler
  as command-line arguments
* The scripts in the `scripts' directory now pass the command-line
  arguments to the respective jsampler distribution
* ant: the default target is now build-fantasia
* bugfix: backend address was always set to 127.0.0.1 when adding
  backend to the backend list

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 iliev 1786 import javax.swing.ImageIcon;
27 iliev 1286
28     import org.jsampler.JSPrefs;
29    
30     import org.jsampler.view.InstrumentsDbTableView;
31     import org.jsampler.view.InstrumentsDbTreeView;
32 iliev 1752 import org.jsampler.view.BasicIconSet;
33 iliev 1286 import org.jsampler.view.JSViewConfig;
34    
35     /**
36     *
37     * @author Grigor Iliev
38     */
39     public class ViewConfig extends JSViewConfig {
40     private InstrumentsDbTreeView instrumentsDbTreeView = new TreeView();
41     private InstrumentsDbTableView instrumentsDbTableView = new TableView();
42 iliev 1752 private IconSet basicIconSet = new IconSet();
43 iliev 1286
44     /** Creates a new instance of <code>ViewConfig</code> */
45     public
46     ViewConfig() {
47    
48     }
49    
50 iliev 1786 @Override
51 iliev 1286 public JSPrefs
52     preferences() { return ClassicPrefs.preferences(); }
53    
54 iliev 1786 @Override
55 iliev 1286 public InstrumentsDbTreeView
56     getInstrumentsDbTreeView() { return instrumentsDbTreeView; }
57    
58 iliev 1786 @Override
59 iliev 1286 public InstrumentsDbTableView
60     getInstrumentsDbTableView() { return instrumentsDbTableView; }
61    
62 iliev 1786 @Override
63 iliev 1752 public BasicIconSet
64     getBasicIconSet() { return basicIconSet; }
65    
66 iliev 1286 private class TreeView implements InstrumentsDbTreeView {
67 iliev 1786 @Override
68 iliev 1286 public Icon
69     getRootIcon() { return Res.iconDb16; }
70    
71 iliev 1786 @Override
72 iliev 1286 public Icon
73     getClosedIcon() { return Res.iconFolder16; }
74    
75 iliev 1786 @Override
76 iliev 1286 public Icon
77     getOpenIcon() { return Res.iconFolderOpen16; }
78    
79 iliev 1786 @Override
80 iliev 1286 public Icon
81     getInstrumentIcon() { return Res.iconInstrument16; }
82    
83 iliev 1786 @Override
84 iliev 1286 public Icon
85     getGigInstrumentIcon() { return Res.iconInstrument16; }
86     }
87    
88     private static class TableView implements InstrumentsDbTableView {
89 iliev 1786 @Override
90 iliev 1286 public Icon
91     getFolderIcon() { return Res.iconFolder16; }
92    
93 iliev 1786 @Override
94 iliev 1286 public Icon
95     getInstrumentIcon() { return Res.iconInstrument16; }
96    
97 iliev 1786 @Override
98 iliev 1286 public Icon
99     getGigInstrumentIcon() { return Res.iconInstrument16; }
100     }
101    
102 iliev 1752 private class IconSet implements BasicIconSet {
103 iliev 1786 @Override
104     public ImageIcon
105     getApplicationIcon() { return Res.appIcon; }
106    
107     @Override
108 iliev 1752 public Icon
109     getBack16Icon() { return Res.iconBack16; }
110    
111 iliev 1786 @Override
112 iliev 1752 public Icon
113     getUp16Icon() { return Res.iconUp16; }
114    
115 iliev 1786 @Override
116 iliev 1752 public Icon
117     getForward16Icon() { return Res.iconForward16; }
118    
119 iliev 1786 @Override
120 iliev 1752 public Icon
121     getReload16Icon() { return Res.iconReload16; }
122    
123 iliev 1786 @Override
124 iliev 1752 public Icon
125     getPreferences16Icon() { return Res.iconPreferences16; }
126 iliev 1767
127 iliev 1786 @Override
128 iliev 1767 public Icon
129     getWarning32Icon() { return Res.iconWarning32; }
130    
131 iliev 1786 @Override
132 iliev 1767 public Icon
133     getQuestion32Icon() { return Res.iconQuestion32; }
134 iliev 1752 }
135    
136 iliev 1786 @Override
137 iliev 1286 public boolean
138     getInstrumentsDbSupport() { return true; }
139     }

  ViewVC Help
Powered by ViewVC