1 |
iliev |
912 |
/* |
2 |
|
|
* JSampler - a java front-end for LinuxSampler |
3 |
|
|
* |
4 |
iliev |
2200 |
* Copyright (C) 2005-2011 Grigor Iliev <grigor@grigoriliev.com> |
5 |
iliev |
912 |
* |
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.fantasia; |
24 |
|
|
|
25 |
iliev |
1285 |
import java.awt.Font; |
26 |
iliev |
1496 |
import java.awt.Insets; |
27 |
|
|
|
28 |
|
|
import java.util.Properties; |
29 |
|
|
import java.util.logging.Level; |
30 |
|
|
|
31 |
iliev |
912 |
import javax.swing.ImageIcon; |
32 |
|
|
|
33 |
iliev |
1285 |
import org.jsampler.CC; |
34 |
|
|
import org.jsampler.HF; |
35 |
iliev |
912 |
|
36 |
iliev |
1496 |
import org.linuxsampler.lscp.Parser; |
37 |
iliev |
1285 |
|
38 |
iliev |
1496 |
|
39 |
iliev |
912 |
/** |
40 |
|
|
* This class contains all pixmap resources needed by <b>Fantasia</b> view. |
41 |
|
|
* @author Grigor Iliev |
42 |
|
|
*/ |
43 |
|
|
public class Res { |
44 |
|
|
|
45 |
|
|
/** Forbits the instantiation of this class. */ |
46 |
|
|
private Res() { } |
47 |
|
|
|
48 |
iliev |
1785 |
public static ImageIcon gfxFantasiaLogo; |
49 |
iliev |
912 |
|
50 |
iliev |
1785 |
public final static ImageIcon gfxPowerOn |
51 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/power_on.png")); |
52 |
|
|
|
53 |
iliev |
1785 |
public final static ImageIcon gfxPowerOff |
54 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/power_off.png")); |
55 |
iliev |
912 |
|
56 |
iliev |
1785 |
public final static ImageIcon gfxMuteOn |
57 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_on.png")); |
58 |
iliev |
912 |
|
59 |
iliev |
1785 |
public final static ImageIcon gfxMuteOff |
60 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_off.png")); |
61 |
iliev |
912 |
|
62 |
iliev |
1785 |
public final static ImageIcon gfxMuteSmallOn |
63 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_s_on.png")); |
64 |
|
|
|
65 |
iliev |
1785 |
public final static ImageIcon gfxMuteSmallOff |
66 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_s_off.png")); |
67 |
|
|
|
68 |
iliev |
1785 |
public final static ImageIcon gfxMuteSoloDisabled |
69 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_solo_disabled.png")); |
70 |
iliev |
1143 |
|
71 |
iliev |
1785 |
public final static ImageIcon gfxMutedBySolo |
72 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_off.png")); |
73 |
iliev |
912 |
|
74 |
iliev |
1785 |
public final static ImageIcon gfxMutedBySoloSmall |
75 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_s_off.png")); |
76 |
|
|
|
77 |
iliev |
1785 |
public final static ImageIcon gfxSoloOn |
78 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_solo_on.png")); |
79 |
iliev |
912 |
|
80 |
iliev |
1785 |
public final static ImageIcon gfxSoloOff |
81 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_mute_off.png")); |
82 |
iliev |
912 |
|
83 |
iliev |
1785 |
public final static ImageIcon gfxSoloSmallOn |
84 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_solo_s_on.png")); |
85 |
|
|
|
86 |
iliev |
1785 |
public final static ImageIcon gfxSoloSmallOff |
87 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_solo_s_off.png")); |
88 |
|
|
|
89 |
iliev |
1785 |
public final static ImageIcon gfxMuteTitle |
90 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_mute.png")); |
91 |
iliev |
912 |
|
92 |
iliev |
1785 |
public final static ImageIcon gfxSoloTitle |
93 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_solo.png")); |
94 |
iliev |
912 |
|
95 |
iliev |
1785 |
public final static ImageIcon gfxVolumeTitle |
96 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_volume.png")); |
97 |
iliev |
912 |
|
98 |
iliev |
1785 |
public final static ImageIcon gfxVolumeDial |
99 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/knob_volume.png")); |
100 |
iliev |
912 |
|
101 |
iliev |
1785 |
public final static ImageIcon gfxOptionsTitle |
102 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_options.png")); |
103 |
iliev |
912 |
|
104 |
iliev |
1785 |
public final static ImageIcon gfxOptionsOn |
105 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_hide_channel_options.png")); |
106 |
iliev |
912 |
|
107 |
iliev |
1785 |
public final static ImageIcon gfxOptionsOnRO |
108 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_hide_channel_options_ro.png")); |
109 |
iliev |
1143 |
|
110 |
iliev |
1785 |
public final static ImageIcon gfxOptionsOff |
111 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_show_channel_options.png")); |
112 |
iliev |
912 |
|
113 |
iliev |
1785 |
public final static ImageIcon gfxOptionsOffRO |
114 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_show_channel_options_ro.png")); |
115 |
iliev |
1143 |
|
116 |
iliev |
1785 |
public final static ImageIcon gfxFx |
117 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_fx.png")); |
118 |
|
|
|
119 |
iliev |
1785 |
public final static ImageIcon gfxFxRO |
120 |
iliev |
1732 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_fx_ro.png")); |
121 |
|
|
|
122 |
iliev |
1785 |
public final static ImageIcon gfxMidiInputTitle |
123 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_midi_input.png")); |
124 |
iliev |
912 |
|
125 |
iliev |
1785 |
public final static ImageIcon gfxEngineTitle |
126 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_engine.png")); |
127 |
iliev |
912 |
|
128 |
iliev |
1785 |
public final static ImageIcon gfxAudioOutputTitle |
129 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_audio_output.png")); |
130 |
iliev |
912 |
|
131 |
iliev |
1785 |
public final static ImageIcon gfxInstrumentMapTitle |
132 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/title_midi_instrument_map.png")); |
133 |
|
|
|
134 |
iliev |
1785 |
public final static ImageIcon gfxChannel |
135 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/channel.png")); |
136 |
|
|
|
137 |
iliev |
1785 |
public final static ImageIcon gfxChannelScreen |
138 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/channel.screen.png")); |
139 |
|
|
|
140 |
iliev |
1785 |
public final static ImageIcon gfxHLine |
141 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/line_hor.png")); |
142 |
|
|
|
143 |
iliev |
1785 |
public final static ImageIcon gfxVLine |
144 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/line_vert.png")); |
145 |
|
|
|
146 |
iliev |
1785 |
public final static ImageIcon gfxChannelOptions |
147 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/channel.options.png")); |
148 |
|
|
|
149 |
iliev |
1785 |
public final static ImageIcon gfxCreateChannel |
150 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/create_channel.png")); |
151 |
|
|
|
152 |
iliev |
1785 |
public final static ImageIcon gfxTextField |
153 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/tf_bg.png")); |
154 |
|
|
|
155 |
iliev |
1785 |
public final static ImageIcon gfxCbLabelBg |
156 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/cb_label_bg.png")); |
157 |
|
|
|
158 |
iliev |
1785 |
public final static ImageIcon gfxCbArrow |
159 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/cb_arrow.png")); |
160 |
|
|
|
161 |
iliev |
1785 |
public final static ImageIcon gfxCbArrowDisabled |
162 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/cb_arrow_disabled.png")); |
163 |
|
|
|
164 |
iliev |
1785 |
public final static ImageIcon gfxCbArrowRO |
165 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/cb_arrow_ro.png")); |
166 |
|
|
|
167 |
iliev |
1785 |
public final static ImageIcon gfxPowerOn18 |
168 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/power_on18.png")); |
169 |
|
|
|
170 |
iliev |
1785 |
public final static ImageIcon gfxPowerOff18 |
171 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/power_off18.png")); |
172 |
|
|
|
173 |
iliev |
1785 |
public final static ImageIcon gfxDeviceBg |
174 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/device_bg.png")); |
175 |
|
|
|
176 |
iliev |
1785 |
public final static ImageIcon gfxRoundBg14 |
177 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/round_bg14.png")); |
178 |
iliev |
1785 |
public final static ImageIcon gfxRoundBg7 |
179 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/round_bg7.png")); |
180 |
iliev |
1785 |
public final static ImageIcon gfxMenuBarBg |
181 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/menubar_bg.png")); |
182 |
|
|
|
183 |
iliev |
1785 |
public final static ImageIcon gfxScreenBtnBg |
184 |
iliev |
1341 |
= new ImageIcon(Res.class.getResource("res/gfx/screen_btn_bg.png")); |
185 |
iliev |
1285 |
|
186 |
iliev |
1341 |
|
187 |
iliev |
1785 |
public final static ImageIcon gfxChannelsBg |
188 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/channels_bg.png")); |
189 |
|
|
|
190 |
iliev |
1785 |
public static ImageIcon gfxToolBar; |
191 |
|
|
public static Insets insetsToolBar; |
192 |
iliev |
1285 |
|
193 |
iliev |
1785 |
public final static ImageIcon gfxBorder |
194 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/border.png")); |
195 |
|
|
|
196 |
iliev |
1785 |
public final static ImageIcon gfxBtnCr |
197 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_cr.png")); |
198 |
|
|
|
199 |
iliev |
1785 |
public final static ImageIcon gfxBtnCrRO |
200 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_cr_ro.png")); |
201 |
|
|
|
202 |
iliev |
1785 |
public final static ImageIcon gfxBtnDecrease |
203 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_decrease.png")); |
204 |
iliev |
1355 |
|
205 |
iliev |
1785 |
public final static ImageIcon gfxBtnDecreaseRO |
206 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_decrease_ro.png")); |
207 |
|
|
|
208 |
iliev |
1785 |
public final static ImageIcon gfxBtnIncrease |
209 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_increase.png")); |
210 |
|
|
|
211 |
iliev |
1785 |
public final static ImageIcon gfxBtnIncreaseRO |
212 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_increase_ro.png")); |
213 |
|
|
|
214 |
iliev |
1785 |
public final static ImageIcon gfxBtnScrollLeft |
215 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_scroll_left.png")); |
216 |
|
|
|
217 |
iliev |
1785 |
public final static ImageIcon gfxBtnScrollLeftRO |
218 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_scroll_left_ro.png")); |
219 |
|
|
|
220 |
iliev |
1785 |
public final static ImageIcon gfxBtnScrollRight |
221 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_scroll_right.png")); |
222 |
|
|
|
223 |
iliev |
1785 |
public final static ImageIcon gfxBtnScrollRightRO |
224 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/gfx/btn_scroll_right_ro.png")); |
225 |
|
|
|
226 |
|
|
|
227 |
iliev |
1785 |
public final static ImageIcon iconAppIcon |
228 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/app_icon.png")); |
229 |
|
|
|
230 |
iliev |
1785 |
public final static ImageIcon iconArrowUp |
231 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/icons/arrow_up.png")); |
232 |
|
|
|
233 |
iliev |
1785 |
public final static ImageIcon iconArrowDown |
234 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/icons/arrow_down.png")); |
235 |
|
|
|
236 |
iliev |
1785 |
public final static ImageIcon iconEngine12 |
237 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/engine12.png")); |
238 |
|
|
|
239 |
iliev |
1785 |
public final static ImageIcon iconVolume14 |
240 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/volume14.png")); |
241 |
|
|
|
242 |
iliev |
1785 |
public final static ImageIcon iconNew16 |
243 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/new16.png")); |
244 |
|
|
|
245 |
iliev |
1785 |
public final static ImageIcon iconEdit16 |
246 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/edit16.png")); |
247 |
|
|
|
248 |
iliev |
1785 |
public final static ImageIcon iconDelete16 |
249 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/delete16.png")); |
250 |
|
|
|
251 |
iliev |
1785 |
public final static ImageIcon iconBack16 |
252 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/back16.png")); |
253 |
|
|
|
254 |
iliev |
1785 |
public final static ImageIcon iconNext16 |
255 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/next16.png")); |
256 |
|
|
|
257 |
iliev |
1785 |
public final static ImageIcon iconUp16 |
258 |
iliev |
1752 |
= new ImageIcon(Res.class.getResource("res/icons/up16.png")); |
259 |
|
|
|
260 |
iliev |
1785 |
public final static ImageIcon iconBrowse16 |
261 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/folder_open16.png")); |
262 |
|
|
|
263 |
iliev |
1785 |
public final static ImageIcon iconDb16 |
264 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/collection16.png")); |
265 |
|
|
|
266 |
iliev |
1785 |
public final static ImageIcon iconFolder16 |
267 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/folder16.png")); |
268 |
|
|
|
269 |
iliev |
1785 |
public final static ImageIcon iconFolderOpen16 |
270 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/folder_open16.png")); |
271 |
|
|
|
272 |
iliev |
1785 |
public final static ImageIcon iconInstrument16 |
273 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/instr16.png")); |
274 |
|
|
|
275 |
iliev |
1785 |
public final static ImageIcon iconReload16 |
276 |
iliev |
1752 |
= new ImageIcon(Res.class.getResource("res/icons/reload16.png")); |
277 |
|
|
|
278 |
iliev |
1785 |
public final static ImageIcon iconPreferences16 |
279 |
iliev |
1752 |
= new ImageIcon(Res.class.getResource("res/icons/preferences16.png")); |
280 |
|
|
|
281 |
iliev |
2195 |
public final static ImageIcon iconSampler16 |
282 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/sampler16.png")); |
283 |
|
|
|
284 |
iliev |
2200 |
public final static ImageIcon iconSamplerChannel16 |
285 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/schannel16.png")); |
286 |
|
|
|
287 |
|
|
public final static ImageIcon iconFxSend16 |
288 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/fx-send16.png")); |
289 |
|
|
|
290 |
|
|
public final static ImageIcon iconDestEffect16 |
291 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/dest-effect16.png")); |
292 |
|
|
|
293 |
iliev |
2195 |
public final static ImageIcon iconAudioDevsOpen16 |
294 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/au-devs-folder_open16.png")); |
295 |
|
|
|
296 |
|
|
public final static ImageIcon iconAudioDevsClose16 |
297 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/au-devs-folder16.png")); |
298 |
|
|
|
299 |
|
|
public final static ImageIcon iconAudioDev16 |
300 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/au-dev16.png")); |
301 |
|
|
|
302 |
|
|
public final static ImageIcon iconEffectsOpen16 |
303 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effects-folder_open16.png")); |
304 |
|
|
|
305 |
|
|
public final static ImageIcon iconEffectsClose16 |
306 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effects-folder16.png")); |
307 |
|
|
|
308 |
|
|
public final static ImageIcon iconEffect16 |
309 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effect16.png")); |
310 |
|
|
|
311 |
|
|
public final static ImageIcon iconEffectInstance16 |
312 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effect-instance16.png")); |
313 |
|
|
|
314 |
iliev |
2200 |
public final static ImageIcon iconEffectInstanceLnk16 |
315 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effect-instance-lnk16.png")); |
316 |
|
|
|
317 |
iliev |
2195 |
public final static ImageIcon iconEffectChain16 |
318 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/effect-chain16.png")); |
319 |
|
|
|
320 |
|
|
public final static ImageIcon iconEffectChainsOpen16 |
321 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/chains-folder_open16.png")); |
322 |
|
|
|
323 |
|
|
public final static ImageIcon iconEffectChainsClose16 |
324 |
|
|
= new ImageIcon(Res.class.getResource("res/icons/chains-folder16.png")); |
325 |
|
|
|
326 |
iliev |
1785 |
public final static ImageIcon iconVolume22 |
327 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/volume22.png")); |
328 |
|
|
|
329 |
iliev |
1785 |
public final static ImageIcon iconFind22 |
330 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/Find22.png")); |
331 |
|
|
|
332 |
iliev |
1785 |
public final static ImageIcon iconGoUp22 |
333 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/GoUp22.png")); |
334 |
|
|
|
335 |
iliev |
1785 |
public final static ImageIcon iconGoBack22 |
336 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/GoBack22.png")); |
337 |
|
|
|
338 |
iliev |
1785 |
public final static ImageIcon iconGoForward22 |
339 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/GoForward22.png")); |
340 |
|
|
|
341 |
iliev |
1785 |
public final static ImageIcon iconFolderOpen22 |
342 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/folder_open22.png")); |
343 |
|
|
|
344 |
iliev |
1785 |
public final static ImageIcon iconPreferences22 |
345 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/Preferences22.png")); |
346 |
|
|
|
347 |
iliev |
1785 |
public final static ImageIcon iconReload22 |
348 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/reload22.png")); |
349 |
|
|
|
350 |
iliev |
1785 |
public final static ImageIcon iconSamplerInfo32 |
351 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/sampler_info32.png")); |
352 |
|
|
|
353 |
iliev |
1785 |
public final static ImageIcon iconOpen32 |
354 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/open32.png")); |
355 |
|
|
|
356 |
iliev |
1785 |
public final static ImageIcon iconSave32 |
357 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/save32.png")); |
358 |
|
|
|
359 |
iliev |
1785 |
public final static ImageIcon iconReload32 |
360 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/reload32.png")); |
361 |
|
|
|
362 |
iliev |
1785 |
public final static ImageIcon iconReset32 |
363 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/purge32.png")); |
364 |
|
|
|
365 |
iliev |
1785 |
public final static ImageIcon iconPreferences32 |
366 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/preferences32.png")); |
367 |
|
|
|
368 |
iliev |
1785 |
public final static ImageIcon iconMidiKeyboard32 |
369 |
iliev |
1778 |
= new ImageIcon(Res.class.getResource("res/icons/midi_keyboard32.png")); |
370 |
|
|
|
371 |
iliev |
1785 |
public final static ImageIcon iconLSConsole32 |
372 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/ls_console32.png")); |
373 |
|
|
|
374 |
iliev |
1785 |
public final static ImageIcon iconLSConsole |
375 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/ls_console.png")); |
376 |
|
|
|
377 |
iliev |
1785 |
public final static ImageIcon iconDb32 |
378 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/db32.png")); |
379 |
|
|
|
380 |
iliev |
1785 |
public final static ImageIcon iconWarning32 |
381 |
iliev |
1355 |
= new ImageIcon(Res.class.getResource("res/icons/warning32.png")); |
382 |
|
|
|
383 |
iliev |
1785 |
public final static ImageIcon iconQuestion32 |
384 |
iliev |
1567 |
= new ImageIcon(Res.class.getResource("res/icons/question32.png")); |
385 |
|
|
|
386 |
iliev |
1785 |
public final static ImageIcon iconLinuxSamplerLogo |
387 |
iliev |
1285 |
= new ImageIcon(Res.class.getResource("res/icons/LinuxSampler-logo.png")); |
388 |
|
|
|
389 |
iliev |
1785 |
public static Font fontScreen = null; |
390 |
|
|
public static Font fontScreenMono = null; |
391 |
iliev |
1285 |
|
392 |
|
|
|
393 |
|
|
static { |
394 |
|
|
try { |
395 |
|
|
fontScreen = Font.createFont ( |
396 |
|
|
Font.TRUETYPE_FONT, |
397 |
iliev |
1496 |
Res.class.getResourceAsStream("res/fonts/DejaVuLGCCondensedSansBold.ttf") |
398 |
iliev |
1285 |
); |
399 |
|
|
fontScreen = fontScreen.deriveFont(10.0f); |
400 |
iliev |
1496 |
|
401 |
|
|
fontScreenMono = Font.createFont ( |
402 |
|
|
Font.TRUETYPE_FONT, |
403 |
|
|
Res.class.getResourceAsStream("res/fonts/DejaVuLGCMonoSansBold.ttf") |
404 |
|
|
); |
405 |
|
|
fontScreenMono = fontScreenMono.deriveFont(10.0f); |
406 |
iliev |
1285 |
} catch(Exception e) { |
407 |
|
|
CC.getLogger().warning(HF.getErrorMessage(e)); |
408 |
|
|
} |
409 |
|
|
} |
410 |
iliev |
1496 |
|
411 |
|
|
protected static void |
412 |
|
|
loadTheme(String themeName) { |
413 |
|
|
try { |
414 |
|
|
Properties p = new Properties(); |
415 |
|
|
p.load(Res.class.getResourceAsStream("res/themes/themes.properties")); |
416 |
|
|
|
417 |
|
|
String path = p.getProperty(themeName); |
418 |
|
|
if(path == null) { |
419 |
|
|
String s = "Failed to load theme " + themeName; |
420 |
|
|
s += "! Falling back to the default theme..."; |
421 |
|
|
CC.getLogger().warning(s); |
422 |
|
|
path = p.getProperty("Graphite"); |
423 |
|
|
if(path == null) { |
424 |
|
|
CC.getLogger().warning("Failed to load the default theme!"); |
425 |
|
|
CC.cleanExit(); |
426 |
|
|
return; |
427 |
|
|
} |
428 |
|
|
} |
429 |
|
|
|
430 |
|
|
path = "res/" + path; |
431 |
|
|
if(path.charAt(path.length() - 1) != '/') path += "/"; |
432 |
|
|
path += "theme.properties"; |
433 |
|
|
p.load(Res.class.getResourceAsStream(path)); |
434 |
|
|
|
435 |
|
|
String s = "res/" + p.getProperty("FantasiaLogo.gfx"); |
436 |
|
|
gfxFantasiaLogo = new ImageIcon(Res.class.getResource(s)); |
437 |
|
|
|
438 |
|
|
s = "res/" + p.getProperty("StandardBar.gfx"); |
439 |
|
|
gfxToolBar = new ImageIcon(Res.class.getResource(s)); |
440 |
|
|
|
441 |
|
|
insetsToolBar = parseInsets(p.getProperty("StandardBar.insets")); |
442 |
|
|
} catch(Exception e) { |
443 |
|
|
CC.getLogger().log(Level.INFO, "Failed to load theme " + themeName, e); |
444 |
|
|
CC.cleanExit(); |
445 |
|
|
} |
446 |
|
|
} |
447 |
|
|
|
448 |
|
|
private static Insets |
449 |
|
|
parseInsets(String s) { |
450 |
|
|
Insets i = new Insets(0, 0, 0, 0); |
451 |
|
|
try { |
452 |
|
|
Integer[] list = Parser.parseIntList(s); |
453 |
|
|
if(list.length != 4) throw new Exception(); |
454 |
|
|
i.set(list[0], list[1], list[2], list[3]); |
455 |
|
|
} catch(Exception x) { |
456 |
|
|
CC.getLogger().warning("Failed to parse insets: " + s); |
457 |
|
|
} |
458 |
|
|
|
459 |
|
|
return i; |
460 |
|
|
} |
461 |
iliev |
912 |
} |