JAL-2371 rename global/viewportColourScheme to residueShading
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 31 Jan 2017 14:40:51 +0000 (14:40 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 31 Jan 2017 14:40:51 +0000 (14:40 +0000)
21 files changed:
src/jalview/api/AlignViewportI.java
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AlignViewport.java
src/jalview/appletgui/SeqPanel.java
src/jalview/appletgui/SequenceRenderer.java
src/jalview/appletgui/TreeCanvas.java
src/jalview/appletgui/UserDefinedColours.java
src/jalview/gui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/Jalview2XML.java
src/jalview/gui/Jalview2XML_V1.java
src/jalview/gui/SeqPanel.java
src/jalview/gui/SequenceRenderer.java
src/jalview/gui/TreeCanvas.java
src/jalview/renderer/AnnotationRenderer.java
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/workers/ConsensusThread.java
test/jalview/gui/AlignFrameTest.java
test/jalview/gui/AlignViewportTest.java
test/jalview/io/Jalview2xmlTests.java
test/jalview/schemes/PIDColourSchemeTest.java

index 33a0061..2802684 100644 (file)
@@ -86,7 +86,7 @@ public interface AlignViewportI extends ViewStyleI
    * 
    * @return
    */
-  ResidueShaderI getViewportColourScheme();
+  ResidueShaderI getResidueShading();
 
   AlignmentI getAlignment();
 
index d30f10d..5cabda3 100644 (file)
@@ -2642,7 +2642,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
             && viewport.getGlobalColourScheme() != null)
     {
       SliderPanel.setPIDSliderSource(alignPanel,
-              viewport.getViewportColourScheme(), alignPanel.getViewName());
+              viewport.getResidueShading(), alignPanel.getViewName());
       SliderPanel.showPIDSlider();
     }
   }
@@ -2653,7 +2653,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
             && viewport.getGlobalColourScheme() != null)
     {
       SliderPanel.setConservationSlider(alignPanel,
-              viewport.getViewportColourScheme(), alignPanel.getViewName());
+              viewport.getResidueShading(), alignPanel.getViewName());
       SliderPanel.showConservationSlider();
     }
   }
