25cf9bf82e0d00edf7e7841b4ea618648c61fd85
[jalview.git] / src / jalview / binding / Colour.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.binding;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class Colour.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class Colour implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _name.
31    */
32   private java.lang.String _name;
33
34   /**
35    * Field _RGB.
36    */
37   private java.lang.String _RGB;
38
39   /**
40    * Field _minRGB.
41    */
42   private java.lang.String _minRGB;
43
44   /**
45    * loosely specified enumeration: NONE,ABOVE, or BELOW
46    */
47   private java.lang.String _threshType;
48
49   /**
50    * Field _threshold.
51    */
52   private float _threshold;
53
54   /**
55    * keeps track of state for field: _threshold
56    */
57   private boolean _has_threshold;
58
59   /**
60    * Field _max.
61    */
62   private float _max;
63
64   /**
65    * keeps track of state for field: _max
66    */
67   private boolean _has_max;
68
69   /**
70    * Field _min.
71    */
72   private float _min;
73
74   /**
75    * keeps track of state for field: _min
76    */
77   private boolean _has_min;
78
79   /**
80    * Field _colourByLabel.
81    */
82   private boolean _colourByLabel;
83
84   /**
85    * keeps track of state for field: _colourByLabel
86    */
87   private boolean _has_colourByLabel;
88
89   /**
90    * Field _autoScale.
91    */
92   private boolean _autoScale;
93
94   /**
95    * keeps track of state for field: _autoScale
96    */
97   private boolean _has_autoScale;
98
99   // ----------------/
100   // - Constructors -/
101   // ----------------/
102
103   public Colour()
104   {
105     super();
106   }
107
108   // -----------/
109   // - Methods -/
110   // -----------/
111
112   /**
113      */
114   public void deleteAutoScale()
115   {
116     this._has_autoScale = false;
117   }
118
119   /**
120      */
121   public void deleteColourByLabel()
122   {
123     this._has_colourByLabel = false;
124   }
125
126   /**
127      */
128   public void deleteMax()
129   {
130     this._has_max = false;
131   }
132
133   /**
134      */
135   public void deleteMin()
136   {
137     this._has_min = false;
138   }
139
140   /**
141      */
142   public void deleteThreshold()
143   {
144     this._has_threshold = false;
145   }
146
147   /**
148    * Returns the value of field 'autoScale'.
149    * 
150    * @return the value of field 'AutoScale'.
151    */
152   public boolean getAutoScale()
153   {
154     return this._autoScale;
155   }
156
157   /**
158    * Returns the value of field 'colourByLabel'.
159    * 
160    * @return the value of field 'ColourByLabel'.
161    */
162   public boolean getColourByLabel()
163   {
164     return this._colourByLabel;
165   }
166
167   /**
168    * Returns the value of field 'max'.
169    * 
170    * @return the value of field 'Max'.
171    */
172   public float getMax()
173   {
174     return this._max;
175   }
176
177   /**
178    * Returns the value of field 'min'.
179    * 
180    * @return the value of field 'Min'.
181    */
182   public float getMin()
183   {
184     return this._min;
185   }
186
187   /**
188    * Returns the value of field 'minRGB'.
189    * 
190    * @return the value of field 'MinRGB'.
191    */
192   public java.lang.String getMinRGB()
193   {
194     return this._minRGB;
195   }
196
197   /**
198    * Returns the value of field 'name'.
199    * 
200    * @return the value of field 'Name'.
201    */
202   public java.lang.String getName()
203   {
204     return this._name;
205   }
206
207   /**
208    * Returns the value of field 'RGB'.
209    * 
210    * @return the value of field 'RGB'.
211    */
212   public java.lang.String getRGB()
213   {
214     return this._RGB;
215   }
216
217   /**
218    * Returns the value of field 'threshType'. The field 'threshType' has the
219    * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
220    * 
221    * @return the value of field 'ThreshType'.
222    */
223   public java.lang.String getThreshType()
224   {
225     return this._threshType;
226   }
227
228   /**
229    * Returns the value of field 'threshold'.
230    * 
231    * @return the value of field 'Threshold'.
232    */
233   public float getThreshold()
234   {
235     return this._threshold;
236   }
237
238   /**
239    * Method hasAutoScale.
240    * 
241    * @return true if at least one AutoScale has been added
242    */
243   public boolean hasAutoScale()
244   {
245     return this._has_autoScale;
246   }
247
248   /**
249    * Method hasColourByLabel.
250    * 
251    * @return true if at least one ColourByLabel has been added
252    */
253   public boolean hasColourByLabel()
254   {
255     return this._has_colourByLabel;
256   }
257
258   /**
259    * Method hasMax.
260    * 
261    * @return true if at least one Max has been added
262    */
263   public boolean hasMax()
264   {
265     return this._has_max;
266   }
267
268   /**
269    * Method hasMin.
270    * 
271    * @return true if at least one Min has been added
272    */
273   public boolean hasMin()
274   {
275     return this._has_min;
276   }
277
278   /**
279    * Method hasThreshold.
280    * 
281    * @return true if at least one Threshold has been added
282    */
283   public boolean hasThreshold()
284   {
285     return this._has_threshold;
286   }
287
288   /**
289    * Returns the value of field 'autoScale'.
290    * 
291    * @return the value of field 'AutoScale'.
292    */
293   public boolean isAutoScale()
294   {
295     return this._autoScale;
296   }
297
298   /**
299    * Returns the value of field 'colourByLabel'.
300    * 
301    * @return the value of field 'ColourByLabel'.
302    */
303   public boolean isColourByLabel()
304   {
305     return this._colourByLabel;
306   }
307
308   /**
309    * Method isValid.
310    * 
311    * @return true if this object is valid according to the schema
312    */
313   public boolean isValid()
314   {
315     try
316     {
317       validate();
318     } catch (org.exolab.castor.xml.ValidationException vex)
319     {
320       return false;
321     }
322     return true;
323   }
324
325   /**
326    * 
327    * 
328    * @param out
329    * @throws org.exolab.castor.xml.MarshalException
330    *           if object is null or if any SAXException is thrown during
331    *           marshaling
332    * @throws org.exolab.castor.xml.ValidationException
333    *           if this object is an invalid instance according to the schema
334    */
335   public void marshal(final java.io.Writer out)
336           throws org.exolab.castor.xml.MarshalException,
337           org.exolab.castor.xml.ValidationException
338   {
339     Marshaller.marshal(this, out);
340   }
341
342   /**
343    * 
344    * 
345    * @param handler
346    * @throws java.io.IOException
347    *           if an IOException occurs during marshaling
348    * @throws org.exolab.castor.xml.ValidationException
349    *           if this object is an invalid instance according to the schema
350    * @throws org.exolab.castor.xml.MarshalException
351    *           if object is null or if any SAXException is thrown during
352    *           marshaling
353    */
354   public void marshal(final org.xml.sax.ContentHandler handler)
355           throws java.io.IOException,
356           org.exolab.castor.xml.MarshalException,
357           org.exolab.castor.xml.ValidationException
358   {
359     Marshaller.marshal(this, handler);
360   }
361
362   /**
363    * Sets the value of field 'autoScale'.
364    * 
365    * @param autoScale
366    *          the value of field 'autoScale'.
367    */
368   public void setAutoScale(final boolean autoScale)
369   {
370     this._autoScale = autoScale;
371     this._has_autoScale = true;
372   }
373
374   /**
375    * Sets the value of field 'colourByLabel'.
376    * 
377    * @param colourByLabel
378    *          the value of field 'colourByLabel'.
379    */
380   public void setColourByLabel(final boolean colourByLabel)
381   {
382     this._colourByLabel = colourByLabel;
383     this._has_colourByLabel = true;
384   }
385
386   /**
387    * Sets the value of field 'max'.
388    * 
389    * @param max
390    *          the value of field 'max'.
391    */
392   public void setMax(final float max)
393   {
394     this._max = max;
395     this._has_max = true;
396   }
397
398   /**
399    * Sets the value of field 'min'.
400    * 
401    * @param min
402    *          the value of field 'min'.
403    */
404   public void setMin(final float min)
405   {
406     this._min = min;
407     this._has_min = true;
408   }
409
410   /**
411    * Sets the value of field 'minRGB'.
412    * 
413    * @param minRGB
414    *          the value of field 'minRGB'.
415    */
416   public void setMinRGB(final java.lang.String minRGB)
417   {
418     this._minRGB = minRGB;
419   }
420
421   /**
422    * Sets the value of field 'name'.
423    * 
424    * @param name
425    *          the value of field 'name'.
426    */
427   public void setName(final java.lang.String name)
428   {
429     this._name = name;
430   }
431
432   /**
433    * Sets the value of field 'RGB'.
434    * 
435    * @param RGB
436    *          the value of field 'RGB'.
437    */
438   public void setRGB(final java.lang.String RGB)
439   {
440     this._RGB = RGB;
441   }
442
443   /**
444    * Sets the value of field 'threshType'. The field 'threshType' has the
445    * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
446    * 
447    * @param threshType
448    *          the value of field 'threshType'.
449    */
450   public void setThreshType(final java.lang.String threshType)
451   {
452     this._threshType = threshType;
453   }
454
455   /**
456    * Sets the value of field 'threshold'.
457    * 
458    * @param threshold
459    *          the value of field 'threshold'.
460    */
461   public void setThreshold(final float threshold)
462   {
463     this._threshold = threshold;
464     this._has_threshold = true;
465   }
466
467   /**
468    * Method unmarshal.
469    * 
470    * @param reader
471    * @throws org.exolab.castor.xml.MarshalException
472    *           if object is null or if any SAXException is thrown during
473    *           marshaling
474    * @throws org.exolab.castor.xml.ValidationException
475    *           if this object is an invalid instance according to the schema
476    * @return the unmarshaled jalview.binding.Colour
477    */
478   public static jalview.binding.Colour unmarshal(
479           final java.io.Reader reader)
480           throws org.exolab.castor.xml.MarshalException,
481           org.exolab.castor.xml.ValidationException
482   {
483     return (jalview.binding.Colour) Unmarshaller
484             .unmarshal(jalview.binding.Colour.class, reader);
485   }
486
487   /**
488    * 
489    * 
490    * @throws org.exolab.castor.xml.ValidationException
491    *           if this object is an invalid instance according to the schema
492    */
493   public void validate() throws org.exolab.castor.xml.ValidationException
494   {
495     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
496     validator.validate(this);
497   }
498
499 }