JAL-1551 spotlessApply
[jalview.git] / src / jalview / datamodel / annotations / AnnotationRowBuilder.java
1 package jalview.datamodel.annotations;
2
3 import jalview.datamodel.Annotation;
4 import jalview.structure.StructureImportSettings;
5 import jalview.structure.StructureImportSettings.TFType;
6
7 public class AnnotationRowBuilder
8 {
9
10   String name;
11
12   boolean hasDescription = false;
13
14   String description;
15
16   boolean hasMinMax = false;
17
18   /**
19    * the type of temperature factor plot (if it is one)
20    */
21   private StructureImportSettings.TFType tfType = StructureImportSettings.TFType.DEFAULT;
22
23   public void setTFType(StructureImportSettings.TFType t)
24   {
25     tfType = t;
26   }
27
28   public StructureImportSettings.TFType getTFType()
29   {
30     return tfType;
31   }
32
33   public String getName()
34   {
35     return name;
36   }
37
38   public void setName(String name)
39   {
40     this.name = name;
41   }
42
43   public boolean isHasDescription()
44   {
45     return hasDescription;
46   }
47
48   public void setHasDescription(boolean hasDescription)
49   {
50     this.hasDescription = hasDescription;
51   }
52
53   public String getDescription()
54   {
55     return description;
56   }
57
58   public void setDescription(String description)
59   {
60     this.description = description;
61   }
62
63   public boolean isHasMinMax()
64   {
65     return hasMinMax;
66   }
67
68   public void setHasMinMax(boolean hasMinMax)
69   {
70     this.hasMinMax = hasMinMax;
71   }
72
73   public float getMin()
74   {
75     return min;
76   }
77
78   public void setMin(float min)
79   {
80     this.min = min;
81   }
82
83   public float getMax()
84   {
85     return max;
86   }
87
88   public void setMax(float max)
89   {
90     this.max = max;
91   }
92
93   float min, max;
94
95   public AnnotationRowBuilder(String string)
96   {
97     name = string;
98   }
99
100   public AnnotationRowBuilder(String name, float min, float max,
101           StructureImportSettings.TFType tft)
102   {
103     this(name, min, max);
104     setTFType(tft);
105   }
106
107   public AnnotationRowBuilder(String name, float min, float max)
108   {
109     this(name);
110     this.min = min;
111     this.max = max;
112     this.hasMinMax = true;
113   }
114
115   /**
116    * override this to apply some form of transformation to the annotation - eg a
117    * colourscheme
118    * 
119    * @param annotation
120    */
121   public void processAnnotation(Annotation annotation)
122   {
123
124   }
125 }