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
5 * This file is part of Jalview.
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.
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.
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Colour implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _name;
54 private java.lang.String _RGB;
59 private java.lang.String _minRGB;
62 * loosely specified enumeration: NONE,ABOVE, or BELOW
64 private java.lang.String _threshType;
69 private float _threshold;
72 * keeps track of state for field: _threshold
74 private boolean _has_threshold;
82 * keeps track of state for field: _max
84 private boolean _has_max;
92 * keeps track of state for field: _min
94 private boolean _has_min;
97 * Field _colourByLabel.
99 private boolean _colourByLabel;
102 * keeps track of state for field: _colourByLabel
104 private boolean _has_colourByLabel;
109 private boolean _autoScale;
112 * keeps track of state for field: _autoScale
114 private boolean _has_autoScale;
132 public void deleteAutoScale(
134 this._has_autoScale= false;
139 public void deleteColourByLabel(
141 this._has_colourByLabel= false;
146 public void deleteMax(
148 this._has_max= false;
153 public void deleteMin(
155 this._has_min= false;
160 public void deleteThreshold(
162 this._has_threshold= false;
166 * Returns the value of field 'autoScale'.
168 * @return the value of field 'AutoScale'.
170 public boolean getAutoScale(
172 return this._autoScale;
176 * Returns the value of field 'colourByLabel'.
178 * @return the value of field 'ColourByLabel'.
180 public boolean getColourByLabel(
182 return this._colourByLabel;
186 * Returns the value of field 'max'.
188 * @return the value of field 'Max'.
196 * Returns the value of field 'min'.
198 * @return the value of field 'Min'.
206 * Returns the value of field 'minRGB'.
208 * @return the value of field 'MinRGB'.
210 public java.lang.String getMinRGB(
216 * Returns the value of field 'name'.
218 * @return the value of field 'Name'.
220 public java.lang.String getName(
226 * Returns the value of field 'RGB'.
228 * @return the value of field 'RGB'.
230 public java.lang.String getRGB(
236 * Returns the value of field 'threshType'. The field
237 * 'threshType' has the following description: loosely
238 * specified enumeration: NONE,ABOVE, or BELOW
240 * @return the value of field 'ThreshType'.
242 public java.lang.String getThreshType(
244 return this._threshType;
248 * Returns the value of field 'threshold'.
250 * @return the value of field 'Threshold'.
252 public float getThreshold(
254 return this._threshold;
258 * Method hasAutoScale.
260 * @return true if at least one AutoScale has been added
262 public boolean hasAutoScale(
264 return this._has_autoScale;
268 * Method hasColourByLabel.
270 * @return true if at least one ColourByLabel has been added
272 public boolean hasColourByLabel(
274 return this._has_colourByLabel;
280 * @return true if at least one Max has been added
282 public boolean hasMax(
284 return this._has_max;
290 * @return true if at least one Min has been added
292 public boolean hasMin(
294 return this._has_min;
298 * Method hasThreshold.
300 * @return true if at least one Threshold has been added
302 public boolean hasThreshold(
304 return this._has_threshold;
308 * Returns the value of field 'autoScale'.
310 * @return the value of field 'AutoScale'.
312 public boolean isAutoScale(
314 return this._autoScale;
318 * Returns the value of field 'colourByLabel'.
320 * @return the value of field 'ColourByLabel'.
322 public boolean isColourByLabel(
324 return this._colourByLabel;
330 * @return true if this object is valid according to the schema
332 public boolean isValid(
336 } catch (org.exolab.castor.xml.ValidationException vex) {
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
352 final java.io.Writer out)
353 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
354 Marshaller.marshal(this, out);
361 * @throws java.io.IOException if an IOException occurs during
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
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);
375 * Sets the value of field 'autoScale'.
377 * @param autoScale the value of field 'autoScale'.
379 public void setAutoScale(
380 final boolean autoScale) {
381 this._autoScale = autoScale;
382 this._has_autoScale = true;
386 * Sets the value of field 'colourByLabel'.
388 * @param colourByLabel the value of field 'colourByLabel'.
390 public void setColourByLabel(
391 final boolean colourByLabel) {
392 this._colourByLabel = colourByLabel;
393 this._has_colourByLabel = true;
397 * Sets the value of field 'max'.
399 * @param max the value of field 'max'.
404 this._has_max = true;
408 * Sets the value of field 'min'.
410 * @param min the value of field 'min'.
415 this._has_min = true;
419 * Sets the value of field 'minRGB'.
421 * @param minRGB the value of field 'minRGB'.
423 public void setMinRGB(
424 final java.lang.String minRGB) {
425 this._minRGB = minRGB;
429 * Sets the value of field 'name'.
431 * @param name the value of field 'name'.
434 final java.lang.String name) {
439 * Sets the value of field 'RGB'.
441 * @param RGB the value of field 'RGB'.
444 final java.lang.String RGB) {
449 * Sets the value of field 'threshType'. The field 'threshType'
450 * has the following description: loosely specified
451 * enumeration: NONE,ABOVE, or BELOW
453 * @param threshType the value of field 'threshType'.
455 public void setThreshType(
456 final java.lang.String threshType) {
457 this._threshType = threshType;
461 * Sets the value of field 'threshold'.
463 * @param threshold the value of field 'threshold'.
465 public void setThreshold(
466 final float threshold) {
467 this._threshold = threshold;
468 this._has_threshold = true;
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.schemabinding.version2.Colour
481 public static jalview.schemabinding.version2.Colour unmarshal(
482 final java.io.Reader reader)
483 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
484 return (jalview.schemabinding.version2.Colour) Unmarshaller.unmarshal(jalview.schemabinding.version2.Colour.class, reader);
490 * @throws org.exolab.castor.xml.ValidationException if this
491 * object is an invalid instance according to the schema
493 public void validate(
495 throws org.exolab.castor.xml.ValidationException {
496 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
497 validator.validate(this);