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