Merge branch 'develop' into features/JAL-518_justify_seqs_in_region
[jalview.git] / src / jalview / jbgui / GAlignFrame.java
index c0cdfee..9b9a44a 100755 (executable)
@@ -57,7 +57,6 @@ import jalview.bin.Cache;
 import jalview.gui.JvSwingUtils;
 import jalview.gui.Preferences;
 import jalview.io.FileFormats;
-import jalview.io.exceptions.ImageOutputException;
 import jalview.schemes.ResidueColourScheme;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
@@ -221,6 +220,7 @@ public class GAlignFrame extends JInternalFrame
   {
     try
     {
+      setFrameIcon(null);
 
       // for Web-page embedding using id=align-frame-div
       setName("jalview-alignment");
@@ -246,7 +246,7 @@ public class GAlignFrame extends JInternalFrame
       }
     } catch (Exception e)
     {
-      System.err.println(e.toString());
+      jalview.bin.Console.errPrintln(e.toString());
     }
 
     if (Platform.allowMnemonics()) // was "not mac and not JS"
@@ -441,7 +441,9 @@ public class GAlignFrame extends JInternalFrame
     addMenuActionAndAccelerator(keyStroke, removeAllGapsMenuItem, al);
 
     JMenuItem justifyLeftMenuItem = new JMenuItem(
-            MessageManager.getString("action.left_justify_alignment"));
+            MessageManager.getString("action.left_justify"));
+    justifyLeftMenuItem.setToolTipText(
+            MessageManager.getString("tooltip.left_justify"));
     justifyLeftMenuItem.addActionListener(new ActionListener()
     {
       @Override
@@ -451,7 +453,10 @@ public class GAlignFrame extends JInternalFrame
       }
     });
     JMenuItem justifyRightMenuItem = new JMenuItem(
-            MessageManager.getString("action.right_justify_alignment"));
+            MessageManager.getString("action.right_justify"));
+    justifyRightMenuItem.setToolTipText(
+            MessageManager.getString("action.left_justify"));
+
     justifyRightMenuItem.addActionListener(new ActionListener()
     {
       @Override
@@ -1840,11 +1845,11 @@ public class GAlignFrame extends JInternalFrame
     editMenu.add(removeAllGapsMenuItem);
     editMenu.add(removeRedundancyMenuItem);
     editMenu.addSeparator();
-    // dont add these yet in the CVS build - they cannot be undone!
-    // Excluded from Jalview 2.5 release - undo needs to be implemented.
-    // editMenu.add(justifyLeftMenuItem);
-    // editMenu.add(justifyRightMenuItem);
-    // editMenu.addSeparator();
+
+    editMenu.add(justifyLeftMenuItem);
+    editMenu.add(justifyRightMenuItem);
+
+    editMenu.addSeparator();
     editMenu.add(padGapsMenuitem);
 
     showMenu.add(showAllColumns);
@@ -1979,19 +1984,19 @@ public class GAlignFrame extends JInternalFrame
   protected void createPNG_actionPerformed(ActionEvent object)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   protected void createEPS_actionPerformed(ActionEvent object)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   protected void createSVG_actionPerformed(ActionEvent object)
   {
     // TODO Auto-generated method stub
-    
+
   }
 
   protected void copyHighlightedColumns_actionPerformed(
@@ -2487,7 +2492,6 @@ public class GAlignFrame extends JInternalFrame
   {
   }
 
-
   protected void font_actionPerformed(ActionEvent e)
   {
   }
@@ -2501,7 +2505,6 @@ public class GAlignFrame extends JInternalFrame
 
   }
 
-
   protected void loadTreeMenuItem_actionPerformed(ActionEvent e)
   {