2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.1)
\r
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.schemabinding.version2;
\r
21 //---------------------------------/
\r
22 //- Imported classes and packages -/
\r
23 //---------------------------------/
\r
25 import org.exolab.castor.xml.Marshaller;
\r
26 import org.exolab.castor.xml.Unmarshaller;
\r
31 * @version $Revision$ $Date$
\r
33 public class Setting implements java.io.Serializable {
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
43 private java.lang.String _type;
\r
48 private int _colour;
\r
51 * keeps track of state for field: _colour
\r
53 private boolean _has_colour;
\r
58 private boolean _display;
\r
61 * keeps track of state for field: _display
\r
63 private boolean _has_display;
\r
68 private float _order;
\r
71 * keeps track of state for field: _order
\r
73 private boolean _has_order;
\r
76 * Optional minimum colour for graduated feature colour
\r
78 private int _mincolour;
\r
81 * keeps track of state for field: _mincolour
\r
83 private boolean _has_mincolour;
\r
86 * threshold value for graduated feature colour
\r
88 private float _threshold;
\r
91 * keeps track of state for field: _threshold
\r
93 private boolean _has_threshold;
\r
96 * threshold type for graduated feature colour
\r
98 private int _threshstate;
\r
101 * keeps track of state for field: _threshstate
\r
103 private boolean _has_threshstate;
\r
108 private float _max;
\r
111 * keeps track of state for field: _max
\r
113 private boolean _has_max;
\r
118 private float _min;
\r
121 * keeps track of state for field: _min
\r
123 private boolean _has_min;
\r
126 * Field _colourByLabel.
\r
128 private boolean _colourByLabel;
\r
131 * keeps track of state for field: _colourByLabel
\r
133 private boolean _has_colourByLabel;
\r
136 * Field _autoScale.
\r
138 private boolean _autoScale;
\r
141 * keeps track of state for field: _autoScale
\r
143 private boolean _has_autoScale;
\r
146 //----------------/
\r
147 //- Constructors -/
\r
148 //----------------/
\r
161 public void deleteAutoScale(
\r
163 this._has_autoScale= false;
\r
168 public void deleteColour(
\r
170 this._has_colour= false;
\r
175 public void deleteColourByLabel(
\r
177 this._has_colourByLabel= false;
\r
182 public void deleteDisplay(
\r
184 this._has_display= false;
\r
189 public void deleteMax(
\r
191 this._has_max= false;
\r
196 public void deleteMin(
\r
198 this._has_min= false;
\r
203 public void deleteMincolour(
\r
205 this._has_mincolour= false;
\r
210 public void deleteOrder(
\r
212 this._has_order= false;
\r
217 public void deleteThreshold(
\r
219 this._has_threshold= false;
\r
224 public void deleteThreshstate(
\r
226 this._has_threshstate= false;
\r
230 * Returns the value of field 'autoScale'.
\r
232 * @return the value of field 'AutoScale'.
\r
234 public boolean getAutoScale(
\r
236 return this._autoScale;
\r
240 * Returns the value of field 'colour'.
\r
242 * @return the value of field 'Colour'.
\r
244 public int getColour(
\r
246 return this._colour;
\r
250 * Returns the value of field 'colourByLabel'.
\r
252 * @return the value of field 'ColourByLabel'.
\r
254 public boolean getColourByLabel(
\r
256 return this._colourByLabel;
\r
260 * Returns the value of field 'display'.
\r
262 * @return the value of field 'Display'.
\r
264 public boolean getDisplay(
\r
266 return this._display;
\r
270 * Returns the value of field 'max'.
\r
272 * @return the value of field 'Max'.
\r
274 public float getMax(
\r
280 * Returns the value of field 'min'.
\r
282 * @return the value of field 'Min'.
\r
284 public float getMin(
\r
290 * Returns the value of field 'mincolour'. The field
\r
291 * 'mincolour' has the following description: Optional minimum
\r
292 * colour for graduated feature colour
\r
294 * @return the value of field 'Mincolour'.
\r
296 public int getMincolour(
\r
298 return this._mincolour;
\r
302 * Returns the value of field 'order'.
\r
304 * @return the value of field 'Order'.
\r
306 public float getOrder(
\r
308 return this._order;
\r
312 * Returns the value of field 'threshold'. The field
\r
313 * 'threshold' has the following description: threshold value
\r
314 * for graduated feature colour
\r
316 * @return the value of field 'Threshold'.
\r
318 public float getThreshold(
\r
320 return this._threshold;
\r
324 * Returns the value of field 'threshstate'. The field
\r
325 * 'threshstate' has the following description: threshold type
\r
326 * for graduated feature colour
\r
328 * @return the value of field 'Threshstate'.
\r
330 public int getThreshstate(
\r
332 return this._threshstate;
\r
336 * Returns the value of field 'type'.
\r
338 * @return the value of field 'Type'.
\r
340 public java.lang.String getType(
\r
346 * Method hasAutoScale.
\r
348 * @return true if at least one AutoScale has been added
\r
350 public boolean hasAutoScale(
\r
352 return this._has_autoScale;
\r
356 * Method hasColour.
\r
358 * @return true if at least one Colour has been added
\r
360 public boolean hasColour(
\r
362 return this._has_colour;
\r
366 * Method hasColourByLabel.
\r
368 * @return true if at least one ColourByLabel has been added
\r
370 public boolean hasColourByLabel(
\r
372 return this._has_colourByLabel;
\r
376 * Method hasDisplay.
\r
378 * @return true if at least one Display has been added
\r
380 public boolean hasDisplay(
\r
382 return this._has_display;
\r
388 * @return true if at least one Max has been added
\r
390 public boolean hasMax(
\r
392 return this._has_max;
\r
398 * @return true if at least one Min has been added
\r
400 public boolean hasMin(
\r
402 return this._has_min;
\r
406 * Method hasMincolour.
\r
408 * @return true if at least one Mincolour has been added
\r
410 public boolean hasMincolour(
\r
412 return this._has_mincolour;
\r
418 * @return true if at least one Order has been added
\r
420 public boolean hasOrder(
\r
422 return this._has_order;
\r
426 * Method hasThreshold.
\r
428 * @return true if at least one Threshold has been added
\r
430 public boolean hasThreshold(
\r
432 return this._has_threshold;
\r
436 * Method hasThreshstate.
\r
438 * @return true if at least one Threshstate has been added
\r
440 public boolean hasThreshstate(
\r
442 return this._has_threshstate;
\r
446 * Returns the value of field 'autoScale'.
\r
448 * @return the value of field 'AutoScale'.
\r
450 public boolean isAutoScale(
\r
452 return this._autoScale;
\r
456 * Returns the value of field 'colourByLabel'.
\r
458 * @return the value of field 'ColourByLabel'.
\r
460 public boolean isColourByLabel(
\r
462 return this._colourByLabel;
\r
466 * Returns the value of field 'display'.
\r
468 * @return the value of field 'Display'.
\r
470 public boolean isDisplay(
\r
472 return this._display;
\r
478 * @return true if this object is valid according to the schema
\r
480 public boolean isValid(
\r
484 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
494 * @throws org.exolab.castor.xml.MarshalException if object is
\r
495 * null or if any SAXException is thrown during marshaling
\r
496 * @throws org.exolab.castor.xml.ValidationException if this
\r
497 * object is an invalid instance according to the schema
\r
499 public void marshal(
\r
500 final java.io.Writer out)
\r
501 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
502 Marshaller.marshal(this, out);
\r
509 * @throws java.io.IOException if an IOException occurs during
\r
511 * @throws org.exolab.castor.xml.ValidationException if this
\r
512 * object is an invalid instance according to the schema
\r
513 * @throws org.exolab.castor.xml.MarshalException if object is
\r
514 * null or if any SAXException is thrown during marshaling
\r
516 public void marshal(
\r
517 final org.xml.sax.ContentHandler handler)
\r
518 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
519 Marshaller.marshal(this, handler);
\r
523 * Sets the value of field 'autoScale'.
\r
525 * @param autoScale the value of field 'autoScale'.
\r
527 public void setAutoScale(
\r
528 final boolean autoScale) {
\r
529 this._autoScale = autoScale;
\r
530 this._has_autoScale = true;
\r
534 * Sets the value of field 'colour'.
\r
536 * @param colour the value of field 'colour'.
\r
538 public void setColour(
\r
539 final int colour) {
\r
540 this._colour = colour;
\r
541 this._has_colour = true;
\r
545 * Sets the value of field 'colourByLabel'.
\r
547 * @param colourByLabel the value of field 'colourByLabel'.
\r
549 public void setColourByLabel(
\r
550 final boolean colourByLabel) {
\r
551 this._colourByLabel = colourByLabel;
\r
552 this._has_colourByLabel = true;
\r
556 * Sets the value of field 'display'.
\r
558 * @param display the value of field 'display'.
\r
560 public void setDisplay(
\r
561 final boolean display) {
\r
562 this._display = display;
\r
563 this._has_display = true;
\r
567 * Sets the value of field 'max'.
\r
569 * @param max the value of field 'max'.
\r
571 public void setMax(
\r
574 this._has_max = true;
\r
578 * Sets the value of field 'min'.
\r
580 * @param min the value of field 'min'.
\r
582 public void setMin(
\r
585 this._has_min = true;
\r
589 * Sets the value of field 'mincolour'. The field 'mincolour'
\r
590 * has the following description: Optional minimum colour for
\r
591 * graduated feature colour
\r
593 * @param mincolour the value of field 'mincolour'.
\r
595 public void setMincolour(
\r
596 final int mincolour) {
\r
597 this._mincolour = mincolour;
\r
598 this._has_mincolour = true;
\r
602 * Sets the value of field 'order'.
\r
604 * @param order the value of field 'order'.
\r
606 public void setOrder(
\r
607 final float order) {
\r
608 this._order = order;
\r
609 this._has_order = true;
\r
613 * Sets the value of field 'threshold'. The field 'threshold'
\r
614 * has the following description: threshold value for graduated
\r
617 * @param threshold the value of field 'threshold'.
\r
619 public void setThreshold(
\r
620 final float threshold) {
\r
621 this._threshold = threshold;
\r
622 this._has_threshold = true;
\r
626 * Sets the value of field 'threshstate'. The field
\r
627 * 'threshstate' has the following description: threshold type
\r
628 * for graduated feature colour
\r
630 * @param threshstate the value of field 'threshstate'.
\r
632 public void setThreshstate(
\r
633 final int threshstate) {
\r
634 this._threshstate = threshstate;
\r
635 this._has_threshstate = true;
\r
639 * Sets the value of field 'type'.
\r
641 * @param type the value of field 'type'.
\r
643 public void setType(
\r
644 final java.lang.String type) {
\r
649 * Method unmarshal.
\r
652 * @throws org.exolab.castor.xml.MarshalException if object is
\r
653 * null or if any SAXException is thrown during marshaling
\r
654 * @throws org.exolab.castor.xml.ValidationException if this
\r
655 * object is an invalid instance according to the schema
\r
656 * @return the unmarshaled jalview.schemabinding.version2.Settin
\r
658 public static jalview.schemabinding.version2.Setting unmarshal(
\r
659 final java.io.Reader reader)
\r
660 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
661 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader);
\r
667 * @throws org.exolab.castor.xml.ValidationException if this
\r
668 * object is an invalid instance according to the schema
\r
670 public void validate(
\r
672 throws org.exolab.castor.xml.ValidationException {
\r
673 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
674 validator.validate(this);
\r