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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC