Merge branch 'develop' into task/JAL-3337_gradle_tasks_sourceDist_and_help2Website
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 1 Jul 2019 09:17:31 +0000 (10:17 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 1 Jul 2019 09:17:31 +0000 (10:17 +0100)
update merging develop into this branch

help/help/html/releases.html
resources/images/Jalview_Logo_small_with_border.png [new file with mode: 0644]
src/jalview/gui/CrossRefAction.java
src/jalview/gui/WebserviceInfo.java
src/jalview/jbgui/GWebserviceInfo.java

index 9b71968..d6ebd1b 100755 (executable)
@@ -58,7 +58,7 @@ li:before {
     <tr>
       <td width="60" align="center" nowrap>
           <strong><a name="Jalview.2.11.0">2.11.0</a><br />
-            <em>27/06/2019</em></strong>
+            <em>02/07/2019</em></strong>
       </td>
       <td align="left" valign="top">
         <ul>
@@ -101,7 +101,7 @@ li:before {
             implementation that allows updates) used for Sequence Feature collections</li>
           <li>
                                                        <li>
-                                                               <!-- JAL-2808,JAL-2069 -->Sequence features can be filtered and
+                                                               <!-- JAL-2808,JAL-2069,JAL-2820 -->Sequence features can be filtered and
                                                                shaded according to any associated attributes (e.g. variant
                                                                attributes from VCF file, or key-value pairs imported from
                                                                column 9 of GFF file)
@@ -111,8 +111,8 @@ li:before {
                                                                recognise variant features
                                                        </li>
                                                        <li>
-                                                               <!-- JAL-2897 -->Show synonymous codon variants on peptide
-                                                               sequences
+                                                               <!-- JAL-2897,JAL-3330 -->Show synonymous codon variants on peptide
+                                                               sequences (also coloured red by default)
                                                        </li>
                                                        <li>
                                                                <!-- JAL-2792 -->Popup window to show full report for a selected sequence feature's
@@ -321,10 +321,6 @@ li:before {
                                                doesn't tell users the invalid URL
                                        </li>
                                        <li>
-                                               <!-- JAL-3178 -->Nonpositional features lose feature group on
-                                               export as Jalview features file
-                                       </li>
-                                       <li>
                                                <!-- JAL-2816 -->Tooltips displayed for features filtered by
                                                score from view
                                        </li>
@@ -334,8 +330,8 @@ li:before {
                                                red in original view
                                        </li>
           <li>
-            <!-- JAL-2898 -->stop_gained variants not shown correctly on
-            peptide sequence
+            <!-- JAL-2898,JAL-2207 -->stop_gained variants not shown correctly on
+            peptide sequence (computed variant shown as p.Res.null)
           </li>
                                        <li>
                                                <!-- JAL-2060 -->'Graduated colour' option not offered for
@@ -426,12 +422,15 @@ li:before {
                                                without normalisation
                                        </li>
                                        <li>
-                                               <!-- JAL-3021 -->Sequence Details report opens positioned to top
+                                               <!-- JAL-3021 -->Sequence Details report should open positioned at top
                                                of report
                                        </li>
                                        <li>
                                                <!-- JAL-914 -->Help page can be opened twice
                                        </li>
+                                 <li>
+                                 <!-- JAL-3333 -->Fuzzy text in web service status menu on OSX Mojave
+                                 </li>
                                </ul> <em>Editing</em>
                                <ul>
                                        <li>
@@ -461,6 +460,8 @@ li:before {
                                        </li>
                                </ul> <em>New Known Defects</em>
                                <ul>
+                               <li><!-- JAL-3340 -->Select columns containing feature by double clicking ignores bounds of an existing selected region
+                               </li>
                                        <li>
                                                <!-- JAL-3313 -->Codon consensus logo incorrectly scaled in gapped
                                                regions of protein alignment.
@@ -488,6 +489,10 @@ li:before {
                                                not shown as thresholded features in 2.11. To workaround please
                                                create a Score filter instead.
                                        </li>
+                                       <li><!-- JAL-3184 -->Cancel on Feature Settings dialog doesn't reset group visibility</li> 
+                                       <li>
+                                       <!-- JAL-3338 -->F2 doesn't enable/disable keyboard mode in linked CDS/Protein view
+                                       </li>
                                         <li><strong>Java 11 Specific defects</strong>
             <ul>
               <li>
diff --git a/resources/images/Jalview_Logo_small_with_border.png b/resources/images/Jalview_Logo_small_with_border.png
new file mode 100644 (file)
index 0000000..216121c
Binary files /dev/null and b/resources/images/Jalview_Logo_small_with_border.png differ
index 673bcc0..9ad6596 100644 (file)
@@ -111,6 +111,13 @@ public class CrossRefAction implements Runnable
       FeatureSettingsModelI featureColourScheme = new SequenceFetcher()
               .getFeatureColourScheme(source);
 
+      if (dna && AlignmentUtils.looksLikeEnsembl(alignment))
+      {
+        // override default featureColourScheme so products have Ensembl variant colours
+        featureColourScheme = new SequenceFetcher()
+                .getFeatureColourScheme(DBRefSource.ENSEMBL);
+      }
+
       AlignmentI xrefsAlignment = makeCrossReferencesAlignment(dataset,
               xrefs);
       if (!dna)
index 2fc08e1..0a46600 100644 (file)
@@ -26,12 +26,13 @@ import jalview.ws.WSClientI;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
-import java.awt.Font;
+import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.GridLayout;
 import java.awt.Image;
 import java.awt.MediaTracker;
+import java.awt.RenderingHints;
 import java.awt.event.ActionEvent;
 import java.awt.image.BufferedImage;
 import java.util.Vector;
@@ -39,7 +40,6 @@ import java.util.Vector;
 import javax.swing.JComponent;
 import javax.swing.JEditorPane;
 import javax.swing.JInternalFrame;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
@@ -329,7 +329,7 @@ public class WebserviceInfo extends GWebserviceInfo
     setInfoText(info);
 
     java.net.URL url = getClass()
-            .getResource("/images/Jalview_Logo_small.png");
+            .getResource("/images/Jalview_Logo_small_with_border.png");
     image = java.awt.Toolkit.getDefaultToolkit().createImage(url);
 
     MediaTracker mt = new MediaTracker(this);
@@ -343,7 +343,10 @@ public class WebserviceInfo extends GWebserviceInfo
     }
 
     AnimatedPanel ap = new AnimatedPanel();
-    titlePanel.add(ap, BorderLayout.CENTER);
+    ap.setPreferredSize(new Dimension(60, 60));
+    titlePanel.add(ap, BorderLayout.WEST);
+    titlePanel.add(titleText, BorderLayout.CENTER);
+    setStatus(currentStatus);
 
     Thread thread = new Thread(ap);
     thread.start();
@@ -351,7 +354,8 @@ public class WebserviceInfo extends GWebserviceInfo
     frame.addInternalFrameListener(
             new javax.swing.event.InternalFrameAdapter()
             {
-              public void internalFrameClosed(
+              @Override
+                       public void internalFrameClosed(
                       javax.swing.event.InternalFrameEvent evt)
               {
                 // System.out.println("Shutting down webservice client");
@@ -375,6 +379,36 @@ public class WebserviceInfo extends GWebserviceInfo
   public void setStatus(int status)
   {
     currentStatus = status;
+
+    String message = null;
+    switch (currentStatus)
+    {
+    case STATE_QUEUING:
+      message = MessageManager.getString("label.state_queueing");
+      break;
+
+    case STATE_RUNNING:
+      message = MessageManager.getString("label.state_running");
+      break;
+
+    case STATE_STOPPED_OK:
+      message = MessageManager.getString("label.state_completed");
+      break;
+
+    case STATE_CANCELLED_OK:
+      message = MessageManager.getString("label.state_job_cancelled");
+      break;
+
+    case STATE_STOPPED_ERROR:
+      message = MessageManager.getString("label.state_job_error");
+      break;
+
+    case STATE_STOPPED_SERVERERROR:
+      message = MessageManager.getString("label.server_error_try_later");
+      break;
+    }
+    titleText.setText(title + (message == null ? "" : " - " + message));
+    titleText.repaint();
   }
 
   /**
@@ -676,7 +710,8 @@ public class WebserviceInfo extends GWebserviceInfo
    * @param e
    *          DOCUMENT ME!
    */
-  protected void cancel_actionPerformed(ActionEvent e)
+  @Override
+protected void cancel_actionPerformed(ActionEvent e)
   {
     if (!serviceIsCancellable)
     {
@@ -707,7 +742,8 @@ public class WebserviceInfo extends GWebserviceInfo
   {
     javax.swing.SwingUtilities.invokeLater(new Runnable()
     {
-      public void run()
+      @Override
+       public void run()
       {
         JvOptionPane.showInternalMessageDialog(Desktop.desktop, message,
                 title, JvOptionPane.WARNING_MESSAGE);
@@ -756,24 +792,38 @@ public class WebserviceInfo extends GWebserviceInfo
 
     BufferedImage offscreen;
 
+    @Override
     public void run()
     {
       startTime = System.currentTimeMillis();
 
+      float invSpeed = 30f;
       while (currentStatus < STATE_STOPPED_OK)
       {
+        if (currentStatus == STATE_QUEUING)
+        {
+          invSpeed = 25f;
+        }
+        else if (currentStatus == STATE_RUNNING)
+        {
+          invSpeed = 10f;
+        }
         try
         {
           Thread.sleep(50);
 
           int units = (int) ((System.currentTimeMillis() - startTime)
-                  / 10f);
-          angle += units;
+                  / invSpeed);
+          double factor = 0.5
+                  + 1.5 * (0.5
+                          - (0.5 * Math.sin(Math.toRadians(angle + 45))));
+          angle += units * factor;
           angle %= 360;
           startTime = System.currentTimeMillis();
 
           if (currentStatus >= STATE_STOPPED_OK)
           {
+            park();
             angle = 0;
           }
 
@@ -786,86 +836,66 @@ public class WebserviceInfo extends GWebserviceInfo
       cancel.setEnabled(false);
     }
 
+    public void park()
+    {
+      startTime = System.currentTimeMillis();
+
+      while (angle < 360)
+      {
+        try
+        {
+          Thread.sleep(25);
+
+          int units = (int) ((System.currentTimeMillis() - startTime)
+                  / 5f);
+          angle += units;
+          startTime = System.currentTimeMillis();
+
+          if (angle >= 360)
+          {
+            angle = 360;
+          }
+
+          repaint();
+        } catch (Exception ex)
+        {
+        }
+      }
+
+    }
+
     void drawPanel()
     {
       if (offscreen == null || offscreen.getWidth(this) != getWidth()
               || offscreen.getHeight(this) != getHeight())
       {
         offscreen = new BufferedImage(getWidth(), getHeight(),
-                BufferedImage.TYPE_INT_ARGB);
+                BufferedImage.TYPE_INT_RGB);
       }
 
       Graphics2D g = (Graphics2D) offscreen.getGraphics();
 
+      g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+              RenderingHints.VALUE_ANTIALIAS_ON);
+      g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+              RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+      g.setRenderingHint(RenderingHints.KEY_RENDERING,
+              RenderingHints.VALUE_RENDER_QUALITY);
+
       g.setColor(Color.white);
       g.fillRect(0, 0, getWidth(), getHeight());
 
-      g.setFont(new Font("Arial", Font.BOLD, 12));
-      g.setColor(Color.black);
-
-      switch (currentStatus)
-      {
-      case STATE_QUEUING:
-        g.drawString(
-                title.concat(" - ").concat(
-                        MessageManager.getString("label.state_queueing")),
-                60, 30);
-
-        break;
-
-      case STATE_RUNNING:
-        g.drawString(
-                title.concat(" - ").concat(
-                        MessageManager.getString("label.state_running")),
-                60, 30);
-
-        break;
-
-      case STATE_STOPPED_OK:
-        g.drawString(
-                title.concat(" - ").concat(
-                        MessageManager.getString("label.state_completed")),
-                60, 30);
-
-        break;
-
-      case STATE_CANCELLED_OK:
-        g.drawString(
-                title.concat(" - ")
-                        .concat(MessageManager
-                                .getString("label.state_job_cancelled")),
-                60, 30);
-
-        break;
-
-      case STATE_STOPPED_ERROR:
-        g.drawString(
-                title.concat(" - ").concat(
-                        MessageManager.getString("label.state_job_error")),
-                60, 30);
-
-        break;
-
-      case STATE_STOPPED_SERVERERROR:
-        g.drawString(
-                title.concat(" - ")
-                        .concat(MessageManager
-                                .getString("label.server_error_try_later")),
-                60, 30);
-
-        break;
-      }
-
       if (image != null)
       {
         int x = image.getWidth(this) / 2, y = image.getHeight(this) / 2;
-        g.rotate(Math.toRadians(angle), 10 + x, 10 + y);
-        g.drawImage(image, 10, 10, this);
-        g.rotate(-Math.toRadians(angle), 10 + x, 10 + y);
+        g.rotate(Math.toRadians(angle), x, y);
+        g.drawImage(image, 0, 0, this);
+        g.rotate(-Math.toRadians(angle), x, y);
       }
     }
 
-    public void paintComponent(Graphics g1)
+    @Override
+       public void paintComponent(Graphics g1)
     {
       drawPanel();
 
@@ -880,7 +910,8 @@ public class WebserviceInfo extends GWebserviceInfo
     renderAsHtml = b;
   }
 
-  public void hyperlinkUpdate(HyperlinkEvent e)
+  @Override
+public void hyperlinkUpdate(HyperlinkEvent e)
   {
     Desktop.hyperlinkUpdate(e);
   }
index ba84411..cddbb3b 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.util.MessageManager;
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
+import java.awt.Font;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
@@ -61,6 +62,8 @@ public class GWebserviceInfo extends JPanel
 
   protected JPanel buttonPanel = new JPanel();
 
+  public JLabel titleText = new JLabel();
+
   public JButton cancel = new JButton();
 
   public JButton showResultsNewFrame = new JButton();
@@ -95,7 +98,7 @@ public class GWebserviceInfo extends JPanel
    */
   private void jbInit() throws Exception
   {
-    infoText.setFont(new java.awt.Font("Verdana", 0, 10));
+    infoText.setFont(new Font("Verdana", 0, 10));
     infoText.setBorder(null);
     infoText.setEditable(false);
     infoText.setText("");
@@ -106,13 +109,17 @@ public class GWebserviceInfo extends JPanel
     titlePanel.setBackground(Color.white);
     titlePanel.setPreferredSize(new Dimension(0, 60));
     titlePanel.setLayout(borderLayout3);
+    titleText.setFont(new Font("Arial", Font.BOLD, 12));
+    titleText.setBorder(null);
+    titleText.setText("");
     jScrollPane1.setBorder(null);
     jScrollPane1.setPreferredSize(new Dimension(400, 70));
-    cancel.setFont(new java.awt.Font("Verdana", 0, 11));
+    cancel.setFont(new Font("Verdana", 0, 11));
     cancel.setText(MessageManager.getString("action.cancel"));
     cancel.addActionListener(new java.awt.event.ActionListener()
     {
-      public void actionPerformed(ActionEvent e)
+      @Override
+       public void actionPerformed(ActionEvent e)
       {
         cancel_actionPerformed(e);
       }