public void mapping_actionPerformed(ActionEvent e)
{
jalview.gui.CutAndPasteTransfer cap = new jalview.gui.CutAndPasteTransfer();
- Desktop.addInternalFrame(cap, "PDB - Sequence Mapping", 550, 600);
- cap.setText(pdbcanvas.mappingDetails.toString());
+ try {
+ cap.setText(pdbcanvas.mappingDetails.toString());
+ Desktop.addInternalFrame(cap, "PDB - Sequence Mapping", 550, 600);
+ } catch (OutOfMemoryError oom)
+ {
+ new OOMWarning("Opening sequence to structure mapping report",oom);
+ cap.dispose();
+ }
}
public void allchains_itemStateChanged(ItemEvent e)
CutAndPasteTransfer cap = new CutAndPasteTransfer();
cap.setForInput(null);
+
+ try {
+ cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),
+ viewport.alignment, omitHidden, viewport.colSel));
Desktop.addInternalFrame(cap, "Alignment output - "
+ e.getActionCommand(), 600, 500);
+ } catch (OutOfMemoryError oom)
+ {
+ new OOMWarning("Outputting alignment as "+e.getActionCommand(),oom);
+ cap.dispose();
+ }
- cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),
- viewport.alignment, omitHidden, viewport.colSel));
}
/**
\r
public void toFile_actionPerformed(ActionEvent e)\r
{\r
- JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache\r
- .getProperty("LAST_DIRECTORY"));\r
+ JalviewFileChooser chooser = new JalviewFileChooser(\r
+ jalview.bin.Cache.getProperty("LAST_DIRECTORY"));\r
\r
chooser.setFileView(new JalviewFileView());\r
chooser.setDialogTitle(features ? "Save Features to File"\r
}\r
\r
CutAndPasteTransfer cap = new CutAndPasteTransfer();\r
- cap.setText(text);\r
- Desktop.addInternalFrame(cap, (features ? "Features for - "\r
- : "Annotations for - ")\r
- + ap.alignFrame.getTitle(), 600, 500);\r
+ try\r
+ {\r
+ cap.setText(text);\r
+ Desktop.addInternalFrame(cap, (features ? "Features for - "\r
+ : "Annotations for - ") + ap.alignFrame.getTitle(), 600, 500);\r
+ } catch (OutOfMemoryError oom)\r
+ {\r
+ new OOMWarning("generating "\r
+ + (features ? "Features for - " : "Annotations for - ")\r
+ + ap.alignFrame.getTitle(), oom);\r
+ cap.dispose();\r
+ }\r
\r
close_actionPerformed(null);\r
}\r
buffer.append("PID");
}
- Desktop.addInternalFrame(cap, buffer.toString(), 500, 100);
jalview.io.NewickFile fout = new jalview.io.NewickFile(tree
.getTopNode());
- cap.setText(fout.print(tree.isHasBootstrap(), tree.isHasDistances(),
+ try {
+ cap.setText(fout.print(tree.isHasBootstrap(), tree.isHasDistances(),
tree.isHasRootDistance()));
+ Desktop.addInternalFrame(cap, buffer.toString(), 500, 100);
+ } catch (OutOfMemoryError oom)
+ {
+ new OOMWarning("generating newick tree file",oom);
+ cap.dispose();
+ }
+
}
/**