git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'tasks/JAL-3035_remove_dasobert_dependency' into develop
[jalview.git]
/
src
/
jalview
/
gui
/
AlignFrame.java
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
936e714
..
25c6dd4
100644
(file)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-24,6
+24,7
@@
import jalview.analysis.AlignmentSorter;
import jalview.analysis.AlignmentUtils;
import jalview.analysis.CrossRef;
import jalview.analysis.Dna;
import jalview.analysis.AlignmentUtils;
import jalview.analysis.CrossRef;
import jalview.analysis.Dna;
+import jalview.analysis.GeneticCodeI;
import jalview.analysis.ParseProperties;
import jalview.analysis.SequenceIdMatcher;
import jalview.api.AlignExportSettingI;
import jalview.analysis.ParseProperties;
import jalview.analysis.SequenceIdMatcher;
import jalview.api.AlignExportSettingI;
@@
-64,6
+65,7
@@
import jalview.gui.ColourMenuHelper.ColourChangeListener;
import jalview.gui.ViewSelectionMenu.ViewSetProvider;
import jalview.io.AlignmentProperties;
import jalview.io.AnnotationFile;
import jalview.gui.ViewSelectionMenu.ViewSetProvider;
import jalview.io.AlignmentProperties;
import jalview.io.AnnotationFile;
+import jalview.io.BackupFiles;
import jalview.io.BioJsHTMLOutput;
import jalview.io.DataSourceType;
import jalview.io.FileFormat;
import jalview.io.BioJsHTMLOutput;
import jalview.io.DataSourceType;
import jalview.io.FileFormat;
@@
-963,6
+965,11
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
return progressBar.operationInProgress();
}
return progressBar.operationInProgress();
}
+ /**
+ * Sets the text of the status bar. Note that setting a null or empty value
+ * will cause the status bar to be hidden, with possibly undesirable flicker
+ * of the screen layout.
+ */
@Override
public void setStatus(String text)
{
@Override
public void setStatus(String text)
{
@@
-1187,9
+1194,13
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
}
else
{
}
else
{
+ // create backupfiles object and get new temp filename destination
+ BackupFiles backupfiles = new BackupFiles(file);
+
try
{
try
{
- PrintWriter out = new PrintWriter(new FileWriter(file));
+ PrintWriter out = new PrintWriter(
+ new FileWriter(backupfiles.getTempFilePath()));
out.print(output);
out.close();
out.print(output);
out.close();
@@
-1202,6
+1213,11
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
success = false;
ex.printStackTrace();
}
success = false;
ex.printStackTrace();
}
+
+ backupfiles.setWriteSuccess(success);
+ // do the backup file roll and rename the temp file to actual file
+ success = backupfiles.rollBackupsAndRenameTempFile();
+
}
}
}
}
@@
-2403,6
+2419,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
sg.setEndRes(viewport.getAlignment().getWidth() - 1);
viewport.setSelectionGroup(sg);
sg.setEndRes(viewport.getAlignment().getWidth() - 1);
viewport.setSelectionGroup(sg);
+ viewport.isSelectionGroupChanged(true);
viewport.sendSelection();
// JAL-2034 - should delegate to
// alignPanel to decide if overview needs
viewport.sendSelection();
// JAL-2034 - should delegate to
// alignPanel to decide if overview needs
@@
-3033,6
+3050,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
viewport.expandColSelection(sg, false);
viewport.hideAllSelectedSeqs();
viewport.hideSelectedColumns();
viewport.expandColSelection(sg, false);
viewport.hideAllSelectedSeqs();
viewport.hideSelectedColumns();
+ alignPanel.updateLayout();
alignPanel.paintAlignment(true, true);
viewport.sendSelection();
}
alignPanel.paintAlignment(true, true);
viewport.sendSelection();
}
@@
-3057,6
+3075,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
public void hideSelColumns_actionPerformed(ActionEvent e)
{
viewport.hideSelectedColumns();
public void hideSelColumns_actionPerformed(ActionEvent e)
{
viewport.hideSelectedColumns();
+ alignPanel.updateLayout();
alignPanel.paintAlignment(true, true);
viewport.sendSelection();
}
alignPanel.paintAlignment(true, true);
viewport.sendSelection();
}
@@
-4258,14
+4277,14
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
* frame's DNA sequences to their aligned protein (amino acid) equivalents.
*/
@Override
* frame's DNA sequences to their aligned protein (amino acid) equivalents.
*/
@Override
- public void showTranslation_actionPerformed(ActionEvent e)
+ public void showTranslation_actionPerformed(GeneticCodeI codeTable)
{
AlignmentI al = null;
try
{
Dna dna = new Dna(viewport, viewport.getViewAsVisibleContigs(true));
{
AlignmentI al = null;
try
{
Dna dna = new Dna(viewport, viewport.getViewAsVisibleContigs(true));
- al = dna.translateCdna();
+ al = dna.translateCdna(codeTable);
} catch (Exception ex)
{
jalview.bin.Cache.log.error(
} catch (Exception ex)
{
jalview.bin.Cache.log.error(
@@
-4294,7
+4313,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
af.setFileFormat(this.currentFileFormat);
final String newTitle = MessageManager
.formatMessage("label.translation_of_params", new Object[]
af.setFileFormat(this.currentFileFormat);
final String newTitle = MessageManager
.formatMessage("label.translation_of_params", new Object[]
- { this.getTitle() });
+ { this.getTitle(), codeTable.getId() });
af.setTitle(newTitle);
if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{
af.setTitle(newTitle);
if (Cache.getDefault(Preferences.ENABLE_SPLIT_FRAME, true))
{