From 97f9bc57c862241251b23d08dcc9cbd4dbff99cf Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 27 May 2005 14:06:36 +0000 Subject: [PATCH] Cut and paste changes --- src/jalview/gui/Desktop.java | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 0548646..0dbfe9b 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -277,38 +277,8 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); public void inputTextboxMenuItem_actionPerformed(ActionEvent e) { CutAndPasteTransfer cap = new CutAndPasteTransfer(); - int accept = JOptionPane.showInternalOptionDialog(Desktop.desktop, cap, "Cut & paste Alignment File", - JOptionPane.YES_NO_CANCEL_OPTION, - JOptionPane.PLAIN_MESSAGE, - null, - new Object[]{"Accept", "Cancel", }, null); - - - if(accept == JOptionPane.YES_OPTION) - { - String format = IdentifyFile.Identify(cap.getText(), "Paste"); - SequenceI [] sequences = null; - - if (FormatAdapter.formats.contains( format )) - sequences = FormatAdapter.readFile(cap.getText(), "Paste", format); - - - if(sequences!=null) - { - AlignFrame af = new AlignFrame(new Alignment(sequences)); - af.currentFileFormat = format; - addInternalFrame(af, "Cut & Paste input - "+format, - AlignFrame.NEW_WINDOW_WIDTH, - AlignFrame.NEW_WINDOW_HEIGHT); - af.statusBar.setText("Successfully pasted alignment file"); - } - else - JOptionPane.showInternalMessageDialog(Desktop.desktop, "Couldn't read the pasted text.\n" - +"Formats currently supported are\n" - +"Fasta, MSF, Clustal, BLC, PIR, MSP, and PFAM", - "Error parsing text", JOptionPane.WARNING_MESSAGE); - - } + cap.setForInput(); + Desktop.addInternalFrame(cap, "Cut & Paste Alignment File", 600, 500); } /* -- 1.7.10.2