2 * Jalview - A Sequence Alignment Editor and Viewer (Development 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
106 //----------------/
\r
107 //- Constructors -/
\r
108 //----------------/
\r
121 public void deleteColour(
\r
123 this._has_colour= false;
\r
128 public void deleteDisplay(
\r
130 this._has_display= false;
\r
135 public void deleteMincolour(
\r
137 this._has_mincolour= false;
\r
142 public void deleteOrder(
\r
144 this._has_order= false;
\r
149 public void deleteThreshold(
\r
151 this._has_threshold= false;
\r
156 public void deleteThreshstate(
\r
158 this._has_threshstate= false;
\r
162 * Returns the value of field 'colour'.
\r
164 * @return the value of field 'Colour'.
\r
166 public int getColour(
\r
168 return this._colour;
\r
172 * Returns the value of field 'display'.
\r
174 * @return the value of field 'Display'.
\r
176 public boolean getDisplay(
\r
178 return this._display;
\r
182 * Returns the value of field 'mincolour'. The field
\r
183 * 'mincolour' has the following description: Optional minimum
\r
184 * colour for graduated feature colour
\r
186 * @return the value of field 'Mincolour'.
\r
188 public int getMincolour(
\r
190 return this._mincolour;
\r
194 * Returns the value of field 'order'.
\r
196 * @return the value of field 'Order'.
\r
198 public float getOrder(
\r
200 return this._order;
\r
204 * Returns the value of field 'threshold'. The field
\r
205 * 'threshold' has the following description: threshold value
\r
206 * for graduated feature colour
\r
208 * @return the value of field 'Threshold'.
\r
210 public float getThreshold(
\r
212 return this._threshold;
\r
216 * Returns the value of field 'threshstate'. The field
\r
217 * 'threshstate' has the following description: threshold type
\r
218 * for graduated feature colour
\r
220 * @return the value of field 'Threshstate'.
\r
222 public int getThreshstate(
\r
224 return this._threshstate;
\r
228 * Returns the value of field 'type'.
\r
230 * @return the value of field 'Type'.
\r
232 public java.lang.String getType(
\r
238 * Method hasColour.
\r
240 * @return true if at least one Colour has been added
\r
242 public boolean hasColour(
\r
244 return this._has_colour;
\r
248 * Method hasDisplay.
\r
250 * @return true if at least one Display has been added
\r
252 public boolean hasDisplay(
\r
254 return this._has_display;
\r
258 * Method hasMincolour.
\r
260 * @return true if at least one Mincolour has been added
\r
262 public boolean hasMincolour(
\r
264 return this._has_mincolour;
\r
270 * @return true if at least one Order has been added
\r
272 public boolean hasOrder(
\r
274 return this._has_order;
\r
278 * Method hasThreshold.
\r
280 * @return true if at least one Threshold has been added
\r
282 public boolean hasThreshold(
\r
284 return this._has_threshold;
\r
288 * Method hasThreshstate.
\r
290 * @return true if at least one Threshstate has been added
\r
292 public boolean hasThreshstate(
\r
294 return this._has_threshstate;
\r
298 * Returns the value of field 'display'.
\r
300 * @return the value of field 'Display'.
\r
302 public boolean isDisplay(
\r
304 return this._display;
\r
310 * @return true if this object is valid according to the schema
\r
312 public boolean isValid(
\r
316 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
326 * @throws org.exolab.castor.xml.MarshalException if object is
\r
327 * null or if any SAXException is thrown during marshaling
\r
328 * @throws org.exolab.castor.xml.ValidationException if this
\r
329 * object is an invalid instance according to the schema
\r
331 public void marshal(
\r
332 final java.io.Writer out)
\r
333 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
334 Marshaller.marshal(this, out);
\r
341 * @throws java.io.IOException if an IOException occurs during
\r
343 * @throws org.exolab.castor.xml.ValidationException if this
\r
344 * object is an invalid instance according to the schema
\r
345 * @throws org.exolab.castor.xml.MarshalException if object is
\r
346 * null or if any SAXException is thrown during marshaling
\r
348 public void marshal(
\r
349 final org.xml.sax.ContentHandler handler)
\r
350 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
351 Marshaller.marshal(this, handler);
\r
355 * Sets the value of field 'colour'.
\r
357 * @param colour the value of field 'colour'.
\r
359 public void setColour(
\r
360 final int colour) {
\r
361 this._colour = colour;
\r
362 this._has_colour = true;
\r
366 * Sets the value of field 'display'.
\r
368 * @param display the value of field 'display'.
\r
370 public void setDisplay(
\r
371 final boolean display) {
\r
372 this._display = display;
\r
373 this._has_display = true;
\r
377 * Sets the value of field 'mincolour'. The field 'mincolour'
\r
378 * has the following description: Optional minimum colour for
\r
379 * graduated feature colour
\r
381 * @param mincolour the value of field 'mincolour'.
\r
383 public void setMincolour(
\r
384 final int mincolour) {
\r
385 this._mincolour = mincolour;
\r
386 this._has_mincolour = true;
\r
390 * Sets the value of field 'order'.
\r
392 * @param order the value of field 'order'.
\r
394 public void setOrder(
\r
395 final float order) {
\r
396 this._order = order;
\r
397 this._has_order = true;
\r
401 * Sets the value of field 'threshold'. The field 'threshold'
\r
402 * has the following description: threshold value for graduated
\r
405 * @param threshold the value of field 'threshold'.
\r
407 public void setThreshold(
\r
408 final float threshold) {
\r
409 this._threshold = threshold;
\r
410 this._has_threshold = true;
\r
414 * Sets the value of field 'threshstate'. The field
\r
415 * 'threshstate' has the following description: threshold type
\r
416 * for graduated feature colour
\r
418 * @param threshstate the value of field 'threshstate'.
\r
420 public void setThreshstate(
\r
421 final int threshstate) {
\r
422 this._threshstate = threshstate;
\r
423 this._has_threshstate = true;
\r
427 * Sets the value of field 'type'.
\r
429 * @param type the value of field 'type'.
\r
431 public void setType(
\r
432 final java.lang.String type) {
\r
437 * Method unmarshal.
\r
440 * @throws org.exolab.castor.xml.MarshalException if object is
\r
441 * null or if any SAXException is thrown during marshaling
\r
442 * @throws org.exolab.castor.xml.ValidationException if this
\r
443 * object is an invalid instance according to the schema
\r
444 * @return the unmarshaled jalview.schemabinding.version2.Settin
\r
446 public static jalview.schemabinding.version2.Setting unmarshal(
\r
447 final java.io.Reader reader)
\r
448 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
449 return (jalview.schemabinding.version2.Setting) Unmarshaller.unmarshal(jalview.schemabinding.version2.Setting.class, reader);
\r
455 * @throws org.exolab.castor.xml.ValidationException if this
\r
456 * object is an invalid instance according to the schema
\r
458 public void validate(
\r
460 throws org.exolab.castor.xml.ValidationException {
\r
461 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
462 validator.validate(this);
\r