JAL-3190 rough Proof of Concept of JalviewJS - Chimera
[jalview.git] / src / jalview / gui / SeqPanel.java
index 1d943f0..e94ced2 100644 (file)
@@ -22,7 +22,6 @@ package jalview.gui;
 
 import jalview.api.AlignViewportI;
 import jalview.bin.Cache;
-import jalview.bin.Jalview;
 import jalview.commands.EditCommand;
 import jalview.commands.EditCommand.Action;
 import jalview.commands.EditCommand.Edit;
@@ -824,7 +823,7 @@ public class SeqPanel extends JPanel
       mouseOverSequence(sequence, column, pos);
     }
 
-    tooltipText.setLength(6); // Cuts the buffer back to <html>
+    tooltipText.setLength(6); // "<html>"
 
     SequenceGroup[] groups = av.getAlignment().findAllGroups(sequence);
     if (groups != null)
@@ -877,8 +876,7 @@ public class SeqPanel extends JPanel
       {
         formattedTooltipText = JvSwingUtils.wrapTooltip(true,
                 textString);
-        setToolTipText(formattedTooltipText);
-        
+        setToolTipText(formattedTooltipText);        
         lastTooltip = textString;
       }
     }
@@ -1025,7 +1023,7 @@ public class SeqPanel extends JPanel
 
       text.append(" (").append(Integer.toString(residuePos)).append(")");
     }
-    ap.alignFrame.statusBar.setText(text.toString());
+    ap.alignFrame.setStatus(text.toString());
   }
 
   /**
@@ -1252,7 +1250,7 @@ public class SeqPanel extends JPanel
     }
 
     message.append(Math.abs(startres - lastres) + " gaps.");
-    ap.alignFrame.statusBar.setText(message.toString());
+    ap.alignFrame.setStatus(message.toString());
 
     // Are we editing within a selection group?
     if (groupEditing || (sg != null
@@ -1767,22 +1765,22 @@ public class SeqPanel extends JPanel
       }
     }
 
-    if (evt.isPopupTrigger()) // Mac: mousePressed
-    {
-      showPopupMenu(evt);
-      return;
-    }
-
     /*
      * defer right-mouse click handling to mouseReleased on Windows
      * (where isPopupTrigger() will answer true)
      * NB isRightMouseButton is also true for Cmd-click on Mac
      */
-    if (SwingUtilities.isRightMouseButton(evt) && !Platform.isAMac())
+    if (Platform.isWinRightButton(evt))
     {
       return;
     }
 
+    if (evt.isPopupTrigger()) // Mac: mousePressed
+    {
+      showPopupMenu(evt);
+      return;
+    }
+
     if (av.cursorMode)
     {
       seqCanvas.cursorX = findColumn(evt);
@@ -2055,7 +2053,7 @@ public class SeqPanel extends JPanel
     {
       scrollThread = new ScrollThread();
       scrollThread.setMousePosition(mousePos);
-      if (!Jalview.isJS())
+      if (!Platform.isJS())
       {
         /*
          * Java - run in a new thread