1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) 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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.binding;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Colour implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
52 private java.lang.String _name;
57 private java.lang.String _RGB;
62 private java.lang.String _minRGB;
65 * loosely specified enumeration: NONE,ABOVE, or BELOW
67 private java.lang.String _threshType;
72 private float _threshold;
75 * keeps track of state for field: _threshold
77 private boolean _has_threshold;
85 * keeps track of state for field: _max
87 private boolean _has_max;
95 * keeps track of state for field: _min
97 private boolean _has_min;
100 * Field _colourByLabel.
102 private boolean _colourByLabel;
105 * keeps track of state for field: _colourByLabel
107 private boolean _has_colourByLabel;
112 private boolean _autoScale;
115 * keeps track of state for field: _autoScale
117 private boolean _has_autoScale;
134 public void deleteAutoScale()
136 this._has_autoScale = false;
141 public void deleteColourByLabel()
143 this._has_colourByLabel = false;
148 public void deleteMax()
150 this._has_max = false;
155 public void deleteMin()
157 this._has_min = false;
162 public void deleteThreshold()
164 this._has_threshold = false;
168 * Returns the value of field 'autoScale'.
170 * @return the value of field 'AutoScale'.
172 public boolean getAutoScale()
174 return this._autoScale;
178 * Returns the value of field 'colourByLabel'.
180 * @return the value of field 'ColourByLabel'.
182 public boolean getColourByLabel()
184 return this._colourByLabel;
188 * Returns the value of field 'max'.
190 * @return the value of field 'Max'.
192 public float getMax()
198 * Returns the value of field 'min'.
200 * @return the value of field 'Min'.
202 public float getMin()
208 * Returns the value of field 'minRGB'.
210 * @return the value of field 'MinRGB'.
212 public java.lang.String getMinRGB()
218 * Returns the value of field 'name'.
220 * @return the value of field 'Name'.
222 public java.lang.String getName()
228 * Returns the value of field 'RGB'.
230 * @return the value of field 'RGB'.
232 public java.lang.String getRGB()
238 * Returns the value of field 'threshType'. The field 'threshType' has the
239 * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
241 * @return the value of field 'ThreshType'.
243 public java.lang.String getThreshType()
245 return this._threshType;
249 * Returns the value of field 'threshold'.
251 * @return the value of field 'Threshold'.
253 public float getThreshold()
255 return this._threshold;
259 * Method hasAutoScale.
261 * @return true if at least one AutoScale has been added
263 public boolean hasAutoScale()
265 return this._has_autoScale;
269 * Method hasColourByLabel.
271 * @return true if at least one ColourByLabel has been added
273 public boolean hasColourByLabel()
275 return this._has_colourByLabel;
281 * @return true if at least one Max has been added
283 public boolean hasMax()
285 return this._has_max;
291 * @return true if at least one Min has been added
293 public boolean hasMin()
295 return this._has_min;
299 * Method hasThreshold.
301 * @return true if at least one Threshold has been added
303 public boolean hasThreshold()
305 return this._has_threshold;
309 * Returns the value of field 'autoScale'.
311 * @return the value of field 'AutoScale'.
313 public boolean isAutoScale()
315 return this._autoScale;
319 * Returns the value of field 'colourByLabel'.
321 * @return the value of field 'ColourByLabel'.
323 public boolean isColourByLabel()
325 return this._colourByLabel;
331 * @return true if this object is valid according to the schema
333 public boolean isValid()
338 } catch (org.exolab.castor.xml.ValidationException vex)
349 * @throws org.exolab.castor.xml.MarshalException
350 * if object is null or if any SAXException is thrown during
352 * @throws org.exolab.castor.xml.ValidationException
353 * if this object is an invalid instance according to the schema
355 public void marshal(final java.io.Writer out)
356 throws org.exolab.castor.xml.MarshalException,
357 org.exolab.castor.xml.ValidationException
359 Marshaller.marshal(this, out);
366 * @throws java.io.IOException
367 * if an IOException occurs during marshaling
368 * @throws org.exolab.castor.xml.ValidationException
369 * if this object is an invalid instance according to the schema
370 * @throws org.exolab.castor.xml.MarshalException
371 * if object is null or if any SAXException is thrown during
374 public void marshal(final org.xml.sax.ContentHandler handler)
375 throws java.io.IOException,
376 org.exolab.castor.xml.MarshalException,
377 org.exolab.castor.xml.ValidationException
379 Marshaller.marshal(this, handler);
383 * Sets the value of field 'autoScale'.
386 * the value of field 'autoScale'.
388 public void setAutoScale(final boolean autoScale)
390 this._autoScale = autoScale;
391 this._has_autoScale = true;
395 * Sets the value of field 'colourByLabel'.
397 * @param colourByLabel
398 * the value of field 'colourByLabel'.
400 public void setColourByLabel(final boolean colourByLabel)
402 this._colourByLabel = colourByLabel;
403 this._has_colourByLabel = true;
407 * Sets the value of field 'max'.
410 * the value of field 'max'.
412 public void setMax(final float max)
415 this._has_max = true;
419 * Sets the value of field 'min'.
422 * the value of field 'min'.
424 public void setMin(final float min)
427 this._has_min = true;
431 * Sets the value of field 'minRGB'.
434 * the value of field 'minRGB'.
436 public void setMinRGB(final java.lang.String minRGB)
438 this._minRGB = minRGB;
442 * Sets the value of field 'name'.
445 * the value of field 'name'.
447 public void setName(final java.lang.String name)
453 * Sets the value of field 'RGB'.
456 * the value of field 'RGB'.
458 public void setRGB(final java.lang.String RGB)
464 * Sets the value of field 'threshType'. The field 'threshType' has the
465 * following description: loosely specified enumeration: NONE,ABOVE, or BELOW
468 * the value of field 'threshType'.
470 public void setThreshType(final java.lang.String threshType)
472 this._threshType = threshType;
476 * Sets the value of field 'threshold'.
479 * the value of field 'threshold'.
481 public void setThreshold(final float threshold)
483 this._threshold = threshold;
484 this._has_threshold = true;
491 * @throws org.exolab.castor.xml.MarshalException
492 * if object is null or if any SAXException is thrown during
494 * @throws org.exolab.castor.xml.ValidationException
495 * if this object is an invalid instance according to the schema
496 * @return the unmarshaled jalview.binding.Colour
498 public static jalview.binding.Colour unmarshal(
499 final java.io.Reader reader)
500 throws org.exolab.castor.xml.MarshalException,
501 org.exolab.castor.xml.ValidationException
503 return (jalview.binding.Colour) Unmarshaller
504 .unmarshal(jalview.binding.Colour.class, reader);
510 * @throws org.exolab.castor.xml.ValidationException
511 * if this object is an invalid instance according to the schema
513 public void validate() throws org.exolab.castor.xml.ValidationException
515 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
516 validator.validate(this);