]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.trend/src/org/simantics/trend/configuration/TrendSpec.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / configuration / TrendSpec.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 java.util.Collections;\r
14 import java.util.List;\r
15 \r
16 import org.simantics.databoard.util.Bean;\r
17 \r
18 /**\r
19  * \r
20  * @author Toni Kalajainen <toni.kalajainen@vtt.fi>\r
21  */\r
22 public class TrendSpec extends Bean {\r
23 \r
24         public static final TrendSpec EMPTY;\r
25         \r
26         public String name = "Title Here";\r
27 \r
28         public YAxisMode axisMode;\r
29         \r
30         public ViewProfile viewProfile;\r
31 \r
32         /**\r
33          * Set externally to indicate that currently an experiment is running which\r
34          * means {@link ViewProfile#trackExperimentTime} setting should be enforced.\r
35          */\r
36         public transient boolean experimentIsRunning;\r
37 \r
38         /** Trend items */\r
39         public List<TrendItem> items;\r
40 \r
41         static {\r
42                  EMPTY = new TrendSpec();\r
43                  EMPTY.init();\r
44         }\r
45         \r
46         /**\r
47          * Sort items by index, label1, label2\r
48          */\r
49         public void sortItems()\r
50         {\r
51                 Collections.sort(items);\r
52         }\r
53         \r
54 }\r