]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/FlagTextInfo.java
Fix NPE from flagTransform
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / adapter / FlagTextInfo.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.diagram.adapter;
13
14 import org.simantics.databoard.Bindings;
15 import org.simantics.databoard.annotations.Optional;
16 import org.simantics.databoard.binding.Binding;
17 import org.simantics.databoard.util.Bean;
18 import org.simantics.datatypes.literal.Font;
19 import org.simantics.datatypes.literal.RGB;
20 import org.simantics.g2d.utils.Alignment;
21
22 /**
23  * @author Teemu Mätäsniemi
24  * @author Tuukka Lehtonen
25  */
26 public class FlagTextInfo extends Bean {
27
28     public static final Binding BINDING = Bindings.getBindingUnchecked(FlagTextInfo.class);
29
30     public String id;
31
32     @Optional
33     public Font font;
34     @Optional
35     public RGB.Integer color;
36     @Optional
37     public String text;
38
39     @Optional
40     public double[] transform;
41
42     public Alignment hAlignment;
43     public Alignment vAlignment;
44
45     public float width = -1.0f;
46     public float borderWidth = -1.0f;
47     public boolean wrapText = true;
48
49     @Optional
50     public RGB.Integer borderColor;
51     @Optional
52     public RGB.Integer backgroundColor;
53
54     public FlagTextInfo() {
55         super(BINDING);
56     }
57
58 }