2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.binding;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
20 * @version $Revision$ $Date$
22 public class Colour implements java.io.Serializable {
25 //--------------------------/
26 //- Class/Member Variables -/
27 //--------------------------/
32 private java.lang.String _name;
37 private java.lang.String _RGB;
42 private java.lang.String _minRGB;
45 * loosely specified enumeration: NONE,ABOVE, or BELOW
47 private java.lang.String _threshType;
52 private float _threshold;
55 * keeps track of state for field: _threshold
57 private boolean _has_threshold;
65 * keeps track of state for field: _max
67 private boolean _has_max;
75 * keeps track of state for field: _min
77 private boolean _has_min;
80 * Field _colourByLabel.
82 private boolean _colourByLabel;
85 * keeps track of state for field: _colourByLabel
87 private boolean _has_colourByLabel;
92 private boolean _autoScale;
95 * keeps track of state for field: _autoScale
97 private boolean _has_autoScale;
115 public void deleteAutoScale(
117 this._has_autoScale= false;
122 public void deleteColourByLabel(
124 this._has_colourByLabel= false;
129 public void deleteMax(
131 this._has_max= false;
136 public void deleteMin(
138 this._has_min= false;
143 public void deleteThreshold(
145 this._has_threshold= false;
149 * Returns the value of field 'autoScale'.
151 * @return the value of field 'AutoScale'.
153 public boolean getAutoScale(
155 return this._autoScale;
159 * Returns the value of field 'colourByLabel'.
161 * @return the value of field 'ColourByLabel'.
163 public boolean getColourByLabel(
165 return this._colourByLabel;
169 * Returns the value of field 'max'.
171 * @return the value of field 'Max'.
179 * Returns the value of field 'min'.
181 * @return the value of field 'Min'.
189 * Returns the value of field 'minRGB'.
191 * @return the value of field 'MinRGB'.
193 public java.lang.String getMinRGB(
199 * Returns the value of field 'name'.
201 * @return the value of field 'Name'.
203 public java.lang.String getName(
209 * Returns the value of field 'RGB'.
211 * @return the value of field 'RGB'.
213 public java.lang.String getRGB(
219 * Returns the value of field 'threshType'. The field
220 * 'threshType' has the following description: loosely
221 * specified enumeration: NONE,ABOVE, or BELOW
223 * @return the value of field 'ThreshType'.
225 public java.lang.String getThreshType(
227 return this._threshType;
231 * Returns the value of field 'threshold'.
233 * @return the value of field 'Threshold'.
235 public float getThreshold(
237 return this._threshold;
241 * Method hasAutoScale.
243 * @return true if at least one AutoScale has been added
245 public boolean hasAutoScale(
247 return this._has_autoScale;
251 * Method hasColourByLabel.
253 * @return true if at least one ColourByLabel has been added
255 public boolean hasColourByLabel(
257 return this._has_colourByLabel;
263 * @return true if at least one Max has been added
265 public boolean hasMax(
267 return this._has_max;
273 * @return true if at least one Min has been added
275 public boolean hasMin(
277 return this._has_min;
281 * Method hasThreshold.
283 * @return true if at least one Threshold has been added
285 public boolean hasThreshold(
287 return this._has_threshold;
291 * Returns the value of field 'autoScale'.
293 * @return the value of field 'AutoScale'.
295 public boolean isAutoScale(
297 return this._autoScale;
301 * Returns the value of field 'colourByLabel'.
303 * @return the value of field 'ColourByLabel'.
305 public boolean isColourByLabel(
307 return this._colourByLabel;
313 * @return true if this object is valid according to the schema
315 public boolean isValid(
319 } catch (org.exolab.castor.xml.ValidationException vex) {
329 * @throws org.exolab.castor.xml.MarshalException if object is
330 * null or if any SAXException is thrown during marshaling
331 * @throws org.exolab.castor.xml.ValidationException if this
332 * object is an invalid instance according to the schema
335 final java.io.Writer out)
336 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
337 Marshaller.marshal(this, out);
344 * @throws java.io.IOException if an IOException occurs during
346 * @throws org.exolab.castor.xml.ValidationException if this
347 * object is an invalid instance according to the schema
348 * @throws org.exolab.castor.xml.MarshalException if object is
349 * null or if any SAXException is thrown during marshaling
352 final org.xml.sax.ContentHandler handler)
353 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
354 Marshaller.marshal(this, handler);
358 * Sets the value of field 'autoScale'.
360 * @param autoScale the value of field 'autoScale'.
362 public void setAutoScale(
363 final boolean autoScale) {
364 this._autoScale = autoScale;
365 this._has_autoScale = true;
369 * Sets the value of field 'colourByLabel'.
371 * @param colourByLabel the value of field 'colourByLabel'.
373 public void setColourByLabel(
374 final boolean colourByLabel) {
375 this._colourByLabel = colourByLabel;
376 this._has_colourByLabel = true;
380 * Sets the value of field 'max'.
382 * @param max the value of field 'max'.
387 this._has_max = true;
391 * Sets the value of field 'min'.
393 * @param min the value of field 'min'.
398 this._has_min = true;
402 * Sets the value of field 'minRGB'.
404 * @param minRGB the value of field 'minRGB'.
406 public void setMinRGB(
407 final java.lang.String minRGB) {
408 this._minRGB = minRGB;
412 * Sets the value of field 'name'.
414 * @param name the value of field 'name'.
417 final java.lang.String name) {
422 * Sets the value of field 'RGB'.
424 * @param RGB the value of field 'RGB'.
427 final java.lang.String RGB) {
432 * Sets the value of field 'threshType'. The field 'threshType'
433 * has the following description: loosely specified
434 * enumeration: NONE,ABOVE, or BELOW
436 * @param threshType the value of field 'threshType'.
438 public void setThreshType(
439 final java.lang.String threshType) {
440 this._threshType = threshType;
444 * Sets the value of field 'threshold'.
446 * @param threshold the value of field 'threshold'.
448 public void setThreshold(
449 final float threshold) {
450 this._threshold = threshold;
451 this._has_threshold = true;
458 * @throws org.exolab.castor.xml.MarshalException if object is
459 * null or if any SAXException is thrown during marshaling
460 * @throws org.exolab.castor.xml.ValidationException if this
461 * object is an invalid instance according to the schema
462 * @return the unmarshaled jalview.binding.Colour
464 public static jalview.binding.Colour unmarshal(
465 final java.io.Reader reader)
466 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
467 return (jalview.binding.Colour) Unmarshaller.unmarshal(jalview.binding.Colour.class, reader);
473 * @throws org.exolab.castor.xml.ValidationException if this
474 * object is an invalid instance according to the schema
476 public void validate(
478 throws org.exolab.castor.xml.ValidationException {
479 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
480 validator.validate(this);