1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005 Grigor Kirilov Iliev |
* Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
35 |
private final static String VIEW = "VIEW"; |
private final static String VIEW = "VIEW"; |
36 |
private final static String DEF_VIEW = "classic"; |
private final static String DEF_VIEW = "classic"; |
37 |
|
|
38 |
|
private final static String JSAMPLER_HOME = "JSampler.home"; |
39 |
|
private final static String DEF_JSAMPLER_HOME = null; |
40 |
|
|
41 |
private final static String INTERFACE_LANGUAGE = "iface.language"; |
private final static String INTERFACE_LANGUAGE = "iface.language"; |
42 |
private final static String DEF_INTERFACE_LANGUAGE = "en"; |
private final static String DEF_INTERFACE_LANGUAGE = "en"; |
43 |
|
|
160 |
|
|
161 |
// PREFERENCES |
// PREFERENCES |
162 |
/** |
/** |
163 |
|
* Gets the absolute path of JSampler home directory. |
164 |
|
* @return The absolute path of JSampler home directory or |
165 |
|
* <code>null</code> if the JSampler home directory is not set. |
166 |
|
*/ |
167 |
|
public static String |
168 |
|
getJSamplerHome() { return user().get(JSAMPLER_HOME, DEF_JSAMPLER_HOME); } |
169 |
|
|
170 |
|
/** |
171 |
|
* Sets the JSampler home directory. |
172 |
|
* @param home The absolute path of JSampler home directory. |
173 |
|
* @return <code>true</code> if the JSampler home directory has |
174 |
|
* been changed and <code>false</code> otherwise. |
175 |
|
*/ |
176 |
|
public static boolean |
177 |
|
setJSamplerHome(String home) { |
178 |
|
if(home == null) { |
179 |
|
if(getJSamplerHome() == null) return false; |
180 |
|
user().remove(JSAMPLER_HOME); |
181 |
|
return true; |
182 |
|
} else if(!home.equals(getJSamplerHome())) { |
183 |
|
user().put(JSAMPLER_HOME, home); |
184 |
|
return true; |
185 |
|
} |
186 |
|
return false; |
187 |
|
} |
188 |
|
|
189 |
|
/** |
190 |
* Gets the LinuxSampler address. |
* Gets the LinuxSampler address. |
191 |
* @return The LinuxSampler address. |
* @return The LinuxSampler address. |
192 |
*/ |
*/ |