import jalview.bin.Cache;
import jalview.bin.Console;
import jalview.bin.Jalview;
+import jalview.bin.groovy.JalviewObjectI;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
@Override
public void focusGained(FocusEvent e)
{
- Jalview.setCurrentAlignFrame(AlignFrame.this);
+ Jalview.getInstance().setCurrentAlignFrame(AlignFrame.this);
}
});
*/
public void saveAlignment(String file, FileFormatI format)
{
- saveAlignment(file, format, false);
+ saveAlignment(file, format, false, false);
}
- public void saveAlignment(String file, FileFormatI format, boolean stdout)
+ public void saveAlignment(String file, FileFormatI format, boolean stdout,
+ boolean forceBackup)
{
lastSaveSuccessful = true;
if (!stdout)
else
{
// create backupfiles object and get new temp filename destination
- boolean doBackup = BackupFiles.getEnabled() && !stdout;
+ boolean doBackup = forceBackup
+ || (BackupFiles.getEnabled() && !stdout);
BackupFiles backupfiles = null;
if (doBackup)
{
*/
public void createPNG(File f) throws ImageOutputException
{
- createPNG(f, null, BitmapImageSizing.nullBitmapImageSizing());
+ createPNG(f, null, BitmapImageSizing.defaultBitmapImageSizing());
}
public void createPNG(File f, String renderer, BitmapImageSizing userBis)
closeAllTabs = true;
}
+ Desktop.closeModal(this);
+
try
{
if (alignPanels != null)
featureSettings.close();
featureSettings = null;
}
+
/*
* this will raise an INTERNAL_FRAME_CLOSED event and this method will
* be called recursively, with the frame now in 'closed' state
*
* @return alignment objects for all views
*/
- AlignmentI[] getViewAlignments()
+ public AlignmentI[] getViewAlignments()
{
if (alignPanels != null)
{
}
}
alignPanel.validateAnnotationDimensions(true);
+ // TODO this triggers relayout of annotation panel - otherwise annotation label height is different to panel height
+ alignPanel.fontChanged();
alignPanel.alignmentChanged();
}
@Override
protected void runGroovy_actionPerformed()
{
- Jalview.setCurrentAlignFrame(this);
- groovy.ui.Console console = Desktop.getGroovyConsole();
+ Jalview.getInstance().setCurrentAlignFrame(this);
+ groovy.console.ui.Console console = Desktop.getGroovyConsole();
if (console != null)
{
try
{
+ console.setVariable(JalviewObjectI.currentAlFrameName, this);
console.runScript();
} catch (Exception ex)
{