Merge branch 'features/JAL-2446NCList' into features/JAL-2609fastPaintWrapped
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 9 Aug 2017 10:46:36 +0000 (11:46 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 9 Aug 2017 10:46:36 +0000 (11:46 +0100)
help/html/features/overview.html
help/html/releases.html
src/jalview/appletgui/AlignmentPanel.java
src/jalview/appletgui/AnnotationPanel.java
src/jalview/datamodel/features/FeatureStore.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/ColourMenuHelper.java
src/jalview/schemes/ResidueColourScheme.java
src/jalview/schemes/UserColourScheme.java

index 4f26592..ac5aecb 100755 (executable)
   <p>The red box indicates the currently viewed region of the
     alignment, this may be moved by clicking and dragging with the
     mouse.</p>
-    <p><strong>Right-click</strong> (or CMD-Click) to open the
-    overview's popup menu. This provides an option to include hidden
-    regions in the overview (shown as dark-grey rows and columns). <br/><br/>
-    <em>The option to include/exclude hidden regions in the
-    overview was introduced in Jalview 2.10.2</em>. 
+  <p>Click anywhere else in the overview to centre the view on that
+    position</p>
+    <p></p>
+  <p>
+    <strong>Hiding hidden regions in the overview</strong>
+  </p>
+  <p>
+    Hidden sequences and columns are by default shown as dark-grey rows
+    and columns in the overview. Hidden regions can also be omitted
+    entirely (to make the Overview 'WYSIWIG') by <strong>Right-clicking</strong>
+    (or CMD-Clicking) to open the overview's popup menu.<br />
+    <br /> <em>The option to include/exclude hidden regions in the
+      overview was introduced in Jalview 2.10.2</em>.
+  
   <p>
     <img src="overview.gif" width="407" height="137">
   </p>
index ea9bbf5..3482f71 100755 (executable)
@@ -107,17 +107,29 @@ li:before {
               <!--  JAL-384 -->Custom shading schemes created via groovy
               scripts
             </li>
-            <li>
-              <!--  JAL-2491 -->linked scrolling of CDS/Protein views
-              via Overview or sequence motif search operations
-            </li>
-            <li>
-              <!--  JAL-2526 -->Efficiency improvements for interacting
-              with alignment and overview windows
-            </li>
-            <li>
-              <!-- JAL-2388 -->Hidden columns and sequences can be
-              omitted in Overview
+            <li>Improved overview window
+              <ul>
+                <li>
+                  <!--  JAL-2526 -->Efficiency improvements for
+                  interacting with alignment and overview windows
+                </li>
+                <li>
+                  <!--  JAL-2491 -->Linked scrolling of CDS/Protein
+                  views via Overview or sequence motif search operations
+                </li>
+                <li>
+                  <!-- JAL-2514 -->Scrolling of wrapped alignment views
+                  via overview
+                </li>
+                <li>
+                  <!-- JAL-2388 -->Hidden columns and sequences can be
+                  omitted in Overview
+                </li>
+                <li>
+                  <!-- JAL-2611 -->Click-drag in visible area allows
+                  fine adjustment of visible position
+                </li>
+              </ul>
             </li>
             <li>
               <!-- JAL-2535 -->Posterior probability annotation from
@@ -570,6 +582,8 @@ li:before {
               due to 'null' string rather than empty string used for
               residues with no corresponding PDB mapping).
             </li>
+            <li><!-- JAL-2592 -->User defined colourschemes called 'User Defined' don't appear in Colours menu</li>
+            <li>
 
 
           </ul>
index 4147177..d679217 100644 (file)
@@ -643,7 +643,7 @@ public class AlignmentPanel extends Panel implements AdjustmentListener,
 
   public void setWrapAlignment(boolean wrap)
   {
-    vpRanges.setStartSeq(0);
+    vpRanges.setStartEndSeq(0, vpRanges.getVisibleAlignmentHeight());
     vpRanges.setStartRes(0);
     scalePanelHolder.setVisible(!wrap);
 
index 39b718d..417bb06 100755 (executable)
@@ -634,7 +634,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI,
 
   public void fastPaint(int horizontal)
   {
-    if (horizontal == 0
+    if (horizontal == 0 || gg == null
             || av.getAlignment().getAlignmentAnnotation() == null
             || av.getAlignment().getAlignmentAnnotation().length < 1)
     {
index b082b56..51bee57 100644 (file)
@@ -54,7 +54,7 @@ public class FeatureStore
 
     /**
      * serves a search condition for finding the first feature whose end
-     * position follows a given target location
+     * position is at or follows a given target location
      * 
      * @param target
      * @return
@@ -596,28 +596,15 @@ public class FeatureStore
   protected void findNonNestedFeatures(long from, long to,
           List<SequenceFeature> result)
   {
+    /*
+     * find the first feature whose end position is
+     * after the target range start
+     */
     int startIndex = binarySearch(nonNestedFeatures,
             SearchCriterion.byEnd(from));
 
-    findNonNestedFeatures(startIndex, from, to, result);
-  }
-
-  /**
-   * Scans the list of non-nested features, starting from startIndex, to find
-   * those that overlap the from-to range, and adds them to the result list.
-   * Returns the index of the first feature whose start position is after the
-   * target range (or the length of the whole list if no such feature exists).
-   * 
-   * @param startIndex
-   * @param from
-   * @param to
-   * @param result
-   * @return
-   */
-  protected int findNonNestedFeatures(final int startIndex, long from,
-          long to, List<SequenceFeature> result)
-  {
-    int i = startIndex;
+    final int startIndex1 = startIndex;
+    int i = startIndex1;
     while (i < nonNestedFeatures.size())
     {
       SequenceFeature sf = nonNestedFeatures.get(i);
@@ -631,7 +618,6 @@ public class FeatureStore
       }
       i++;
     }
-    return i;
   }
 
   /**
index 162d100..8a59a4b 100644 (file)
@@ -3324,7 +3324,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
      * 'User Defined' opens a panel to configure or load a
      * user-defined colour scheme
      */
-    if (ResidueColourScheme.USER_DEFINED.equals(name))
+    if (ResidueColourScheme.USER_DEFINED_MENU.equals(name))
     {
       new UserDefinedColours(alignPanel);
       return;
index b2b9574..8ffc070 100644 (file)
@@ -177,13 +177,13 @@ public class ColourMenuHelper
       final String label = MessageManager.getString("action.user_defined");
       JRadioButtonMenuItem userDefinedColour = new JRadioButtonMenuItem(
               label);
-      userDefinedColour.setName(ResidueColourScheme.USER_DEFINED);
+      userDefinedColour.setName(ResidueColourScheme.USER_DEFINED_MENU);
       userDefinedColour.addActionListener(new ActionListener()
       {
         @Override
         public void actionPerformed(ActionEvent e)
         {
-          client.changeColour_actionPerformed(ResidueColourScheme.USER_DEFINED);
+          client.changeColour_actionPerformed(ResidueColourScheme.USER_DEFINED_MENU);
         }
       });
       colourMenu.add(userDefinedColour);
@@ -230,7 +230,7 @@ public class ColourMenuHelper
         {
           none = radioButton;
         }
-        if (ResidueColourScheme.USER_DEFINED.equals(buttonName))
+        if (ResidueColourScheme.USER_DEFINED_MENU.equals(buttonName))
         {
           userDefined = radioButton;
         }
index b47b82e..6aa798e 100755 (executable)
@@ -35,9 +35,17 @@ public abstract class ResidueColourScheme implements ColourSchemeI
 {
   public static final String NONE = "None";
 
+  /*
+   * default display name for a user defined colour scheme
+   */
   public static final String USER_DEFINED = "User Defined";
 
   /*
+   * name for (new) "User Defined.." colour scheme menu item
+   */
+  public static final String USER_DEFINED_MENU = "*User Defined*";
+
+  /*
    * lookup up by character value e.g. 'G' to the colors array index
    * e.g. if symbolIndex['K'] = 11 then colors[11] is the colour for K
    */
index 8e58c20..256862d 100755 (executable)
@@ -273,7 +273,7 @@ public class UserColourScheme extends ResidueColourScheme
     {
       return schemeName;
     }
-    return "User Defined";
+    return ResidueColourScheme.USER_DEFINED;
   }
 
   /**