X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBViewer.java;h=a5f050d19e8a8cd332efda32c45b46bfa3600cfd;hb=a45774ee31d9f35d4eff46d54d7deab719afb092;hp=dda04a8fd5a1acf0e9cd1ae6e586a614fa916a4c;hpb=506d60f0e188723ddc91c26824b41ac7034df3fe;p=jalview.git diff --git a/src/MCview/PDBViewer.java b/src/MCview/PDBViewer.java index dda04a8..a5f050d 100755 --- a/src/MCview/PDBViewer.java +++ b/src/MCview/PDBViewer.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) - * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package MCview; @@ -361,8 +360,7 @@ public class PDBViewer extends JInternalFrame implements Runnable if (evt.isControlDown() || SwingUtilities.isRightMouseButton(evt)) { - radioItem - .removeActionListener(radioItem.getActionListeners()[0]); + radioItem.removeActionListener(radioItem.getActionListeners()[0]); int option = JOptionPane.showInternalConfirmDialog( jalview.gui.Desktop.desktop, @@ -460,7 +458,7 @@ public class PDBViewer extends JInternalFrame implements Runnable * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ public void eps_actionPerformed(ActionEvent e) { @@ -471,7 +469,7 @@ public class PDBViewer extends JInternalFrame implements Runnable * DOCUMENT ME! * * @param e - * DOCUMENT ME! + * DOCUMENT ME! */ public void png_actionPerformed(ActionEvent e) { @@ -493,8 +491,8 @@ public class PDBViewer extends JInternalFrame implements Runnable else { im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.EPS, - "Make EPS file from view", width, height, null, this - .getTitle()); + "Make EPS file from view", width, height, null, + this.getTitle()); } if (im.getGraphics() != null) @@ -565,8 +563,15 @@ public class PDBViewer extends JInternalFrame implements Runnable 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) @@ -654,8 +659,8 @@ public class PDBViewer extends JInternalFrame implements Runnable public void savePDB_actionPerformed(ActionEvent e) { - JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache - .getProperty("LAST_DIRECTORY")); + JalviewFileChooser chooser = new JalviewFileChooser( + jalview.bin.Cache.getProperty("LAST_DIRECTORY")); chooser.setFileView(new JalviewFileView()); chooser.setDialogTitle("Save PDB File");