JAL-3416 More JInternalFrame icons
[jalview.git] / src / jalview / gui / SplitFrame.java
index 7ade797..7398a3f 100644 (file)
@@ -105,6 +105,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
    */
   protected void init()
   {
+    setFrameIcon(WindowIcons.splitIcon);
     getTopFrame().setSplitFrame(this);
     getBottomFrame().setSplitFrame(this);
     getTopFrame().setVisible(true);
@@ -259,8 +260,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
      * calculate the maximum ratio that leaves at least the height 
      * of two sequences (after rounding) visible in the bottom panel
      */
-    int bottomSequencesHeight = bottomFrame.alignPanel.getSeqPanel().seqCanvas
-            .getHeight();
+    int bottomSequencesHeight = bottomFrame.alignPanel
+            .getSeqPanel().seqCanvas.getHeight();
     int bottomPanelMinHeight = bottomPanelHeight
             - Math.max(0, bottomSequencesHeight - 3 * bottomCharHeight);
     double maxRatio = (totalHeight - bottomPanelMinHeight) / totalHeight;
@@ -427,7 +428,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
      * Ctrl-W / Cmd-W - close view or window
      */
     KeyStroke key_cmdW = KeyStroke.getKeyStroke(KeyEvent.VK_W,
-            jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
+            jalview.util.ShortcutKeyMaskExWrapper
+                    .getMenuShortcutKeyMaskEx(),
+            false);
     action = new AbstractAction()
     {
       @Override
@@ -448,7 +451,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
      * Ctrl-T / Cmd-T open new view
      */
     KeyStroke key_cmdT = KeyStroke.getKeyStroke(KeyEvent.VK_T,
-            jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
+            jalview.util.ShortcutKeyMaskExWrapper
+                    .getMenuShortcutKeyMaskEx(),
+            false);
     AbstractAction action = new AbstractAction()
     {
       @Override
@@ -804,7 +809,9 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
      * Ctrl-F / Cmd-F open Finder dialog, 'focused' on the right alignment
      */
     KeyStroke key_cmdF = KeyStroke.getKeyStroke(KeyEvent.VK_F,
-            jalview.util.ShortcutKeyMaskExWrapper.getMenuShortcutKeyMaskEx(), false);
+            jalview.util.ShortcutKeyMaskExWrapper
+                    .getMenuShortcutKeyMaskEx(),
+            false);
     AbstractAction action = new AbstractAction()
     {
       @Override
@@ -814,7 +821,11 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
         if (c != null && c instanceof AlignFrame)
         {
           AlignFrame af = (AlignFrame) c;
-          new Finder(af.alignPanel);
+          boolean dna = af.getViewport().getAlignment().isNucleotide();
+          String scope = MessageManager.getString("label.in") + " "
+                  + (dna ? MessageManager.getString("label.nucleotide")
+                          : MessageManager.getString("label.protein"));
+          new Finder(af.alignPanel, true, scope);
         }
       }
     };
@@ -847,7 +858,8 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI
   }
 
   /**
-   * holds the frame for feature settings, so Protein and DNA tabs can be managed
+   * holds the frame for feature settings, so Protein and DNA tabs can be
+   * managed
    */
   JInternalFrame featureSettingsUI;