*/
package jalview.gui;
-import java.awt.Rectangle;
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
-
-import javax.swing.JInternalFrame;
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-
-import org.exolab.castor.xml.Unmarshaller;
-
import jalview.api.structures.JalviewStructureDisplayI;
import jalview.bin.Cache;
import jalview.datamodel.AlignedCodonFrame;
import jalview.ws.params.AutoCalcSetting;
import jalview.ws.params.WsParamSetI;
+import java.awt.Rectangle;
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.Vector;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+import java.util.jar.JarOutputStream;
+
+import javax.swing.JInternalFrame;
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import org.exolab.castor.xml.Unmarshaller;
+
/**
* Write out the current jalview desktop state as a Jalview XML stream.
*
view.setShowGroupConservation(av.isShowGroupConservation());
view.setShowNPfeatureTooltip(av.isShowNPFeats());
view.setShowDbRefTooltip(av.isShowDBRefs());
- view.setFollowHighlight(av.followHighlight);
+ view.setFollowHighlight(av.isFollowHighlight());
view.setFollowSelection(av.followSelection);
view.setIgnoreGapsinConsensus(av.isIgnoreGapsConsensus());
if (av.getFeaturesDisplayed() != null)
int height = (int) (dnaFrame.getBounds().getHeight()
+ proteinFrame.getBounds().getHeight() + 50);
Desktop.addInternalFrame(splitFrame, title, width, height);
+
+ /*
+ * And compute cDNA consensus (couldn't do earlier with consensus as
+ * mappings were not yet present)
+ */
+ proteinFrame.viewport.alignmentChanged(proteinFrame.alignPanel);
+
return splitFrame;
}
{
jalview.datamodel.PDBEntry entry = new jalview.datamodel.PDBEntry();
entry.setId(ids[p].getId());
- entry.setType(ids[p].getType());
+ if (ids[p].getType() != null)
+ {
+ if (ids[p].getType().equalsIgnoreCase("PDB"))
+ {
+ entry.setType(PDBEntry.Type.PDB);
+ }
+ else
+ {
+ entry.setType(PDBEntry.Type.FILE);
+ }
+ }
if (ids[p].getFile() != null)
{
if (!pdbloaded.containsKey(ids[p].getFile()))
{
String filePath = pdb.getValue().getFilePath();
String pdbId = pdb.getValue().getPdbId();
- pdbs.add(new PDBEntry(filePath, pdbId));
+ // pdbs.add(new PDBEntry(filePath, pdbId));
+ pdbs.add(new PDBEntry(pdbId, null, PDBEntry.Type.PDB, filePath));
final List<SequenceI> seqList = pdb.getValue().getSeqList();
SequenceI[] seqs = seqList.toArray(new SequenceI[seqList.size()]);
allseqs.add(seqs);
(OutOfMemoryError) ex.getCause());
if (sview != null && sview.isVisible())
{
- sview.closeViewer();
+ sview.closeViewer(false);
sview.setVisible(false);
sview.dispose();
}
}
if (view.hasFollowHighlight())
{
- af.viewport.followHighlight = view.getFollowHighlight();
+ af.viewport.setFollowHighlight(view.getFollowHighlight());
}
if (view.hasFollowSelection())
{