<xs:attribute name="fontName" type="xs:string" />
<xs:attribute name="fontSize" type="xs:int" />
<xs:attribute name="fontStyle" type="xs:int" />
+ <xs:attribute name="scaleProteinAsCdna" type="xs:boolean" use="optional" default="true" />
<xs:attribute name="viewName" type="xs:string" />
<xs:attribute name="sequenceSetId" type="xs:string" />
<xs:attribute name="gatheredViews" type="xs:boolean" />
import org.jmol.modelsetbio.BioModel;
import org.jmol.modelsetbio.BioPolymer;
import org.jmol.viewer.Viewer;
-import org.openscience.jmol.app.JmolApp;
/**
* Import and process PDB files with Jmol
public class PDBFileWithJmol extends AlignFile implements
JmolStatusListener
{
-
- JmolApp jmolApp = null;
-
Viewer viewer = null;
public PDBFileWithJmol(String inFile, String type) throws IOException
public PDBFileWithJmol()
{
- // TODO Auto-generated constructor stub
}
/**
private Viewer getJmolData()
{
if (viewer == null)
- { // note that -o -n -x are all implied // TODO check for Jmol 14.2
- jmolApp = new JmolApp();
- jmolApp.isDataOnly = true;
- jmolApp.haveConsole = false;
- jmolApp.haveDisplay = false;
+ {
try
{
viewer = (Viewer) JmolViewer.allocateViewer(null, null, null, null,
null, "-x -o -n", this);
- viewer.setScreenDimension(jmolApp.startupWidth,
- jmolApp.startupHeight);
- jmolApp.startViewer(viewer, null, false);
} catch (ClassCastException x)
{
throw new Error(MessageManager.formatMessage("error.jmol_version_not_compatible_with_jalview_version", new String[]{JmolViewer.getJmolVersion()}),
}
- // public static AlignFrame getCurrentAlignFrame()
- // {
- // return currentAlignFrame;
- // }
- //
- // public static void setCurrentAlignFrame(AlignFrame currentAlignFrame)
- // {
- // Desktop.currentAlignFrame = currentAlignFrame;
- // }
+ public static AlignFrame getCurrentAlignFrame()
+ {
+ return currentAlignFrame;
+ }
+
+ public static void setCurrentAlignFrame(AlignFrame currentAlignFrame)
+ {
+ Desktop.currentAlignFrame = currentAlignFrame;
+ }
}
*/
package jalview.gui;
+import jalview.api.ViewStyleI;
import jalview.api.structures.JalviewStructureDisplayI;
import jalview.bin.Cache;
import jalview.datamodel.AlignedCodonFrame;
view.setFontName(av.font.getName());
view.setFontSize(av.font.getSize());
view.setFontStyle(av.font.getStyle());
+ view.setScaleProteinAsCdna(av.getViewStyle().isScaleProteinAsCdna());
view.setRenderGaps(av.isRenderGaps());
view.setShowAnnotation(av.isShowAnnotation());
view.setShowBoxes(av.getShowBoxes());
af.viewport.setFont(
new java.awt.Font(view.getFontName(), view.getFontStyle(), view
.getFontSize()), true);
+ ViewStyleI vs = af.viewport.getViewStyle();
+ vs.setScaleProteinAsCdna(view.isScaleProteinAsCdna());
+ af.viewport.setViewStyle(vs);
// TODO: allow custom charWidth/Heights to be restored by updating them
// after setting font - which means set above to false
af.viewport.setRenderGaps(view.getRenderGaps());
public void loadSelectedPDBSequencesToAlignment()
{
// mainFrame.dispose();
+ disableActionButtons();
StringBuilder selectedIds = new StringBuilder();
HashSet<String> selectedIdsSet = new HashSet<String>();
int pdbIdCol = PDBRestClient.getPDBIdColumIndex(wantedFields, false);
seqFetcher.textArea.setText(ids);
Thread worker = new Thread(seqFetcher);
worker.start();
+ delayAndEnableActionButtons();
+
+ }
+
+ private void disableActionButtons()
+ {
+ btn_ok.setEnabled(false);
+ btn_back.setEnabled(false);
+ btn_cancel.setEnabled(false);
+ }
+
+ private void delayAndEnableActionButtons()
+ {
+ new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ Thread.sleep(1500);
+ } catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ btn_ok.setEnabled(true);
+ btn_back.setEnabled(true);
+ btn_cancel.setEnabled(true);
+ }
+ }.start();
}
public static String getPDBIdwithSpecifiedChain(String pdbId,
"zappo", new ZappoColourScheme()), TAYLOR("Taylor", "taylor",
new TaylorColourScheme()), NUCLEOTIDE("Nucleotide", "nucleotide",
new NucleotideColourScheme()), PURINE_PYRIMIDINE(
- "Purine/Pyrimidine", "purine", new PurinePyrimidineColourScheme()), HELIX_PROPENCITY(
+ "Purine/Pyrimidine", "purine", new PurinePyrimidineColourScheme()), HELIX_PROPENSITY(
"Helix Propensity", "helix", new HelixColourScheme()), TURN_PROPENSITY(
"Turn Propensity", "turn", new TurnColourScheme()), STRAND_PROPENSITY(
"Strand Propensity", "strand", new StrandColourScheme()), BURIED_INDEX(
-#Fri Jun 26 14:22:47 BST 2015
+#Thu Sep 03 10:55:37 BST 2015
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
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;
/**
*/
+ public void deleteScaleProteinAsCdna(
+ ) {
+ this._has_scaleProteinAsCdna= false;
+ }
+
+ /**
+ */
public void deleteShowAnnotation(
) {
this._has_showAnnotation= false;
}
/**
+ * 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'.
}
/**
+ * 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
}
/**
+ * 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'.
}
/**
+ * 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'.
typeValidator.setMaxInclusive(2147483647);
}
desc.setValidator(fieldValidator);
+ //-- _scaleProteinAsCdna
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_scaleProteinAsCdna", "scaleProteinAsCdna", org.exolab.castor.xml.NodeType.Attribute);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ Viewport target = (Viewport) object;
+ if (!target.hasScaleProteinAsCdna()) { return null; }
+ return (target.getScaleProteinAsCdna() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ Viewport target = (Viewport) object;
+ // if null, use delete method for optional primitives
+ if (value == null) {
+ target.deleteScaleProteinAsCdna();
+ return;
+ }
+ target.setScaleProteinAsCdna( ((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: _scaleProteinAsCdna
+ 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);
//-- _viewName
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_viewName", "viewName", org.exolab.castor.xml.NodeType.Attribute);
desc.setImmutable(true);