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