X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fschemabinding%2Fversion2%2FViewport.java;h=e3a19de5f7f7bb33fb19d6f497e99cb7f97d440e;hb=09e3cf7d0e936a9b69fc8f6c7315195694c5127e;hp=9d554e6457a3ac91f76be063ddb9259fdf0b321f;hpb=13ae48dd55af238e2c25e957c5feb5a858d7e90e;p=jalview.git diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java old mode 100755 new mode 100644 index 9d554e6..e3a19de --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -267,54 +267,24 @@ public class Viewport implements java.io.Serializable { private boolean _has_showSequenceLogo; /** - * Field _ignoreGapsinConsensus. + * Field _normaliseSequenceLogo. */ - private boolean _ignoreGapsinConsensus = true; - - /** - * keeps track of state for field: _ignoreGapsinConsensus - */ - private boolean _has_ignoreGapsinConsensus; - - /** - * Field _xpos. - */ - private int _xpos; - - /** - * keeps track of state for field: _xpos - */ - private boolean _has_xpos; + private boolean _normaliseSequenceLogo = false; /** - * 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 + * keeps track of state for field: _normaliseSequenceLogo */ - private boolean _has_width; + private boolean _has_normaliseSequenceLogo; /** - * Field _height. + * Field _ignoreGapsinConsensus. */ - private int _height; + private boolean _ignoreGapsinConsensus = true; /** - * keeps track of state for field: _height + * keeps track of state for field: _ignoreGapsinConsensus */ - private boolean _has_height; + private boolean _has_ignoreGapsinConsensus; /** * Field _startRes. @@ -362,6 +332,16 @@ public class Viewport implements java.io.Serializable { private boolean _has_fontStyle; /** + * Field _scaleProteinAsCdna. + */ + private boolean _scaleProteinAsCdna = true; + + /** + * keeps track of state for field: _scaleProteinAsCdna + */ + private boolean _has_scaleProteinAsCdna; + + /** * Field _viewName. */ private java.lang.String _viewName; @@ -412,13 +392,62 @@ 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; /** + * The viewport id of this viewport's + * (cdna/protein) coding complement, if any + * + */ + private java.lang.String _complementId; + + /** + * 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 +457,11 @@ public class Viewport implements java.io.Serializable { */ private java.util.Vector _hiddenColumnsList; + /** + * Field _calcIdParamList. + */ + private java.util.Vector _calcIdParamList; + //----------------/ //- Constructors -/ @@ -436,6 +470,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 +481,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 @@ -543,6 +606,13 @@ public class Viewport implements java.io.Serializable { /** */ + public void deleteNormaliseSequenceLogo( + ) { + this._has_normaliseSequenceLogo= false; + } + + /** + */ public void deletePidSelected( ) { this._has_pidSelected= false; @@ -571,6 +641,13 @@ public class Viewport implements java.io.Serializable { /** */ + public void deleteScaleProteinAsCdna( + ) { + this._has_scaleProteinAsCdna= false; + } + + /** + */ public void deleteShowAnnotation( ) { this._has_showAnnotation= false; @@ -724,6 +801,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 +843,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.
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 know + * 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'. @@ -765,6 +898,20 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'complementId'. The field + * 'complementId' has the following description: The viewport + * id of this viewport's + * (cdna/protein) coding complement, if any + * + * + * @return the value of field 'ComplementId'. + */ + public java.lang.String getComplementId( + ) { + return this._complementId; + } + + /** * Returns the value of field 'consThreshold'. * * @return the value of field 'ConsThreshold'. @@ -904,7 +1051,9 @@ 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'. @@ -925,6 +1074,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'normaliseSequenceLogo'. + * + * @return the value of field 'NormaliseSequenceLogo'. + */ + public boolean getNormaliseSequenceLogo( + ) { + return this._normaliseSequenceLogo; + } + + /** * Returns the value of field 'pidSelected'. * * @return the value of field 'PidSelected'. @@ -965,6 +1124,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'scaleProteinAsCdna'. + * + * @return the value of field 'ScaleProteinAsCdna'. + */ + public boolean getScaleProteinAsCdna( + ) { + return this._scaleProteinAsCdna; + } + + /** * Returns the value of field 'sequenceSetId'. * * @return the value of field 'SequenceSetId'. @@ -1317,6 +1486,17 @@ public class Viewport implements java.io.Serializable { } /** + * Method hasNormaliseSequenceLogo. + * + * @return true if at least one NormaliseSequenceLogo has been + * added + */ + public boolean hasNormaliseSequenceLogo( + ) { + return this._has_normaliseSequenceLogo; + } + + /** * Method hasPidSelected. * * @return true if at least one PidSelected has been added @@ -1357,6 +1537,16 @@ public class Viewport implements java.io.Serializable { } /** + * Method hasScaleProteinAsCdna. + * + * @return true if at least one ScaleProteinAsCdna has been adde + */ + public boolean hasScaleProteinAsCdna( + ) { + return this._has_scaleProteinAsCdna; + } + + /** * Method hasShowAnnotation. * * @return true if at least one ShowAnnotation has been added @@ -1641,6 +1831,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'normaliseSequenceLogo'. + * + * @return the value of field 'NormaliseSequenceLogo'. + */ + public boolean isNormaliseSequenceLogo( + ) { + return this._normaliseSequenceLogo; + } + + /** * Returns the value of field 'pidSelected'. * * @return the value of field 'PidSelected'. @@ -1671,6 +1871,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'scaleProteinAsCdna'. + * + * @return the value of field 'ScaleProteinAsCdna'. + */ + public boolean isScaleProteinAsCdna( + ) { + return this._scaleProteinAsCdna; + } + + /** * Returns the value of field 'showAnnotation'. * * @return the value of field 'ShowAnnotation'. @@ -1859,12 +2069,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 +2151,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 @@ -1922,6 +2198,20 @@ public class Viewport implements java.io.Serializable { } /** + * Sets the value of field 'complementId'. The field + * 'complementId' has the following description: The viewport + * id of this viewport's + * (cdna/protein) coding complement, if any + * + * + * @param complementId the value of field 'complementId'. + */ + public void setComplementId( + final java.lang.String complementId) { + this._complementId = complementId; + } + + /** * Sets the value of field 'consThreshold'. * * @param consThreshold the value of field 'consThreshold'. @@ -2058,7 +2348,9 @@ 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'. @@ -2081,6 +2373,18 @@ public class Viewport implements java.io.Serializable { } /** + * Sets the value of field 'normaliseSequenceLogo'. + * + * @param normaliseSequenceLogo the value of field + * 'normaliseSequenceLogo'. + */ + public void setNormaliseSequenceLogo( + final boolean normaliseSequenceLogo) { + this._normaliseSequenceLogo = normaliseSequenceLogo; + this._has_normaliseSequenceLogo = true; + } + + /** * Sets the value of field 'pidSelected'. * * @param pidSelected the value of field 'pidSelected'. @@ -2125,6 +2429,18 @@ public class Viewport implements java.io.Serializable { } /** + * Sets the value of field 'scaleProteinAsCdna'. + * + * @param scaleProteinAsCdna the value of field + * 'scaleProteinAsCdna'. + */ + public void setScaleProteinAsCdna( + final boolean scaleProteinAsCdna) { + this._scaleProteinAsCdna = scaleProteinAsCdna; + this._has_scaleProteinAsCdna = true; + } + + /** * Sets the value of field 'sequenceSetId'. * * @param sequenceSetId the value of field 'sequenceSetId'.