]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.trend/src/org/simantics/trend/configuration/Scale.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / configuration / Scale.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
3  * All rights reserved. This program and the accompanying materials\r
4  * are made available under the terms of the Eclipse Public License v1.0\r
5  * which accompanies this distribution, and is available at\r
6  * http://www.eclipse.org/legal/epl-v10.html\r
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.trend.configuration;\r
12 \r
13 import org.simantics.databoard.annotations.Union;\r
14 \r
15 @Union({Scale.Manual.class, Scale.Auto.class})\r
16 public class Scale {\r
17 \r
18         public static class Manual extends Scale {\r
19                 public double min, max;\r
20                 public Manual() {}\r
21                 public Manual(double min, double max) {\r
22                         this.min = min;\r
23                         this.max = max;\r
24                 }\r
25                 @Override\r
26                 public String toString() {\r
27                         return "Manual";\r
28                 }\r
29         }\r
30         \r
31         // Fit all samples\r
32         public static class Auto extends Scale {\r
33                 @Override\r
34                 public String toString() {\r
35                         return "Auto";\r
36                 }\r
37         }\r
38         \r
39 }\r
40 \r