X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbinding%2FJalviewUserColours.java;h=eeb051b8b84ba367749a432a8857ccab0bb6fe59;hb=e3cad17c5dba620dafc8459295ecc959cbe52938;hp=8df0d448a22418171f6115b7470a7cba5e178a8f;hpb=efc31b4a8d5cee63555586804a2b79c06bdb5a14;p=jalview.git diff --git a/src/jalview/binding/JalviewUserColours.java b/src/jalview/binding/JalviewUserColours.java index 8df0d44..eeb051b 100755 --- a/src/jalview/binding/JalviewUserColours.java +++ b/src/jalview/binding/JalviewUserColours.java @@ -1,78 +1,83 @@ /* - * This class was automatically generated with + * This class was automatically generated with * Castor 0.9.6, using an XML * Schema. * $Id$ */ -package jalview.binding; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; - -import org.xml.sax.ContentHandler; +package jalview.binding; + //---------------------------------/ + //- Imported classes and packages -/ //---------------------------------/ -//- Imported classes and packages -/ -//---------------------------------/ + import java.io.IOException; import java.io.Reader; import java.io.Serializable; import java.io.Writer; - import java.util.Enumeration; import java.util.Vector; - +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; /** * Class JalviewUserColours. - * + * * @version $Revision$ $Date$ */ -public class JalviewUserColours implements java.io.Serializable -{ - //--------------------------/ - //- Class/Member Variables -/ +public class JalviewUserColours implements java.io.Serializable { + + + //--------------------------/ + //- Class/Member Variables -/ //--------------------------/ /** + * Field _schemeName + */ + private java.lang.String _schemeName; + + /** * Field _colourList */ private java.util.Vector _colourList; + + //----------------/ + //- Constructors -/ //----------------/ - //- Constructors -/ - //----------------/ - public JalviewUserColours() - { + + public JalviewUserColours() { super(); _colourList = new Vector(); - } + } //-- jalview.binding.JalviewUserColours() + - //-- jalview.binding.JalviewUserColours() + //-----------/ + //- Methods -/ //-----------/ /** - * DOCUMENT ME! - * - * @param vColour DOCUMENT ME! - * - * @throws java.lang.IndexOutOfBoundsException DOCUMENT ME! + * Method addColour + * + * + * + * @param vColour */ public void addColour(jalview.binding.Colour vColour) throws java.lang.IndexOutOfBoundsException { _colourList.addElement(vColour); - } - - //-- void addColour(jalview.binding.Colour) + } //-- void addColour(jalview.binding.Colour) /** * Method addColour - * - * - * + * + * + * * @param index * @param vColour */ @@ -80,29 +85,25 @@ public class JalviewUserColours implements java.io.Serializable throws java.lang.IndexOutOfBoundsException { _colourList.insertElementAt(vColour, index); - } - - //-- void addColour(int, jalview.binding.Colour) + } //-- void addColour(int, jalview.binding.Colour) /** * Method enumerateColour - * - * - * + * + * + * * @return Enumeration */ public java.util.Enumeration enumerateColour() { return _colourList.elements(); - } - - //-- java.util.Enumeration enumerateColour() + } //-- java.util.Enumeration enumerateColour() /** * Method getColour - * - * - * + * + * + * * @param index * @return Colour */ @@ -110,123 +111,113 @@ public class JalviewUserColours implements java.io.Serializable throws java.lang.IndexOutOfBoundsException { //-- check bounds for index - if ((index < 0) || (index > _colourList.size())) - { + if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - + return (jalview.binding.Colour) _colourList.elementAt(index); - } - - //-- jalview.binding.Colour getColour(int) + } //-- jalview.binding.Colour getColour(int) /** * Method getColour - * - * - * + * + * + * * @return Colour */ public jalview.binding.Colour[] getColour() { int size = _colourList.size(); jalview.binding.Colour[] mArray = new jalview.binding.Colour[size]; - - for (int index = 0; index < size; index++) - { + for (int index = 0; index < size; index++) { mArray[index] = (jalview.binding.Colour) _colourList.elementAt(index); } - return mArray; - } - - //-- jalview.binding.Colour[] getColour() + } //-- jalview.binding.Colour[] getColour() /** * Method getColourCount - * - * - * + * + * + * * @return int */ public int getColourCount() { return _colourList.size(); - } + } //-- int getColourCount() - //-- int getColourCount() + /** + * Returns the value of field 'schemeName'. + * + * @return String + * @return the value of field 'schemeName'. + */ + public java.lang.String getSchemeName() + { + return this._schemeName; + } //-- java.lang.String getSchemeName() /** * Method isValid - * - * - * + * + * + * * @return boolean */ public boolean isValid() { - try - { + try { validate(); } - catch (org.exolab.castor.xml.ValidationException vex) - { + catch (org.exolab.castor.xml.ValidationException vex) { return false; } - return true; - } - - //-- boolean isValid() + } //-- boolean isValid() /** * Method marshal - * - * - * + * + * + * * @param out */ public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, out); - } - - //-- void marshal(java.io.Writer) + } //-- void marshal(java.io.Writer) /** * Method marshal - * - * - * + * + * + * * @param handler */ public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { + Marshaller.marshal(this, handler); - } - - //-- void marshal(org.xml.sax.ContentHandler) + } //-- void marshal(org.xml.sax.ContentHandler) /** * Method removeAllColour - * + * */ public void removeAllColour() { _colourList.removeAllElements(); - } - - //-- void removeAllColour() + } //-- void removeAllColour() /** * Method removeColour - * - * - * + * + * + * * @param index * @return Colour */ @@ -234,17 +225,14 @@ public class JalviewUserColours implements java.io.Serializable { java.lang.Object obj = _colourList.elementAt(index); _colourList.removeElementAt(index); - return (jalview.binding.Colour) obj; - } - - //-- jalview.binding.Colour removeColour(int) + } //-- jalview.binding.Colour removeColour(int) /** * Method setColour - * - * - * + * + * + * * @param index * @param vColour */ @@ -252,63 +240,61 @@ public class JalviewUserColours implements java.io.Serializable throws java.lang.IndexOutOfBoundsException { //-- check bounds for index - if ((index < 0) || (index > _colourList.size())) - { + if ((index < 0) || (index > _colourList.size())) { throw new IndexOutOfBoundsException(); } - _colourList.setElementAt(vColour, index); - } - - //-- void setColour(int, jalview.binding.Colour) + } //-- void setColour(int, jalview.binding.Colour) /** * Method setColour - * - * - * + * + * + * * @param colourArray */ public void setColour(jalview.binding.Colour[] colourArray) { //-- copy array _colourList.removeAllElements(); - - for (int i = 0; i < colourArray.length; i++) - { + for (int i = 0; i < colourArray.length; i++) { _colourList.addElement(colourArray[i]); } - } + } //-- void setColour(jalview.binding.Colour) - //-- void setColour(jalview.binding.Colour) + /** + * Sets the value of field 'schemeName'. + * + * @param schemeName the value of field 'schemeName'. + */ + public void setSchemeName(java.lang.String schemeName) + { + this._schemeName = schemeName; + } //-- void setSchemeName(java.lang.String) /** * Method unmarshal - * - * - * + * + * + * * @param reader * @return Object */ public static java.lang.Object unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, - org.exolab.castor.xml.ValidationException + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { - return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, - reader); - } - - //-- java.lang.Object unmarshal(java.io.Reader) + return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, reader); + } //-- java.lang.Object unmarshal(java.io.Reader) /** * Method validate - * + * */ - public void validate() throws org.exolab.castor.xml.ValidationException + public void validate() + throws org.exolab.castor.xml.ValidationException { org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); validator.validate(this); - } + } //-- void validate() - //-- void validate() }