XML schema changes
[jalview.git] / src / jalview / binding / JalviewUserColours.java
similarity index 51%
rename from src/jalview/binding/JalviewState.java
rename to src/jalview/binding/JalviewUserColours.java
index ad9d1b3..676a623 100755 (executable)
@@ -15,7 +15,6 @@ import java.io.IOException;
 import java.io.Reader;\r
 import java.io.Serializable;\r
 import java.io.Writer;\r
-import java.util.Date;\r
 import java.util.Enumeration;\r
 import java.util.Vector;\r
 import org.exolab.castor.xml.MarshalException;\r
@@ -25,11 +24,11 @@ import org.exolab.castor.xml.ValidationException;
 import org.xml.sax.ContentHandler;\r
 \r
 /**\r
- * Class JalviewState.\r
+ * Class JalviewUserColours.\r
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class JalviewState implements java.io.Serializable {\r
+public class JalviewUserColours implements java.io.Serializable {\r
 \r
 \r
       //--------------------------/\r
@@ -37,24 +36,19 @@ public class JalviewState implements java.io.Serializable {
     //--------------------------/\r
 \r
     /**\r
-     * Field _creationDate\r
+     * Field _colourList\r
      */\r
-    private java.util.Date _creationDate;\r
-\r
-    /**\r
-     * Field _fileList\r
-     */\r
-    private java.util.Vector _fileList;\r
+    private java.util.Vector _colourList;\r
 \r
 \r
       //----------------/\r
      //- Constructors -/\r
     //----------------/\r
 \r
-    public JalviewState() {\r
+    public JalviewUserColours() {\r
         super();\r
-        _fileList = new Vector();\r
-    } //-- jalview.binding.JalviewState()\r
+        _colourList = new Vector();\r
+    } //-- jalview.binding.JalviewUserColours()\r
 \r
 \r
       //-----------/\r
@@ -62,102 +56,91 @@ public class JalviewState implements java.io.Serializable {
     //-----------/\r
 \r
     /**\r
-     * Method addFile\r
+     * Method addColour\r
      * \r
      * \r
      * \r
-     * @param vFile\r
+     * @param vColour\r
      */\r
-    public void addFile(java.lang.String vFile)\r
+    public void addColour(jalview.binding.Colour vColour)\r
         throws java.lang.IndexOutOfBoundsException\r
     {\r
-        _fileList.addElement(vFile);\r
-    } //-- void addFile(java.lang.String) \r
+        _colourList.addElement(vColour);\r
+    } //-- void addColour(jalview.binding.Colour) \r
 \r
     /**\r
-     * Method addFile\r
+     * Method addColour\r
      * \r
      * \r
      * \r
      * @param index\r
-     * @param vFile\r
+     * @param vColour\r
      */\r
-    public void addFile(int index, java.lang.String vFile)\r
+    public void addColour(int index, jalview.binding.Colour vColour)\r
         throws java.lang.IndexOutOfBoundsException\r
     {\r
-        _fileList.insertElementAt(vFile, index);\r
-    } //-- void addFile(int, java.lang.String) \r
+        _colourList.insertElementAt(vColour, index);\r
+    } //-- void addColour(int, jalview.binding.Colour) \r
 \r
     /**\r
-     * Method enumerateFile\r
+     * Method enumerateColour\r
      * \r
      * \r
      * \r
      * @return Enumeration\r
      */\r
-    public java.util.Enumeration enumerateFile()\r
+    public java.util.Enumeration enumerateColour()\r
     {\r
-        return _fileList.elements();\r
-    } //-- java.util.Enumeration enumerateFile() \r
+        return _colourList.elements();\r
+    } //-- java.util.Enumeration enumerateColour() \r
 \r
     /**\r
-     * Returns the value of field 'creationDate'.\r
-     * \r
-     * @return Date\r
-     * @return the value of field 'creationDate'.\r
-     */\r
-    public java.util.Date getCreationDate()\r
-    {\r
-        return this._creationDate;\r
-    } //-- java.util.Date getCreationDate() \r
-\r
-    /**\r
-     * Method getFile\r
+     * Method getColour\r
      * \r
      * \r
      * \r
      * @param index\r
-     * @return String\r
+     * @return Colour\r
      */\r
-    public java.lang.String getFile(int index)\r
+    public jalview.binding.Colour getColour(int index)\r
         throws java.lang.IndexOutOfBoundsException\r
     {\r
         //-- check bounds for index\r
-        if ((index < 0) || (index > _fileList.size())) {\r
+        if ((index < 0) || (index > _colourList.size())) {\r
             throw new IndexOutOfBoundsException();\r
         }\r
         \r
-        return (String)_fileList.elementAt(index);\r
-    } //-- java.lang.String getFile(int) \r
+        return (jalview.binding.Colour) _colourList.elementAt(index);\r
+    } //-- jalview.binding.Colour getColour(int) \r
 \r
     /**\r
-     * Method getFile\r
+     * Method getColour\r
      * \r
      * \r
      * \r
-     * @return String\r
+     * @return Colour\r
      */\r
