1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2007 Grigor Iliev <grigor@grigoriliev.com> |
* Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com> |
5 |
* |
* |
6 |
* This file is part of JSampler. |
* This file is part of JSampler. |
7 |
* |
* |
92 |
public final static String VOL_MEASUREMENT_UNIT_DECIBEL = "volMeasurementUnitDecibel"; |
public final static String VOL_MEASUREMENT_UNIT_DECIBEL = "volMeasurementUnitDecibel"; |
93 |
|
|
94 |
/** |
/** |
95 |
|
* Property which specifies whether the MIDI instrument maps |
96 |
|
* should be included in the session script. |
97 |
|
*/ |
98 |
|
public final static String EXPORT_MIDI_MAPS_TO_SESSION_SCRIPT = "exportMidiMapsToSessionScript"; |
99 |
|
|
100 |
|
/** |
101 |
|
* Property which specifies whether to set the MIDI instrument loading |
102 |
|
* in background when exporting MIDI instrument maps to LSCP script. |
103 |
|
*/ |
104 |
|
public final static String LOAD_MIDI_INSTRUMENTS_IN_BACKGROUND = "loadMidiInstrumentsInBackground"; |
105 |
|
|
106 |
|
/** |
107 |
* Property which specifies whether the user should manually select a server to connect on startup. |
* Property which specifies whether the user should manually select a server to connect on startup. |
108 |
*/ |
*/ |
109 |
public final static String MANUAL_SERVER_SELECT_ON_STARTUP = "manualServerSelectOnStartup"; |
public final static String MANUAL_SERVER_SELECT_ON_STARTUP = "manualServerSelectOnStartup"; |
113 |
*/ |
*/ |
114 |
public final static String SERVER_INDEX = "serverIndex"; |
public final static String SERVER_INDEX = "serverIndex"; |
115 |
|
|
116 |
|
/** |
117 |
|
* Property specifying the MIDI bank numbering, whether |
118 |
|
* the index of the first MIDI bank is 0 or 1 (zero-based or one-based). |
119 |
|
*/ |
120 |
|
public final static String FIRST_MIDI_BANK_NUMBER = "firstMidiBankNumber"; |
121 |
|
|
122 |
|
/** |
123 |
|
* Property specifying the MIDI program numbering, whether |
124 |
|
* the index of the first MIDI program is 0 or 1 (zero-based or one-based). |
125 |
|
*/ |
126 |
|
public final static String FIRST_MIDI_PROGRAM_NUMBER = "firstMidiProgramNumber"; |
127 |
|
|
128 |
|
/** Property representing the socket read timeout (in seconds). */ |
129 |
|
public final static String SOCKET_READ_TIMEOUT = "socketReadTimeout"; |
130 |
|
|
131 |
|
|
132 |
private final String pathName; |
private final String pathName; |
133 |
private final Preferences userPrefs; |
private final Preferences userPrefs; |
298 |
* @see #getIntProperty(String name) |
* @see #getIntProperty(String name) |
299 |
*/ |
*/ |
300 |
public int |
public int |
301 |
getDefaultIntValue(String name) { return 0; } |
getDefaultIntValue(String name) { |
302 |
|
if(name == SOCKET_READ_TIMEOUT) return 90; |
303 |
|
if(name == FIRST_MIDI_BANK_NUMBER) return 1; |
304 |
|
if(name == FIRST_MIDI_PROGRAM_NUMBER) return 1; |
305 |
|
return 0; |
306 |
|
} |
307 |
|
|
308 |
/** |
/** |
309 |
* Sets an integer property. |
* Sets an integer property. |
361 |
public boolean |
public boolean |
362 |
getDefaultBoolValue(String name) { |
getDefaultBoolValue(String name) { |
363 |
if(name == VOL_MEASUREMENT_UNIT_DECIBEL) return true; |
if(name == VOL_MEASUREMENT_UNIT_DECIBEL) return true; |
364 |
|
if(name == EXPORT_MIDI_MAPS_TO_SESSION_SCRIPT) return true; |
365 |
|
if(name == LOAD_MIDI_INSTRUMENTS_IN_BACKGROUND) return true; |
366 |
return false; |
return false; |
367 |
} |
} |
368 |
} |
} |