c7e4549725aeba190f50c43df40db6ebb28fbd2f
[jalview.git] / src / jalview / datamodel / annotations / AnnotationRowBuilder.java
1 package jalview.datamodel.annotations;
2
3 import jalview.datamodel.Annotation;
4 import jalview.structure.StructureImportSettings.TFType;
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   private TFType tfType = null;
22
23   public void setTFType(TFType t)
24   {
25     tfType = t;
26   }
27
28   public 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, TFType tft)
101   {
102     this(name, min, max);
103     setTFType(tft);
104   }
105
106   public AnnotationRowBuilder(String name, float min, float max)
107   {
108     this(name);
109     this.min = min;
110     this.max = max;
111     this.hasMinMax = true;
112   }
113
114   /**
115    * override this to apply some form of transformation to the annotation - eg a
116    * colourscheme
117    * 
118    * @param annotation
119    */
120   public void processAnnotation(Annotation annotation)
121   {
122
123   }
124 }