From: gmungoc Date: Mon, 15 Jul 2019 08:54:57 +0000 (+0100) Subject: JAL-3364 tooltip for nucleotide/protein above in exported image X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dd4a158f642b66b20b47648da174a222ce3871bd;p=jalview.git JAL-3364 tooltip for nucleotide/protein above in exported image --- diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 44125a6..8abb156 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -690,6 +690,7 @@ label.save_png_image = Save As PNG Image label.load_tree_for_sequence_set = Load a tree for this sequence set label.export_image = Export Image label.export_split_frame = Export Split Frame Image +label.export_tooltip = Alignments image with {0} above label.vamsas_store = VAMSAS store label.translate_cDNA = Translate as cDNA label.reverse = Reverse diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 80c15ab..2d2872a 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -640,6 +640,7 @@ label.save_png_image = Guardar como imagen PNG label.load_tree_for_sequence_set = Cargar un árbol para este conjunto de secuencias label.export_image = Exportar imagen label.export_split_frame = Exportar imagen de la ventana dividida +label.export_tooltipe = Imagen de alineamientos con {0} arriba label.vamsas_store = Almacén VAMSAS label.translate_cDNA = Traducir cDNA label.extract_scores = Extraer puntuaciones diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 73d8148..4ec71c5 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1236,7 +1236,6 @@ public class AlignmentPanel extends GAlignmentPanel implements { /* * append coding complement image - * todo: always write top frame first! */ graphics.translate(0, dim1.height); if (av.getCodingComplement().getWrapAlignment()) diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 25dedc5..b1eb6b8 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -86,8 +86,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ protected void init() { - getTopFrame().setSplitFrame(this); - getBottomFrame().setSplitFrame(this); + getTopFrame().setSplitFrame(this, true); + getBottomFrame().setSplitFrame(this, false); getTopFrame().setVisible(true); getBottomFrame().setVisible(true); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 8e21cbe..296eb25 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -2691,12 +2691,12 @@ public class GAlignFrame extends JInternalFrame /** * Sets a reference to the containing split frame. Also makes the 'toggle split - * view' menu item visible and checked. Also makes the 'export split frame - * image' menu visible. + * view' menu item visible and checked, and makes the 'export split frame image' + * menu visible. * * @param sf */ - public void setSplitFrame(SplitContainerI sf) + public void setSplitFrame(SplitContainerI sf, boolean asTopFrame) { this.splitFrame = sf; if (sf != null) @@ -2704,6 +2704,11 @@ public class GAlignFrame extends JInternalFrame this.showComplementMenuItem.setVisible(true); this.showComplementMenuItem.setState(true); this.exportSplitFrameMenu.setVisible(true); + String biotype = asTopFrame + ? MessageManager.getString("label.nucleotide") + : MessageManager.getString("label.protein"); + this.exportSplitFrameMenu.setToolTipText(MessageManager + .formatMessage("label.export_tooltip", biotype)); } }