1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 The Jalview Authors
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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
39 * @version $Revision$ $Date$
41 public class Colour implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
51 private java.lang.String _name;
56 private java.lang.String _RGB;
61 private java.lang.String _minRGB;
64 * loosely specified enumeration: NONE,ABOVE, or BELOW
66 private java.lang.String _threshType;
71 private float _threshold;
74 * keeps track of state for field: _threshold
76 private boolean _has_threshold;
84 * keeps track of state for field: _max
86 private boolean _has_max;
94 * keeps track of state for field: _min
96 private boolean _has_min;
99 * Field _colourByLabel.
101 private boolean _colourByLabel;
104 * keeps track of state for field: _colourByLabel
106 private boolean _has_colourByLabel;
111 private boolean _autoScale;
114 * keeps track of state for field: _autoScale
116 private boolean _has_autoScale;
133 public void deleteAutoScale()
135 this._has_autoScale = false;
140 public void deleteColourByLabel()
142 this._has_colourByLabel = false;
147 public void deleteMax()
149 this._has_max = false;
154 public void deleteMin()
156 this._has_min = false;
161 public void deleteThreshold()
163 this._has_threshold = false;
167 * Returns the value of field 'autoScale'.
169 * @return the value of field 'AutoScale'.
171 public boolean getAutoScale()
173 return this._autoScale;
177 * Returns the value of field 'colourByLabel'.
179 * @return the value of field 'ColourByLabel'.
181 public boolean getColourByLabel()
183 return this._colourByLabel;
187 * Returns the value of field 'max'.
189 * @return the value of field 'Max'.
191 public float getMax()
197 * Returns the value of field 'min'.
199 * @return the value of field 'Min'.
201 public float getMin()
207 * Returns the value of field 'minRGB'.
209 * @return the value of field 'MinRGB'.
211 public java.lang.String getMinRGB()
217 * Returns the value of field 'name'.
219 * @return the value of field 'Name'.
221 public java.lang.String getName()
227 * Returns the value of field 'RGB'.
229 * @return the value of field 'RGB'.
231 public java.lang.String getRGB()
237 * Returns the value of field 'threshType'. The field 'threshType' has the
238 * following description: loosely 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()
337 } catch (org.exolab.castor.xml.ValidationException vex)
348 * @throws org.exolab.castor.xml.MarshalException
349 * if object is null or if any SAXException is thrown during
351 * @throws org.exolab.castor.xml.ValidationException
352 * if this object is an invalid instance according to the schema
354 public void marshal(final java.io.Writer out)
355 throws org.exolab.castor.xml.MarshalException,
356 org.exolab.castor.xml.ValidationException
358 Marshaller.marshal(this, out);
365 * @throws java.io.IOException
366 * if an IOException occurs during marshaling
367 * @throws org.exolab.castor.xml.ValidationException
368 * if this object is an invalid instance according to the schema
369 * @throws org.exolab.castor.xml.MarshalException
370 * if object is null or if any SAXException is thrown during
373 public void marshal(final org.xml.sax.ContentHandler handler)
374 throws java.io.IOException,
375 org.exolab.castor.xml.MarshalException,
376 org.exolab.castor.xml.ValidationException
378 Marshaller.marshal(this, handler);
382 * Sets the value of field 'autoScale'.
385 * the value of field 'autoScale'.
387 public void setAutoScale(final boolean autoScale)
389 this._autoScale = autoScale;
390 this._has_autoScale = true;
394 * Sets the value of field 'colourByLabel'.
396 * @param colourByLabel
397 * the value of field 'colourByLabel'.
399 public void setColourByLabel(final boolean colourByLabel)
401 this._colourByLabel = colourByLabel;
402 this._has_colourByLabel = true;
406 * Sets the value of field 'max'.
409 * the value of field 'max'.
411 public void setMax(final float max)
414 this._has_max = true;
418 * Sets the value of field 'min'.
421 * the value of field 'min'.
423 public void setMin(final float min)
426 this._has_min = true;
430 * Sets the value of field 'minRGB'.
433 * the value of field 'minRGB'.
435 public void setMinRGB(final java.lang.String minRGB)
437 this._minRGB = minRGB;
441 * Sets the value of field 'name'.
444 * the value of field 'name'.
446 public void setName(final java.lang.String name)
452 * Sets the value of field 'RGB'.
455 * the value of field 'RGB'.
457 public void setRGB(final java.lang.String RGB)
463 * Sets the value of field 'threshType'. The field 'threshType' has the
464 * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
467 * the value of field 'threshType'.
469 public void setThreshType(final java.lang.String threshType)
471 this._threshType = threshType;
475 * Sets the value of field 'threshold'.
478 * the value of field 'threshold'.
480 public void setThreshold(final float threshold)
482 this._threshold = threshold;
483 this._has_threshold = true;
490 * @throws org.exolab.castor.xml.MarshalException
491 * if object is null or if any SAXException is thrown during
493 * @throws org.exolab.castor.xml.ValidationException
494 * if this object is an invalid instance according to the schema
495 * @return the unmarshaled jalview.schemabinding.version2.Colour
497 public static jalview.schemabinding.version2.Colour unmarshal(
498 final java.io.Reader reader)
499 throws org.exolab.castor.xml.MarshalException,
500 org.exolab.castor.xml.ValidationException
502 return (jalview.schemabinding.version2.Colour) Unmarshaller.unmarshal(
503 jalview.schemabinding.version2.Colour.class, reader);
509 * @throws org.exolab.castor.xml.ValidationException
510 * if this object is an invalid instance according to the schema
512 public void validate() throws org.exolab.castor.xml.ValidationException
514 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
515 validator.validate(this);