JAL-824 - patch to schema to allow jmol colouring state to be stored
[jalview.git] / src / jalview / schemabinding / version2 / StructureState.java
index 4432971..c269dce 100644 (file)
@@ -112,13 +112,25 @@ public class StructureState implements java.io.Serializable {
      * in this structureState(since Jalview 2.7).
      *  
      */
-    private boolean _colourwithAlignPanel = true;
+    private boolean _colourwithAlignPanel = false;
 
     /**
      * keeps track of state for field: _colourwithAlignPanel
      */
     private boolean _has_colourwithAlignPanel;
 
+    /**
+     * Flag set if the structure display is coloured by the Jmol
+     * state, rather than by one or more linked alignment views.
+     *  
+     */
+    private boolean _colourByJmol = true;
+
+    /**
+     * keeps track of state for field: _colourByJmol
+     */
+    private boolean _has_colourByJmol;
+
 
       //----------------/
      //- Constructors -/
@@ -143,6 +155,13 @@ public class StructureState implements java.io.Serializable {
 
     /**
      */
+    public void deleteColourByJmol(
+    ) {
+        this._has_colourByJmol= false;
+    }
+
+    /**
+     */
     public void deleteColourwithAlignPanel(
     ) {
         this._has_colourwithAlignPanel= false;
@@ -199,6 +218,20 @@ public class StructureState implements java.io.Serializable {
     }
 
     /**
+     * Returns the value of field 'colourByJmol'. The field
+     * 'colourByJmol' has the following description: Flag set if
+     * the structure display is coloured by the Jmol state, rather
+     * than by one or more linked alignment views.
+     *  
+     * 
+     * @return the value of field 'ColourByJmol'.
+     */
+    public boolean getColourByJmol(
+    ) {
+        return this._colourByJmol;
+    }
+
+    /**
      * Returns the value of field 'colourwithAlignPanel'. The field
      * 'colourwithAlignPanel' has the following description: Flag
      * set if the alignment panel containing this JSeq should be
@@ -305,6 +338,16 @@ public class StructureState implements java.io.Serializable {
     }
 
     /**
+     * Method hasColourByJmol.
+     * 
+     * @return true if at least one ColourByJmol has been added
+     */
+    public boolean hasColourByJmol(
+    ) {
+        return this._has_colourByJmol;
+    }
+
+    /**
      * Method hasColourwithAlignPanel.
      * 
      * @return true if at least one ColourwithAlignPanel has been
@@ -381,6 +424,20 @@ public class StructureState implements java.io.Serializable {
     }
 
     /**
+     * Returns the value of field 'colourByJmol'. The field
+     * 'colourByJmol' has the following description: Flag set if
+     * the structure display is coloured by the Jmol state, rather
+     * than by one or more linked alignment views.
+     *  
+     * 
+     * @return the value of field 'ColourByJmol'.
+     */
+    public boolean isColourByJmol(
+    ) {
+        return this._colourByJmol;
+    }
+
+    /**
      * Returns the value of field 'colourwithAlignPanel'. The field
      * 'colourwithAlignPanel' has the following description: Flag
      * set if the alignment panel containing this JSeq should be
@@ -470,6 +527,21 @@ public class StructureState implements java.io.Serializable {
     }
 
     /**
+     * Sets the value of field 'colourByJmol'. The field
+     * 'colourByJmol' has the following description: Flag set if
+     * the structure display is coloured by the Jmol state, rather
+     * than by one or more linked alignment views.
+     *  
+     * 
+     * @param colourByJmol the value of field 'colourByJmol'.
+     */
+    public void setColourByJmol(
+            final boolean colourByJmol) {
+        this._colourByJmol = colourByJmol;
+        this._has_colourByJmol = true;
+    }
+
+    /**
      * Sets the value of field 'colourwithAlignPanel'. The field
      * 'colourwithAlignPanel' has the following description: Flag
      * set if the alignment panel containing this JSeq should be