-    public java.lang.String[] getFile()\r
+    public jalview.binding.Colour[] getColour()\r
     {\r
-        int size = _fileList.size();\r
-        java.lang.String[] mArray = new java.lang.String[size];\r
+        int size = _colourList.size();\r
+        jalview.binding.Colour[] mArray = new jalview.binding.Colour[size];\r
         for (int index = 0; index < size; index++) {\r
-            mArray[index] = (String)_fileList.elementAt(index);\r
+            mArray[index] = (jalview.binding.Colour) _colourList.elementAt(index);\r
         }\r
         return mArray;\r
-    } //-- java.lang.String[] getFile() \r
+    } //-- jalview.binding.Colour[] getColour() \r
 \r
     /**\r
-     * Method getFileCount\r
+     * Method getColourCount\r
      * \r
      * \r
      * \r
      * @return int\r
      */\r
-    public int getFileCount()\r
+    public int getColourCount()\r
     {\r
-        return _fileList.size();\r
-    } //-- int getFileCount() \r
+        return _colourList.size();\r
+    } //-- int getColourCount() \r
 \r
     /**\r
      * Method isValid\r
@@ -206,72 +189,62 @@ public class JalviewState implements java.io.Serializable {
     } //-- void marshal(org.xml.sax.ContentHandler) \r
 \r
     /**\r
-     * Method removeAllFile\r
+     * Method removeAllColour\r
      * \r
      */\r
-    public void removeAllFile()\r
+    public void removeAllColour()\r
     {\r
-        _fileList.removeAllElements();\r
-    } //-- void removeAllFile() \r
+        _colourList.removeAllElements();\r
+    } //-- void removeAllColour() \r
 \r
     /**\r
-     * Method removeFile\r
+     * Method removeColour\r
      * \r
      * \r
      * \r
      * @param index\r
-     * @return String\r
-     */\r
-    public java.lang.String removeFile(int index)\r
-    {\r
-        java.lang.Object obj = _fileList.elementAt(index);\r
-        _fileList.removeElementAt(index);\r
-        return (String)obj;\r
-    } //-- java.lang.String removeFile(int) \r
-\r
-    /**\r
-     * Sets the value of field 'creationDate'.\r
-     * \r
-     * @param creationDate the value of field 'creationDate'.\r
+     * @return Colour\r
      */\r
-    public void setCreationDate(java.util.Date creationDate)\r
+    public jalview.binding.Colour removeColour(int index)\r
     {\r
-        this._creationDate = creationDate;\r
-    } //-- void setCreationDate(java.util.Date) \r
+        java.lang.Object obj = _colourList.elementAt(index);\r
+        _colourList.removeElementAt(index);\r
+        return (jalview.binding.Colour) obj;\r
+    } //-- jalview.binding.Colour removeColour(int) \r
 \r
     /**\r
-     * Method setFile\r
+     * Method setColour\r
      * \r
      * \r
      * \r
      * @param index\r
-     * @param vFile\r
+     * @param vColour\r
      */\r
-    public void setFile(int index, java.lang.String vFile)\r
+    public void setColour(int index, jalview.binding.Colour vColour)\r
         throws java.lang.IndexOutOfBoundsException\r
     {\r
         //-- check bounds for index\r
-        if ((index < 0) || (index > _fileList.size())) {\r
+        if ((index < 0) || (index > _colourList.size())) {\r
             throw new IndexOutOfBoundsException();\r
         }\r
-        _fileList.setElementAt(vFile, index);\r
-    } //-- void setFile(int, java.lang.String) \r
+        _colourList.setElementAt(vColour, index);\r
+    } //-- void setColour(int, jalview.binding.Colour) \r
 \r
     /**\r
-     * Method setFile\r
+     * Method setColour\r
      * \r
      * \r
      * \r
-     * @param fileArray\r
+     * @param colourArray\r
      */\r
-    public void setFile(java.lang.String[] fileArray)\r
+    public void setColour(jalview.binding.Colour[] colourArray)\r
     {\r
         //-- copy array\r
-        _fileList.removeAllElements();\r
-        for (int i = 0; i < fileArray.length; i++) {\r
-            _fileList.addElement(fileArray[i]);\r
+        _colourList.removeAllElements();\r
+        for (int i = 0; i < colourArray.length; i++) {\r
+            _colourList.addElement(colourArray[i]);\r
         }\r
-    } //-- void setFile(java.lang.String) \r
+    } //-- void setColour(jalview.binding.Colour) \r
 \r
     /**\r
      * Method unmarshal\r
@@ -284,7 +257,7 @@ public class JalviewState implements java.io.Serializable {
     public static java.lang.Object unmarshal(java.io.Reader reader)\r
         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
     {\r
-        return (jalview.binding.JalviewState) Unmarshaller.unmarshal(jalview.binding.JalviewState.class, reader);\r
+        return (jalview.binding.JalviewUserColours) Unmarshaller.unmarshal(jalview.binding.JalviewUserColours.class, reader);\r
     } //-- java.lang.Object unmarshal(java.io.Reader) \r
 \r
     /**\r