1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.simulation.ui.preferences;
14 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
17 * Constant definitions for plug-in preferences
19 public final class SimulationPreferences {
21 public static final String P_SIMULATION_STEP_DURATION = "simulation.step.duration";
23 public static final double DEFAULT_SIMULATION_STEP_DURATION = 0.1;
25 public static final SimulationPreferences DEFAULT_PREFS
26 = new SimulationPreferences(null, DEFAULT_SIMULATION_STEP_DURATION);
28 public final IEclipsePreferences prefs;
29 public final double stepDuration;
31 public SimulationPreferences(double stepDuration) {
32 this(null, stepDuration);
35 public SimulationPreferences(IEclipsePreferences prefs, double stepDuration) {
37 this.stepDuration = stepDuration;
41 public String toString() {
42 return getClass().getSimpleName() + "[step duration=" + stepDuration + "]";