]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.charts/src/org/simantics/charts/preference/ChartPreferenceInitializer.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / preference / ChartPreferenceInitializer.java
1 /*******************************************************************************
2  * Copyright (c) 2011 Association for Decentralized Information Management in
3  * Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.charts.preference;
13
14 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
15 import org.eclipse.core.runtime.preferences.DefaultScope;
16 import org.eclipse.core.runtime.preferences.IScopeContext;
17 import org.osgi.service.prefs.Preferences;
18 import org.simantics.charts.Activator;
19
20 /**
21  * @author Toni Kalajainen
22  */
23 public class ChartPreferenceInitializer extends AbstractPreferenceInitializer {
24
25     public void initializeDefaultPreferences() {
26         IScopeContext context = DefaultScope.INSTANCE;
27         Preferences node = context.getNode(Activator.PLUGIN_ID);
28
29         node.putLong(ChartPreferences.P_REDRAW_INTERVAL, ChartPreferences.DEFAULT_REDRAW_INTERVAL);
30         node.putLong(ChartPreferences.P_AUTOSCALE_INTERVAL, ChartPreferences.DEFAULT_AUTOSCALE_INTERVAL);
31         node.putBoolean(ChartPreferences.P_DRAW_SAMPLES, ChartPreferences.DEFAULT_DRAW_SAMPLES);
32         node.put(ChartPreferences.P_TIMEFORMAT, ChartPreferences.DEFAULT_TIMEFORMAT);
33         node.put(ChartPreferences.P_VALUEFORMAT, ChartPreferences.DEFAULT_VALUEFORMAT);
34         node.put(ChartPreferences.P_TIMEWINDOW_TEMPLATE, ChartPreferences.DEFAULT_TIMEWINDOW_TEMPLATE);
35         node.put(ChartPreferences.P_DRAWMODE, ChartPreferences.DEFAULT_DRAWMODE);
36         node.put(ChartPreferences.P_AXISMODE, ChartPreferences.DEFAULT_AXISMODE);
37         node.put(ChartPreferences.P_SCALEMODE, ChartPreferences.DEFAULT_SCALEMODE);
38         node.put(ChartPreferences.P_ITEMPLACEMENT, ChartPreferences.DEFAULT_ITEMPLACEMENT);
39     }
40
41 }