*/
package jalview.io;
-import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.gui.AlignFrame;
import jalview.gui.AlignViewport;
import java.util.StringTokenizer;
import java.util.Vector;
+import jalview.util.MessageManager;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
if (!protocol.equals(AppletFormatAdapter.PASTE))
alignFrame.setFileName(file, format);
-
- Desktop.addInternalFrame(alignFrame, title,
- AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+ if (raiseGUI)
+ {
+ // add the window to the GUI
+ // note - this actually should happen regardless of raiseGUI status in Jalview 3
+ // TODO: define 'virtual desktop' for benefit of headless scripts that perform queries to find the 'current working alignment'
+ Desktop.addInternalFrame(alignFrame, title,
+ AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+ }
try
{
public void run()
{
JOptionPane.showInternalMessageDialog(Desktop.desktop,
- errorMessage, "Error loading file",
+ errorMessage, MessageManager.getString("label.error_loading_file"),
JOptionPane.WARNING_MESSAGE);
}
});
public void run()
{
javax.swing.JOptionPane.showInternalMessageDialog(
- Desktop.desktop, "Encountered problems opening " + file
- + "!!", "File open error",
+ Desktop.desktop, MessageManager.formatMessage("label.problems_opening_file", new String[]{file}),
+ MessageManager.getString("label.file_open_error"),
javax.swing.JOptionPane.WARNING_MESSAGE);
}
});