01: package net.refractions.udig.render.wms.basic.preferences;
02:
03: import net.refractions.udig.render.wms.basic.WMSPlugin;
04:
05: import org.eclipse.core.runtime.Platform;
06: import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
07: import org.eclipse.jface.preference.IPreferenceStore;
08:
09: /**
10: * Class used to initialize default preference values.
11: */
12: public class PreferenceInitializer extends
13: AbstractPreferenceInitializer {
14:
15: /*
16: * (non-Javadoc)
17: *
18: * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
19: */
20: @Override
21: public void initializeDefaultPreferences() {
22: IPreferenceStore store = WMSPlugin.getDefault()
23: .getPreferenceStore();
24: if (Platform.getOS().equals(Platform.OS_MACOSX)) {
25: store
26: .setDefault(PreferenceConstants.P_IMAGE_TYPE_ORDER,
27: "image/gif,image/tiff,image/bmp,image/jpeg,image/png"); //$NON-NLS-1$
28: } else {
29: store
30: .setDefault(PreferenceConstants.P_IMAGE_TYPE_ORDER,
31: "image/png,image/gif,image/tiff,image/bmp,image/jpeg"); //$NON-NLS-1$
32: }
33: store.setDefault(PreferenceConstants.P_USE_DEFAULT_ORDER, true);
34: }
35:
36: }
|