{
AlignFrame af = new AlignFrame(new Alignment(sequences));
af.currentFileFormat = format;
- Desktop.addInternalFrame(af, "Cut & Paste input - "+format,
- AlignFrame.NEW_WINDOW_WIDTH,
- AlignFrame.NEW_WINDOW_HEIGHT);
+ Desktop.addInternalFrame(af, "Cut & Paste input - " + format,
+ AlignFrame.NEW_WINDOW_WIDTH,
+ AlignFrame.NEW_WINDOW_HEIGHT);
af.statusBar.setText("Successfully pasted alignment file");
+ try
+ { af.setMaximum(Preferences.showFullscreen); }
+ catch (Exception ex)
+ {}
+ try
+ {
+ this.setClosed(true);
+ }
+ catch (Exception ex)
+ {}
+
+
}
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);
-
+ 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);
}
public void cancel_actionPerformed(ActionEvent e)
import javax.swing.*;\r
import java.awt.*;\r
import java.awt.event.*;\r
-\r
+import java.beans.VetoableChangeListener;\r
+import java.beans.PropertyChangeEvent;\r
+import java.beans.PropertyVetoException;\r
\r
public class GCutAndPasteTransfer extends JInternalFrame\r
{\r
}\r
});\r
textarea.setBorder(null);\r
+ textarea.addVetoableChangeListener(new VetoableChangeListener()\r
+ {\r
+ public void vetoableChange(PropertyChangeEvent evt)\r
+ {\r
+ try\r
+ {\r
+ textarea_vetoableChange(evt);\r
+ }\r
+ catch (java.beans.PropertyVetoException exception0)\r
+ {\r
+ exception0.printStackTrace();\r
+ }\r
+\r
+ }\r
+ });\r
editMenubar.add(editMenu);\r
textarea.setFont(new java.awt.Font("Verdana", 0, 12));\r
- textarea.setText("Paste your alignment file here");\r
textarea.addMouseListener(new java.awt.event.MouseAdapter()\r
{\r
public void mousePressed(MouseEvent e)\r
\r
}\r
\r
+ public void textarea_vetoableChange(PropertyChangeEvent evt)\r
+ throws PropertyVetoException\r
+ {\r
+\r
+ }\r
+\r
}\r