/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.StructureViewerModel.StructureData;
import jalview.ext.varna.RnaModel;
import jalview.gui.StructureViewer.ViewerType;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
import jalview.schemabinding.version2.AlcodMap;
import jalview.schemabinding.version2.AlcodonFrame;
import jalview.schemabinding.version2.Annotation;
import java.util.jar.JarOutputStream;
import javax.swing.JInternalFrame;
-import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import org.exolab.castor.xml.Marshaller;
}
}
- if (entry.getProperty() != null && !entry.getProperty().isEmpty())
+ Enumeration<String> props = entry.getProperties();
+ if (props.hasMoreElements())
{
PdbentryItem item = new PdbentryItem();
- Hashtable properties = entry.getProperty();
- Enumeration en2 = properties.keys();
- while (en2.hasMoreElements())
+ while (props.hasMoreElements())
{
Property prop = new Property();
- String key = en2.nextElement().toString();
+ String key = props.nextElement();
prop.setName(key);
- prop.setValue(properties.get(key).toString());
+ prop.setValue(entry.getProperty(key).toString());
item.addProperty(prop);
}
pdb.addPdbentryItem(item);
@Override
public void run()
{
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ JvOptionPane.showInternalMessageDialog(Desktop.desktop,
finalErrorMessage, "Error "
+ (saving ? "saving" : "loading")
- + " Jalview file", JOptionPane.WARNING_MESSAGE);
+ + " Jalview file", JvOptionPane.WARNING_MESSAGE);
}
});
}
entry.setType(PDBEntry.Type.FILE);
}
}
- if (ids[p].getFile() != null)
+ // jprovider is null when executing 'New View'
+ if (ids[p].getFile() != null && jprovider != null)
{
if (!pdbloaded.containsKey(ids[p].getFile()))
{
}
if (ids[p].getPdbentryItem() != null)
{
- entry.setProperty(new Hashtable());
for (PdbentryItem item : ids[p].getPdbentryItem())
{
for (Property pr : item.getProperty())
{
- entry.getProperty().put(pr.getName(), pr.getValue());
+ entry.setProperty(pr.getName(), pr.getValue());
}
}
}
if (cs != null)
{
cs.setThreshold(jGroup.getPidThreshold(), true);
+ cs.setConservationInc(jGroup.getConsThreshold());
}
}
}
if (jGroup.getConsThreshold() != 0)
{
- Conservation c = new Conservation("All", 3,
- sg.getSequences(null), 0, sg.getWidth() - 1);
+ Conservation c = new Conservation("All", sg.getSequences(null),
+ 0, sg.getWidth() - 1);
c.calculate();
c.verdict(false, 25);
sg.cs.setConservation(c);
StructureData filedat = oldFiles.get(id);
String pdbFile = filedat.getFilePath();
SequenceI[] seq = filedat.getSeqList().toArray(new SequenceI[0]);
- binding.getSsm().setMapping(seq, null, pdbFile,
- jalview.io.AppletFormatAdapter.FILE);
+ binding.getSsm().setMapping(seq, null, pdbFile, DataSourceType.FILE);
binding.addSequenceForStructFile(pdbFile, seq);
}
// and add the AlignmentPanel's reference to the view panel
af = new AlignFrame(al, view.getWidth(), view.getHeight(),
uniqueSeqSetId, viewId);
- af.setFileName(file, "Jalview");
+ af.setFileName(file, FileFormat.Jalview);
for (int i = 0; i < JSEQ.length; i++)
{
af.viewport.setShowAnnotation(view.getShowAnnotation());
af.viewport.setAbovePIDThreshold(view.getPidSelected());
+ af.viewport.setThreshold(view.getPidThreshold());
af.viewport.setColourText(view.getShowColourText());
af.viewport.setConservationSelected(view.getConservationSelected());
+ af.viewport.setIncrement(view.getConsThreshold());
af.viewport.setShowJVSuffix(view.getShowFullId());
af.viewport.setRightAlignIds(view.getRightAlignIds());
af.viewport.setFont(
if (cs != null)
{
- cs.setThreshold(view.getPidThreshold(), true);
cs.setConsensus(af.viewport.getSequenceConsensusHash());
}
}