]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.template2d.ui/src/org/simantics/modeling/template2d/ui/function/FlagTableInfo.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling.template2d.ui / src / org / simantics / modeling / template2d / ui / function / FlagTableInfo.java
1 /*******************************************************************************\r
2  * Copyright (c) 2012 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.modeling.template2d.ui.function;\r
13 \r
14 import java.awt.geom.AffineTransform;\r
15 import java.util.ArrayList;\r
16 import java.util.List;\r
17 \r
18 import org.simantics.databoard.annotations.Identifier;\r
19 import org.simantics.databoard.annotations.Optional;\r
20 import org.simantics.databoard.util.Bean;\r
21 \r
22 public class FlagTableInfo extends Bean.Id {\r
23         @Identifier\r
24         private double[] transform = new double[] { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };\r
25         @Identifier\r
26         private Float width = 0.0F;\r
27         @Identifier\r
28         private Float rowHeight = 10.0F;\r
29         @Identifier\r
30         private Integer rowCount = -1;\r
31         @Identifier\r
32         private Float weightTotal = 0.0F;\r
33         @Identifier\r
34         @Optional\r
35         private Integer alignment = null;\r
36         @Identifier\r
37         public List<FlagTableColumnInfo> columns = new ArrayList<FlagTableColumnInfo>();\r
38 \r
39         public transient AffineTransform affineTransform;\r
40 \r
41         public FlagTableInfo(){\r
42         }\r
43         \r
44         public void addColumn(FlagTableColumnInfo column){\r
45                 columns.add(column);\r
46         }\r
47         \r
48         public void setWeightTotal(Float total){\r
49                 weightTotal = total;\r
50         }\r
51 \r
52         public double[] getTransform(){\r
53                 return transform;\r
54         }\r
55         \r
56         public void setTransform(double[] transform){\r
57                 this.transform = transform;\r
58         }\r
59 \r
60         public Float getWidth() {\r
61                 return width;\r
62         }\r
63 \r
64         public void setWidth(Float width) {\r
65                 this.width = width;\r
66         }\r
67 \r
68         public Float getRowHeight() {\r
69                 return rowHeight;\r
70         }\r
71 \r
72         public void setRowHeight(Float rowHeigth) {\r
73                 this.rowHeight = rowHeigth;\r
74         }\r
75 \r
76         public Integer getRowCount() {\r
77                 return rowCount;\r
78         }\r
79 \r
80         public void setRowCount(Integer rowCount) {\r
81                 this.rowCount = rowCount;\r
82         }\r
83 \r
84         public Integer getAlignment() {\r
85                 return alignment;\r
86         }\r
87 \r
88         public void setAlignment(Integer alignment) {\r
89                 this.alignment = alignment;\r
90         }\r
91 \r
92         public Float getWeightTotal() {\r
93                 return weightTotal;\r
94         }\r
95 }\r