2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.binding;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Setting implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
43 private java.lang.String _type;
51 * keeps track of state for field: _colour
53 private boolean _has_colour;
58 private boolean _display;
61 * keeps track of state for field: _display
63 private boolean _has_display;
80 public void deleteColour()
82 this._has_colour = false;
87 public void deleteDisplay()
89 this._has_display = false;
93 * Returns the value of field 'colour'.
95 * @return the value of field 'Colour'.
97 public int getColour()
103 * Returns the value of field 'display'.
105 * @return the value of field 'Display'.
107 public boolean getDisplay()
109 return this._display;
113 * Returns the value of field 'type'.
115 * @return the value of field 'Type'.
117 public java.lang.String getType()
125 * @return true if at least one Colour has been added
127 public boolean hasColour()
129 return this._has_colour;
135 * @return true if at least one Display has been added
137 public boolean hasDisplay()
139 return this._has_display;
143 * Returns the value of field 'display'.
145 * @return the value of field 'Display'.
147 public boolean isDisplay()
149 return this._display;
155 * @return true if this object is valid according to the schema
157 public boolean isValid()
162 } catch (org.exolab.castor.xml.ValidationException vex)
173 * @throws org.exolab.castor.xml.MarshalException
174 * if object is null or if any SAXException is thrown during
176 * @throws org.exolab.castor.xml.ValidationException
177 * if this object is an invalid instance according to the schema
179 public void marshal(final java.io.Writer out)
180 throws org.exolab.castor.xml.MarshalException,
181 org.exolab.castor.xml.ValidationException
183 Marshaller.marshal(this, out);
190 * @throws java.io.IOException
191 * if an IOException occurs during marshaling
192 * @throws org.exolab.castor.xml.ValidationException
193 * if this object is an invalid instance according to the schema
194 * @throws org.exolab.castor.xml.MarshalException
195 * if object is null or if any SAXException is thrown during
198 public void marshal(final org.xml.sax.ContentHandler handler)
199 throws java.io.IOException,
200 org.exolab.castor.xml.MarshalException,
201 org.exolab.castor.xml.ValidationException
203 Marshaller.marshal(this, handler);
207 * Sets the value of field 'colour'.
210 * the value of field 'colour'.
212 public void setColour(final int colour)
214 this._colour = colour;
215 this._has_colour = true;
219 * Sets the value of field 'display'.
222 * the value of field 'display'.
224 public void setDisplay(final boolean display)
226 this._display = display;
227 this._has_display = true;
231 * Sets the value of field 'type'.
234 * the value of field 'type'.
236 public void setType(final java.lang.String type)
245 * @throws org.exolab.castor.xml.MarshalException
246 * if object is null or if any SAXException is thrown during
248 * @throws org.exolab.castor.xml.ValidationException
249 * if this object is an invalid instance according to the schema
250 * @return the unmarshaled jalview.binding.Setting
252 public static jalview.binding.Setting unmarshal(
253 final java.io.Reader reader)
254 throws org.exolab.castor.xml.MarshalException,
255 org.exolab.castor.xml.ValidationException
257 return (jalview.binding.Setting) Unmarshaller.unmarshal(
258 jalview.binding.Setting.class, reader);
264 * @throws org.exolab.castor.xml.ValidationException
265 * if this object is an invalid instance according to the schema
267 public void validate() throws org.exolab.castor.xml.ValidationException
269 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
270 validator.validate(this);