/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.SequenceI;
+import jalview.io.AppletFormatAdapter;
import jalview.io.FileParse;
import jalview.io.FormatAdapter;
import jalview.io.IdentifyFile;
AlignViewportI viewport;
FileParse source = null;
+
public CutAndPasteTransfer()
{
SwingUtilities.invokeLater(new Runnable()
chooser.setAcceptAllFileFilterUsed(false);
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle(MessageManager.getString("label.save_text_to_file"));
+ chooser.setDialogTitle(MessageManager
+ .getString("label.save_text_to_file"));
chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
if (format == null || format.equalsIgnoreCase("EMPTY DATA FILE"))
{
System.err.println(MessageManager
- .getString("label.null_or_unidentifiable_data"));
+ .getString("label.couldnt_read_data"));
if (!Jalview.isHeadlessMode())
{
- JOptionPane.showMessageDialog(null,
- MessageManager
- .getString("label.null_or_unidentifiable_data"),
- MessageManager.getString("label.unidentifiable_data"),
- JOptionPane.ERROR_MESSAGE);
+ javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ AppletFormatAdapter.SUPPORTED_FORMATS,
+ MessageManager.getString("label.couldnt_read_data"),
+ JOptionPane.WARNING_MESSAGE);
}
return;
}
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
MessageManager.formatMessage(
- "label.couldnt_read_pasted_text", new String[]
- { ex.toString() }), MessageManager
+ "label.couldnt_read_pasted_text",
+ new String[] { ex.toString() }), MessageManager
.getString("label.error_parsing_text"),
JOptionPane.WARNING_MESSAGE);
}
if (al != null && al.hasValidSequence())
{
String title = MessageManager.formatMessage(
- "label.input_cut_paste_params", new String[]
- { format });
+ "label.input_cut_paste_params", new String[] { format });
if (viewport != null)
{
((AlignViewport) viewport).addAlignment(al, title);
FeaturesDisplayedI fd = ((ComplexAlignFile) source)
.getDisplayedFeatures();
af = new AlignFrame(al, hiddenSeqs, colSel,
- AlignFrame.DEFAULT_WIDTH,
- AlignFrame.DEFAULT_HEIGHT);
+ AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
af.getViewport().setShowSequenceFeatures(showSeqFeatures);
af.getViewport().setFeaturesDisplayed(fd);
af.changeColour(cs);
else
{
System.err.println(MessageManager
- .getString("label.null_or_invalid_alignment"));
+ .getString("label.couldnt_read_data"));
if (!Jalview.isHeadlessMode())
{
- JOptionPane
- .showMessageDialog(
- null,
- MessageManager
- .getString("label.null_or_invalid_alignment"),
- MessageManager
- .getString("label.unable_to_create_alignment"),
- JOptionPane.ERROR_MESSAGE);
+ javax.swing.JOptionPane.showInternalMessageDialog(Desktop.desktop,
+ AppletFormatAdapter.SUPPORTED_FORMATS,
+ MessageManager.getString("label.couldnt_read_data"),
+ JOptionPane.WARNING_MESSAGE);
}
}
}
-
/**
* DOCUMENT ME!
*