index 29df968..fc087c6 100644 (file)
@@ -209,17 +209,17 @@ public class AlignViewport extends AlignmentViewport implements
 
       if (colour != null)
       {
-        globalColourScheme = new ResidueShader(
+        residueShading = new ResidueShader(
                 ColourSchemeProperty.getColourScheme(alignment, colour));
-        if (globalColourScheme != null)
+        if (residueShading != null)
         {
-          globalColourScheme.setConsensus(hconsensus);
+          residueShading.setConsensus(hconsensus);
         }
       }
 
       if (applet.getParameter("userDefinedColour") != null)
       {
-        globalColourScheme = new ResidueShader(
+        residueShading = new ResidueShader(
                 new UserColourScheme(
                         applet.getParameter("userDefinedColour")));
       }
index 41529cd..8cfd2dc 100644 (file)
@@ -1505,12 +1505,12 @@ public class SeqPanel extends Panel implements MouseMotionListener,
 
       if (av.getConservationSelected())
       {
-        SliderPanel.setConservationSlider(ap, av.getViewportColourScheme(),
+        SliderPanel.setConservationSlider(ap, av.getResidueShading(),
                 ap.getViewName());
       }
       if (av.getAbovePIDThreshold())
       {
-        SliderPanel.setPIDSliderSource(ap, av.getViewportColourScheme(),
+        SliderPanel.setPIDSliderSource(ap, av.getResidueShading(),
                 ap.getViewName());
       }
 
index 1c7c4ce..86d1f98 100755 (executable)
@@ -83,7 +83,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
     }
     else if (av.getShowBoxes())
     {
-      getBoxColour(av.getViewportColourScheme(), seq, i);
+      getBoxColour(av.getResidueShading(), seq, i);
     }
 
     return resBoxColour;
@@ -182,7 +182,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
         }
         else if (av.getShowBoxes())
         {
-          getBoxColour(av.getViewportColourScheme(), seq, i);
+          getBoxColour(av.getResidueShading(), seq, i);
         }
       }
 
@@ -272,7 +272,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
 
         if (av.getColourText())
         {
-          getBoxColour(av.getViewportColourScheme(), seq, i);
+          getBoxColour(av.getResidueShading(), seq, i);
           if (av.getShowBoxes())
           {
             graphics.setColor(resBoxColour.darker());
index 510df94..e30879c 100755 (executable)
@@ -672,13 +672,13 @@ public class TreeCanvas extends Panel implements MouseListener,
       // instead we set it manually - recalc called after updateAnnotation
       sg.setColourScheme(cs);
       sg.getGroupColourScheme().setThreshold(
-              av.getViewportColourScheme().getThreshold(),
+              av.getResidueShading().getThreshold(),
               av.isIgnoreGapsConsensus());
 
       sg.setName("JTreeGroup:" + sg.hashCode());
       sg.setIdColour(col);
       if (av.getGlobalColourScheme() != null
-              && av.getViewportColourScheme().conservationApplied())
+              && av.getResidueShading().conservationApplied())
       {
         Conservation c = new Conservation("Group", sg.getSequences(null),
                 sg.getStartRes(), sg.getEndRes());
index b794724..95e36b5 100644 (file)
@@ -513,7 +513,7 @@ public class UserDefinedColours extends Panel implements ActionListener,
       else
       {
         ap.av.setGlobalColourScheme(ucs);
-        ap.av.getViewportColourScheme().setThreshold(0,
+        ap.av.getResidueShading().setThreshold(0,
                 ap.av.isIgnoreGapsConsensus());
       }
       ap.seqPanel.seqCanvas.img = null;
index cf6a901..b5fc817 100644 (file)
@@ -3359,7 +3359,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void modifyPID_actionPerformed()
   {
     SliderPanel.setPIDSliderSource(alignPanel,
-            viewport.getViewportColourScheme(), alignPanel.getViewName());
+            viewport.getResidueShading(), alignPanel.getViewName());
     SliderPanel.showPIDSlider();
   }
 
@@ -3370,7 +3370,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void modifyConservation_actionPerformed()
   {
     SliderPanel.setConservationSlider(alignPanel,
-            viewport.getViewportColourScheme(), alignPanel.getViewName());
+            viewport.getResidueShading(), alignPanel.getViewName());
     SliderPanel.showConservationSlider();
   }
 
@@ -3382,7 +3382,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   {
     modifyConservation.setEnabled(selected);
     viewport.setConservationSelected(selected);
-    viewport.getViewportColourScheme().setConservationApplied(selected);
+    viewport.getResidueShading().setConservationApplied(selected);
 
     changeColour(viewport.getGlobalColourScheme());
     if (selected)
@@ -3405,7 +3405,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     viewport.setAbovePIDThreshold(selected);
     if (!selected)
     {
-      viewport.getViewportColourScheme().setThreshold(0,
+      viewport.getResidueShading().setThreshold(0,
               viewport.isIgnoreGapsConsensus());
     }
 
@@ -4838,7 +4838,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     if (viewport.getConservationSelected())
     {
       SliderPanel.setConservationSlider(alignPanel,
-              viewport.getViewportColourScheme(), alignPanel.getViewName());
+              viewport.getResidueShading(), alignPanel.getViewName());
     }
     else
     {
@@ -4847,7 +4847,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     if (viewport.getAbovePIDThreshold())
     {
       SliderPanel.setPIDSliderSource(alignPanel,
-              viewport.getViewportColourScheme(), alignPanel.getViewName());
+              viewport.getResidueShading(), alignPanel.getViewName());
     }
     else
     {
index ea9eb21..69f155b 100644 (file)
@@ -295,18 +295,18 @@ public class AlignViewport extends AlignmentViewport implements
     {
       ColourSchemeI colourScheme = ColourSchemeProperty.getColourScheme(
               alignment, propertyValue);
-      globalColourScheme = new ResidueShader(colourScheme);
+      residueShading = new ResidueShader(colourScheme);
 
       if (colourScheme instanceof UserColourScheme)
       {
-        globalColourScheme = new ResidueShader(
+        residueShading = new ResidueShader(
                 UserDefinedColours.loadDefaultColours());
-        globalColourScheme.setThreshold(0, isIgnoreGapsConsensus());
+        residueShading.setThreshold(0, isIgnoreGapsConsensus());
       }
 
-      if (globalColourScheme != null)
+      if (residueShading != null)
       {
-        globalColourScheme.setConsensus(hconsensus);
+        residueShading.setConsensus(hconsensus);
       }
     }
   }
@@ -385,9 +385,9 @@ public class AlignViewport extends AlignmentViewport implements
     super.setViewStyle(settingsForView);
     setFont(new Font(viewStyle.getFontName(), viewStyle.getFontStyle(),
             viewStyle.getFontSize()), false);
-    if (globalColourScheme != null)
+    if (residueShading != null)
     {
-      globalColourScheme.setConservationApplied(settingsForView
+      residueShading.setConservationApplied(settingsForView
               .isConservationColourSelected());
     }
   }
index d5ec6ac..3ac453f 100644 (file)
@@ -1294,7 +1294,7 @@ public class Jalview2XML
                 .getGlobalColourScheme()));
       }
 
-      ResidueShaderI vcs = av.getViewportColourScheme();
+      ResidueShaderI vcs = av.getResidueShading();
       ColourSchemeI cs = av.getGlobalColourScheme();
 
       if (cs != null)
@@ -4474,15 +4474,15 @@ public class Jalview2XML
     }
 
     af.viewport.setGlobalColourScheme(cs);
