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