JAL-1136 JAL-811 JAL-812 store/recover autocalc alignment annotation based on calcId...
[jalview.git] / src / jalview / schemabinding / version2 / Viewport.java
old mode 100755 (executable)
new mode 100644 (file)
index 9d554e6..000844e
@@ -277,46 +277,6 @@ public class Viewport implements java.io.Serializable {
     private boolean _has_ignoreGapsinConsensus;
 
     /**
-     * Field _xpos.
-     */
-    private int _xpos;
-
-    /**
-     * keeps track of state for field: _xpos
-     */
-    private boolean _has_xpos;
-
-    /**
-     * Field _ypos.
-     */
-    private int _ypos;
-
-    /**
-     * keeps track of state for field: _ypos
-     */
-    private boolean _has_ypos;
-
-    /**
-     * Field _width.
-     */
-    private int _width;
-
-    /**
-     * keeps track of state for field: _width
-     */
-    private boolean _has_width;
-
-    /**
-     * Field _height.
-     */
-    private int _height;
-
-    /**
-     * keeps track of state for field: _height
-     */
-    private boolean _has_height;
-
-    /**
      * Field _startRes.
      */
     private int _startRes;
@@ -412,13 +372,54 @@ public class Viewport implements java.io.Serializable {
     private boolean _has_textColThreshold;
 
     /**
-     * unique id used by jalview to synchronize between stored and
-     * instantiated views
+     * unique id used by jalview to
+     *  synchronize between stored and
+     *  instantiated views
      *  
      */
     private java.lang.String _id;
 
     /**
+     * Field _width.
+     */
+    private int _width;
+
+    /**
+     * keeps track of state for field: _width
+     */
+    private boolean _has_width;
+
+    /**
+     * Field _height.
+     */
+    private int _height;
+
+    /**
+     * keeps track of state for field: _height
+     */
+    private boolean _has_height;
+
+    /**
+     * Field _xpos.
+     */
+    private int _xpos;
+
+    /**
+     * keeps track of state for field: _xpos
+     */
+    private boolean _has_xpos;
+
+    /**
+     * Field _ypos.
+     */
+    private int _ypos;
+
+    /**
+     * keeps track of state for field: _ypos
+     */
+    private boolean _has_ypos;
+
+    /**
      * Field _annotationColours.
      */
     private jalview.schemabinding.version2.AnnotationColours _annotationColours;
@@ -428,6 +429,11 @@ public class Viewport implements java.io.Serializable {
      */
     private java.util.Vector _hiddenColumnsList;
 
+    /**
+     * Field _calcIdParamList.
+     */
+    private java.util.Vector _calcIdParamList;
+
 
       //----------------/
      //- Constructors -/
@@ -436,6 +442,7 @@ public class Viewport implements java.io.Serializable {
     public Viewport() {
         super();
         this._hiddenColumnsList = new java.util.Vector();
+        this._calcIdParamList = new java.util.Vector();
     }
 
 
@@ -446,6 +453,34 @@ public class Viewport implements java.io.Serializable {
     /**
      * 
      * 
+     * @param vCalcIdParam
+     * @throws java.lang.IndexOutOfBoundsException if the index
+     * given is outside the bounds of the collection
+     */
+    public void addCalcIdParam(
+            final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+    throws java.lang.IndexOutOfBoundsException {
+        this._calcIdParamList.addElement(vCalcIdParam);
+    }
+
+    /**
+     * 
+     * 
+     * @param index
+     * @param vCalcIdParam
+     * @throws java.lang.IndexOutOfBoundsException if the index
+     * given is outside the bounds of the collection
+     */
+    public void addCalcIdParam(
+            final int index,
+            final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+    throws java.lang.IndexOutOfBoundsException {
+        this._calcIdParamList.add(index, vCalcIdParam);
+    }
+
+    /**
+     * 
+     * 
      * @param vHiddenColumns
      * @throws java.lang.IndexOutOfBoundsException if the index
      * given is outside the bounds of the collection
@@ -724,6 +759,17 @@ public class Viewport implements java.io.Serializable {
     }
 
     /**
+     * Method enumerateCalcIdParam.
+     * 
+     * @return an Enumeration over all
+     * jalview.schemabinding.version2.CalcIdParam elements
+     */
+    public java.util.Enumeration enumerateCalcIdParam(
+    ) {
+        return this._calcIdParamList.elements();
+    }
+
+    /**
      * Method enumerateHiddenColumns.
      * 
      * @return an Enumeration over all
@@ -755,6 +801,51 @@ public class Viewport implements java.io.Serializable {
     }
 
     /**
+     * Method getCalcIdParam.
+     * 
+     * @param index
+     * @throws java.lang.IndexOutOfBoundsException if the index
+     * given is outside the bounds of the collection
+     * @return the value of the
+     * jalview.schemabinding.version2.CalcIdParam at the given index
+     */
+    public jalview.schemabinding.version2.CalcIdParam getCalcIdParam(
+            final int index)
+    throws java.lang.IndexOutOfBoundsException {
+        // check bounds for index
+        if (index < 0 || index >= this._calcIdParamList.size()) {
+            throw new IndexOutOfBoundsException("getCalcIdParam: Index value '" + index + "' not in range [0.." + (this._calcIdParamList.size() - 1) + "]");
+        }
+        
+        return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList.get(index);
+    }
+
+    /**
+     * Method getCalcIdParam.Returns the contents of the collection
+     * in an Array.  <p>Note:  Just in case the collection contents
+     * are changing in another thread, we pass a 0-length Array of
+     * the correct type into the API call.  This way we <i>know</i>
+     * that the Array returned is of exactly the correct length.
+     * 
+     * @return this collection as an Array
+     */
+    public jalview.schemabinding.version2.CalcIdParam[] getCalcIdParam(
+    ) {
+        jalview.schemabinding.version2.CalcIdParam[] array = new jalview.schemabinding.version2.CalcIdParam[0];
+        return (jalview.schemabinding.version2.CalcIdParam[]) this._calcIdParamList.toArray(array);
+    }
+
+    /**
+     * Method getCalcIdParamCount.
+     * 
+     * @return the size of this collection
+     */
+    public int getCalcIdParamCount(
+    ) {
+        return this._calcIdParamList.size();
+    }
+
+    /**
      * Returns the value of field 'centreColumnLabels'.
      * 
      * @return the value of field 'CentreColumnLabels'.
@@ -904,7 +995,8 @@ public class Viewport implements java.io.Serializable {
     /**
      * Returns the value of field 'id'. The field 'id' has the
      * following description: unique id used by jalview to
-     * synchronize between stored and instantiated views
+     *  synchronize between stored and
+     *  instantiated views
      *  
      * 
      * @return the value of field 'Id'.
@@ -1859,12 +1951,43 @@ public class Viewport implements java.io.Serializable {
 
     /**
      */
+    public void removeAllCalcIdParam(
+    ) {
+        this._calcIdParamList.clear();
+    }
+
+    /**
+     */
     public void removeAllHiddenColumns(
     ) {
         this._hiddenColumnsList.clear();
     }
 
     /**
+     * Method removeCalcIdParam.
+     * 
+     * @param vCalcIdParam
+     * @return true if the object was removed from the collection.
+     */
+    public boolean removeCalcIdParam(
+            final jalview.schemabinding.version2.CalcIdParam vCalcIdParam) {
+        boolean removed = _calcIdParamList.remove(vCalcIdParam);
+        return removed;
+    }
+
+    /**
+     * Method removeCalcIdParamAt.
+     * 
+     * @param index
+     * @return the element removed from the collection
+     */
+    public jalview.schemabinding.version2.CalcIdParam removeCalcIdParamAt(
+            final int index) {
+        java.lang.Object obj = this._calcIdParamList.remove(index);
+        return (jalview.schemabinding.version2.CalcIdParam) obj;
+    }
+
+    /**
      * Method removeHiddenColumns.
      * 
      * @param vHiddenColumns
@@ -1910,6 +2033,41 @@ public class Viewport implements java.io.Serializable {
     }
 
     /**
+     * 
+     * 
+     * @param index
+     * @param vCalcIdParam
+     * @throws java.lang.IndexOutOfBoundsException if the index
+     * given is outside the bounds of the collection
+     */
+    public void setCalcIdParam(
+            final int index,
+            final jalview.schemabinding.version2.CalcIdParam vCalcIdParam)
+    throws java.lang.IndexOutOfBoundsException {
+        // check bounds for index
+        if (index < 0 || index >= this._calcIdParamList.size()) {
+            throw new IndexOutOfBoundsException("setCalcIdParam: Index value '" + index + "' not in range [0.." + (this._calcIdParamList.size() - 1) + "]");
+        }
+        
+        this._calcIdParamList.set(index, vCalcIdParam);
+    }
+
+    /**
+     * 
+     * 
+     * @param vCalcIdParamArray
+     */
+    public void setCalcIdParam(
+            final jalview.schemabinding.version2.CalcIdParam[] vCalcIdParamArray) {
+        //-- copy array
+        _calcIdParamList.clear();
+        
+        for (int i = 0; i < vCalcIdParamArray.length; i++) {
+                this._calcIdParamList.add(vCalcIdParamArray[i]);
+        }
+    }
+
+    /**
      * Sets the value of field 'centreColumnLabels'.
      * 
      * @param centreColumnLabels the value of field
@@ -2058,7 +2216,8 @@ public class Viewport implements java.io.Serializable {
     /**
      * Sets the value of field 'id'. The field 'id' has the
      * following description: unique id used by jalview to
-     * synchronize between stored and instantiated views
+     *  synchronize between stored and
+     *  instantiated views
      *  
      * 
      * @param id the value of field 'id'.