-    af.viewport.getViewportColourScheme().setThreshold(
+    af.viewport.getResidueShading().setThreshold(
             view.getPidThreshold(), true);
-    af.viewport.getViewportColourScheme().setConsensus(
+    af.viewport.getResidueShading().setConsensus(
             af.viewport.getSequenceConsensusHash());
     af.viewport.setColourAppliesToAllGroups(false);
 
     if (view.getConservationSelected() && cs != null)
     {
-      af.viewport.getViewportColourScheme().setConservationInc(
+      af.viewport.getResidueShading().setConservationInc(
               view.getConsThreshold());
     }
 
index 7472877..e751a2c 100755 (executable)
@@ -405,16 +405,16 @@ public class Jalview2XML_V1
       // }
     }
 
-    af.viewport.getViewportColourScheme().setThreshold(
+    af.viewport.getResidueShading().setThreshold(
             view.getPidThreshold(), true);
-    af.viewport.getViewportColourScheme().setConsensus(
+    af.viewport.getResidueShading().setConsensus(
             af.viewport.getSequenceConsensusHash());
     af.viewport.setColourAppliesToAllGroups(false);
     af.alignPanel.updateLayout();
     af.changeColour(cs);
     if (view.getConservationSelected() && cs != null)
     {
-      af.viewport.getViewportColourScheme().setConservationInc(
+      af.viewport.getResidueShading().setConservationInc(
               view.getConsThreshold());
     }
 
index 6214a7c..e402d28 100644 (file)
@@ -1655,13 +1655,13 @@ public class SeqPanel extends JPanel implements MouseListener,
 
       if (av.getConservationSelected())
       {
-        SliderPanel.setConservationSlider(ap, av.getViewportColourScheme(),
+        SliderPanel.setConservationSlider(ap, av.getResidueShading(),
                 ap.getViewName());
       }
 
       if (av.getAbovePIDThreshold())
       {
-        SliderPanel.setPIDSliderSource(ap, av.getViewportColourScheme(),
+        SliderPanel.setPIDSliderSource(ap, av.getResidueShading(),
                 ap.getViewName());
       }
       if ((stretchGroup != null) && (stretchGroup.getEndRes() == res))
index e77536d..95c3261 100755 (executable)
@@ -98,7 +98,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
     }
     else if (av.getShowBoxes())
     {
-      getBoxColour(av.getViewportColourScheme(), seq, i);
+      getBoxColour(av.getResidueShading(), seq, i);
     }
 
     return resBoxColour;
@@ -241,7 +241,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
         }
         else if (av.getShowBoxes())
         {
-          getBoxColour(av.getViewportColourScheme(), seq, i);
+          getBoxColour(av.getResidueShading(), seq, i);
         }
       }
 
@@ -387,7 +387,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
           if (av.getColourText())
           {
             getboxColour = true;
-            getBoxColour(av.getViewportColourScheme(), seq, i);
+            getBoxColour(av.getResidueShading(), seq, i);
 
             if (av.getShowBoxes())
             {
@@ -403,7 +403,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
           {
             if (!getboxColour)
             {
-              getBoxColour(av.getViewportColourScheme(), seq, i);
+              getBoxColour(av.getResidueShading(), seq, i);
             }
 
             if (resBoxColour.getRed() + resBoxColour.getBlue()
index 9fa98ee..54eed1a 100755 (executable)
@@ -1010,7 +1010,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       }
       sg.setColourScheme(cs);
       sg.getGroupColourScheme().setThreshold(
-              av.getViewportColourScheme().getThreshold(),
+              av.getResidueShading().getThreshold(),
               av.isIgnoreGapsConsensus());
       // sg.recalcConservation();
       sg.setName("JTreeGroup:" + sg.hashCode());
@@ -1019,7 +1019,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
       for (int a = 0; a < aps.length; a++)
       {
         if (aps[a].av.getGlobalColourScheme() != null
-                && aps[a].av.getViewportColourScheme()
+                && aps[a].av.getResidueShading()
                         .conservationApplied())
         {
           Conservation c = new Conservation("Group", sg.getSequences(null),
index 9b0d938..6f84a2e 100644 (file)
@@ -314,7 +314,7 @@ public class AnnotationRenderer
     av_renderHistogram = av.isShowConsensusHistogram();
     av_renderProfile = av.isShowSequenceLogo();
     av_normaliseProfile = av.isNormaliseSequenceLogo();
-    profcolour = av.getViewportColourScheme();
+    profcolour = av.getResidueShading();
     if (profcolour == null || profcolour.getColourScheme() == null)
     {
       /*
index 544835d..abb8f63 100644 (file)
@@ -597,7 +597,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
 
   protected boolean ignoreGapsInConsensusCalculation = false;
 
-  protected ResidueShaderI globalColourScheme;
+  protected ResidueShaderI residueShading;
 
   @Override
   public void setGlobalColourScheme(ColourSchemeI cs)
@@ -615,11 +615,11 @@ public abstract class AlignmentViewport implements AlignViewportI,
      * this means that any conservation or PID threshold settings
      * persist when the alignment colour scheme is changed
      */
-    if (globalColourScheme == null)
+    if (residueShading == null)
     {
-      globalColourScheme = new ResidueShader(viewStyle);
+      residueShading = new ResidueShader(viewStyle);
     }
-    globalColourScheme.setColourScheme(cs);
+    residueShading.setColourScheme(cs);
 
     // TODO: do threshold and increment belong in ViewStyle or ResidueShader?
     // ...problem: groups need these, but do not currently have a ViewStyle
@@ -631,9 +631,9 @@ public abstract class AlignmentViewport implements AlignViewportI,
       // || cs instanceof Blosum62ColourScheme)
       if (getConservationSelected())
       {
-        globalColourScheme.setConservation(hconservation);
+        residueShading.setConservation(hconservation);
       }
-      globalColourScheme.alignmentChanged(alignment, hiddenRepSequences);
+      residueShading.alignmentChanged(alignment, hiddenRepSequences);
     }
 
     /*
@@ -661,14 +661,14 @@ public abstract class AlignmentViewport implements AlignViewportI,
   @Override
   public ColourSchemeI getGlobalColourScheme()
   {
-    return globalColourScheme == null ? null : globalColourScheme
+    return residueShading == null ? null : residueShading
             .getColourScheme();
   }
 
   @Override
-  public ResidueShaderI getViewportColourScheme()
+  public ResidueShaderI getResidueShading()
   {
-    return globalColourScheme;
+    return residueShading;
   }
 
   protected AlignmentAnnotation consensus;
@@ -928,7 +928,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
     hconsensus = null;
     hcomplementConsensus = null;
     // colour scheme may hold reference to consensus
-    globalColourScheme = null;
+    residueShading = null;
     // TODO remove listeners from changeSupport?
     changeSupport = null;
     setAlignment(null);
@@ -1198,9 +1198,9 @@ public abstract class AlignmentViewport implements AlignViewportI,
     if (ap != null)
     {
       updateConsensus(ap);
-      if (globalColourScheme != null)
+      if (residueShading != null)
       {
-        globalColourScheme.setThreshold(globalColourScheme.getThreshold(),
+        residueShading.setThreshold(residueShading.getThreshold(),
                 ignoreGapsInConsensusCalculation);
       }
     }
@@ -1846,7 +1846,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
    */
   void updateAllColourSchemes()
   {
-    ResidueShaderI rs = globalColourScheme;
+    ResidueShaderI rs = residueShading;
     if (rs != null)
     {
       rs.alignmentChanged(alignment, hiddenRepSequences);
index fa3fe75..0c7e69a 100644 (file)
@@ -147,7 +147,7 @@ public class ConsensusThread extends AlignCalcWorker
    */
   protected void setColourSchemeConsensus(ProfilesI hconsensus)
   {
-    ResidueShaderI cs = alignViewport.getViewportColourScheme();
+    ResidueShaderI cs = alignViewport.getResidueShading();
     if (cs != null)
     {
       cs.setConsensus(hconsensus);
index 8ba165e..2ea94a4 100644 (file)
@@ -183,8 +183,8 @@ public class AlignFrameTest
     af.applyToAllGroups_actionPerformed(false);
     af.changeColour_actionPerformed(JalviewColourScheme.Buried.toString());
     assertTrue(av.getGlobalColourScheme() instanceof BuriedColourScheme);
-    assertFalse(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getThreshold(), 0);
+    assertFalse(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getThreshold(), 0);
 
     /*
      * Apply Conservation 20%
@@ -196,8 +196,8 @@ public class AlignFrameTest
             new String[] { "Background" }));
     assertTrue(sp.isForConservation());
     sp.valueChanged(20);
-    assertTrue(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getConservationInc(), 20);
+    assertTrue(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getConservationInc(), 20);
 
     /*
      * Apply PID threshold 10% (conservation still applies as well)
@@ -209,9 +209,9 @@ public class AlignFrameTest
             "label.percentage_identity_threshold",
             new String[] { "Background" }));
     sp.valueChanged(10);
-    assertEquals(av.getViewportColourScheme().getThreshold(), 10);
-    assertTrue(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getConservationInc(), 20);
+    assertEquals(av.getResidueShading().getThreshold(), 10);
+    assertTrue(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getConservationInc(), 20);
 
     /*
      * create a group with Strand colouring, 30% Conservation
@@ -263,9 +263,9 @@ public class AlignFrameTest
      */
     af.changeColour_actionPerformed(JalviewColourScheme.Turn.toString());
     assertTrue(av.getGlobalColourScheme() instanceof TurnColourScheme);
-    assertTrue(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getConservationInc(), 20);
-    assertEquals(av.getViewportColourScheme().getThreshold(), 10);
+    assertTrue(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getConservationInc(), 20);
+    assertEquals(av.getResidueShading().getThreshold(), 10);
     assertTrue(sg.getColourScheme() instanceof StrandColourScheme);
     assertTrue(sg.getGroupColourScheme().conservationApplied());
     assertEquals(sg.getGroupColourScheme().getConservationInc(), 30);
@@ -278,9 +278,9 @@ public class AlignFrameTest
     af.applyToAllGroups_actionPerformed(true);
     af.changeColour_actionPerformed(JalviewColourScheme.Helix.toString());
     assertTrue(av.getGlobalColourScheme() instanceof HelixColourScheme);
-    assertTrue(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getConservationInc(), 20);
-    assertEquals(av.getViewportColourScheme().getThreshold(), 10);
+    assertTrue(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getConservationInc(), 20);
+    assertEquals(av.getResidueShading().getThreshold(), 10);
     assertTrue(sg.getColourScheme() instanceof HelixColourScheme);
     assertTrue(sg.getGroupColourScheme().conservationApplied());
     assertEquals(sg.getGroupColourScheme().getConservationInc(), 30);
@@ -314,8 +314,8 @@ public class AlignFrameTest
     af.applyToAllGroups_actionPerformed(false);
     af.changeColour_actionPerformed(JalviewColourScheme.Helix.toString());
     assertTrue(av.getGlobalColourScheme() instanceof HelixColourScheme);
-    assertFalse(av.getViewportColourScheme().conservationApplied());
-    assertEquals(av.getViewportColourScheme().getThreshold(), 0);
+    assertFalse(av.getResidueShading().conservationApplied());
+    assertEquals(av.getResidueShading().getThreshold(), 0);
 
     /*
      * inspect the colour of 
@@ -323,7 +323,7 @@ public class AlignFrameTest
      * FER_CAPAN.10(SER), column 16 (15 base 0)
      */
     SequenceI ferCapan = al.findName("FER_CAPAN");
-    ResidueShaderI rs = av.getViewportColourScheme();
+    ResidueShaderI rs = av.getResidueShading();
     Color c = rs.findColour('I', 14, ferCapan);
     Color i_original = new Color(138, 117, 138);
     assertEquals(c, i_original);
@@ -339,7 +339,7 @@ public class AlignFrameTest
     assertTrue(sp.isForConservation());
     assertEquals(sp.getValue(), 30); // initial slider setting
     sp.valueChanged(10);
-    assertSame(rs, av.getViewportColourScheme());
+    assertSame(rs, av.getResidueShading());
     c = rs.findColour('I', 14, ferCapan);
     Color i_faded = new Color(196, 186, 196);
     assertEquals(c, i_faded);
@@ -490,7 +490,7 @@ public class AlignFrameTest
     sp = SliderPanel.getSliderPanel();
     assertTrue(sp.isForConservation());
     sp.valueChanged(20);
-    ResidueShaderI rs = av.getViewportColourScheme();
+    ResidueShaderI rs = av.getResidueShading();
     assertEquals(rs.getThreshold(), 10);
     assertTrue(rs.conservationApplied());
     assertEquals(rs.getConservationInc(), 20);
@@ -540,8 +540,8 @@ public class AlignFrameTest
     assertEquals(af.alignPanel.getViewName(), "View 1");
     AlignViewport av2 = af.getViewport();
     assertNotSame(av, av2);
-    rs = av2.getViewportColourScheme();
-    assertNotSame(av.getViewportColourScheme(), rs);
+    rs = av2.getResidueShading();
+    assertNotSame(av.getResidueShading(), rs);
     assertEquals(rs.getThreshold(), 10);
     assertTrue(rs.conservationApplied());
     assertEquals(rs.getConservationInc(), 20);
@@ -562,6 +562,6 @@ public class AlignFrameTest
             "label.conservation_colour_increment",
             new String[] { "View 1" }));
     sp.valueChanged(22);
-    assertEquals(av2.getViewportColourScheme().getConservationInc(), 22);
+    assertEquals(av2.getResidueShading().getConservationInc(), 22);
   }
 }
index 71a5f3c..1cdcdb7 100644 (file)
@@ -355,7 +355,7 @@ public class AlignViewportTest
             "examples/uniref50.fa", DataSourceType.FILE);
     ColourSchemeI cs = new PIDColourScheme();
     af.getViewport().setGlobalColourScheme(cs);
-    assertFalse(af.getViewport().getViewportColourScheme()
+    assertFalse(af.getViewport().getResidueShading()
             .conservationApplied());
   }
 
index af52c55..6abb7e5 100644 (file)
@@ -777,7 +777,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     sp = SliderPanel.getSliderPanel();
     assertTrue(sp.isForConservation());
     sp.valueChanged(20);
-    ResidueShaderI rs = av.getViewportColourScheme();
+    ResidueShaderI rs = av.getResidueShading();
     assertEquals(rs.getThreshold(), 10);
     assertTrue(rs.conservationApplied());
     assertEquals(rs.getConservationInc(), 20);
@@ -824,7 +824,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     /*
      * verify alignment (background) colouring
      */
-    rs = af.getViewport().getViewportColourScheme();
+    rs = af.getViewport().getResidueShading();
     assertTrue(rs.getColourScheme() instanceof BuriedColourScheme);
     assertEquals(rs.getThreshold(), 10);
     assertTrue(rs.conservationApplied());
index 8bab428..73b270f 100644 (file)
@@ -90,7 +90,7 @@ public class PIDColourSchemeTest
      * including gaps, A should be coloured for 50% consensus
      */
     Color c = viewport
-            .getViewportColourScheme().findColour('A', 0, seq);
+            .getResidueShading().findColour('A', 0, seq);
     assertEquals(c, over40);
 
     /*
@@ -98,7 +98,7 @@ public class PIDColourSchemeTest
      */
     viewport.setIgnoreGapsConsensus(true, af.alignPanel);
     c = viewport
-            .getViewportColourScheme().findColour('A', 0, seq);
+            .getResidueShading().findColour('A', 0, seq);
     assertEquals(c, over60);
   }
 }