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