</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="colourwithAlignPanel" type="xs:boolean" use="optional" default="true">
+ <xs:attribute name="colourwithAlignPanel" type="xs:boolean" use="optional" default="false">
<xs:annotation>
<xs:documentation>
Flag set if the alignment panel containing this JSeq should be included in those used to colour its associated sequences in this structureState(since Jalview 2.7).
</xs:documentation>
</xs:annotation>
</xs:attribute>
-
+ <xs:attribute name="colourByJmol" type="xs:boolean" use="optional" default="true">
+ <xs:annotation><xs:documentation>
+ Flag set if the structure display is coloured by the Jmol state, rather than by one or more linked alignment views.
+ </xs:documentation></xs:annotation></xs:attribute>
</xs:extension>
</xs:simpleContent>
state.setAlignwithAlignPanel(jmol.isUsedforaligment(ap));
state.setColourwithAlignPanel(jmol
.isUsedforcolourby(ap));
+ state.setColourByJmol(jmol.isColouredByJmol());
if (!jmolViewIds.contains(state.getViewId()))
{
// Make sure we only store a Jmol state once in each XML
{ new int[]
{ x, y, width, height }, "",
new Hashtable<String, Object[]>(), new boolean[]
- { false, false } });
+ { false, false, true } });
// Legacy pre-2.7 conversion JAL-823 :
// do not assume any view has to be linked for colour by sequence
}
.hasColourwithAlignPanel() ? ids[p]
.getStructureState(s).getColourwithAlignPanel()
: false;
+ // default for pre-2.7 projects is that Jmol colouring is enabled
+ ((boolean[])jmoldat[3])[2] &=ids[p].getStructureState(s).hasColourByJmol() ? ids[p].getStructureState(s).getColourByJmol() : true;
if (((String) jmoldat[1]).length() < ids[p]
.getStructureState(s).getContent().length())
int[] geom = (int[]) svattrib[0];
String state = (String) svattrib[1];
Hashtable<String, Object[]> oldFiles = (Hashtable<String, Object[]>) svattrib[2];
- final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1];
+ final boolean useinJmolsuperpos = ((boolean[]) svattrib[3])[0], usetoColourbyseq = ((boolean[]) svattrib[3])[1], jmolColouring=((boolean[])svattrib[3])[2];
int x = geom[0], y = geom[1], width = geom[2], height = geom[3];
// collate the pdbfile -> sequence mappings from this view
Vector<String> pdbfilenames = new Vector<String>();
try
{
sview = new AppJmol(pdbf, id, sq, alf.alignPanel,
- useinJmolsuperpos, usetoColourbyseq, fileloc,
+ useinJmolsuperpos, usetoColourbyseq, jmolColouring, fileloc,
rect, vid);
} catch (OutOfMemoryError ex)
{
}
if (usetoColourbyseq)
{
- ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap);
+ ((AppJmol) comp).useAlignmentPanelForColourbyseq(ap, !jmolColouring);
}
else
{
-#Tue Apr 19 14:59:20 BST 2011
+#Mon Apr 25 14:07:25 BST 2011
jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor
jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor
jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor
* 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 -/
/**
*/
+ public void deleteColourByJmol(
+ ) {
+ this._has_colourByJmol= false;
+ }
+
+ /**
+ */
public void deleteColourwithAlignPanel(
) {
this._has_colourwithAlignPanel= false;
}
/**
+ * 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
}
/**
+ * 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
}
/**
+ * 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
}
/**
+ * 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
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
+ //-- _colourByJmol
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_colourByJmol", "colourByJmol", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ StructureState target = (StructureState) object;
+ if (!target.hasColourByJmol()) { return null; }
+ return (target.getColourByJmol() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ StructureState target = (StructureState) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteColourByJmol();
+ return;
+ }
+ target.setColourByJmol( ((java.lang.Boolean) value).booleanValue());
+ } catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance(java.lang.Object parent) {
+ return null;
+ }
+ };
+ desc.setHandler(handler);
+ desc.setMultivalued(false);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _colourByJmol
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ { //-- local scope
+ org.exolab.castor.xml.validators.BooleanValidator typeValidator;
+ typeValidator = new org.exolab.castor.xml.validators.BooleanValidator();
+ fieldValidator.setValidator(typeValidator);
+ }
+ desc.setValidator(fieldValidator);
//-- initialize element descriptors
}