Merge branch 'features/JAL-2360colourSchemeApplicability' into
[jalview.git] / src / jalview / appletgui / SliderPanel.java
index b52fae9..1beb82b 100644 (file)
@@ -21,7 +21,7 @@
 package jalview.appletgui;
 
 import jalview.datamodel.SequenceGroup;
-import jalview.schemes.ColourSchemeI;
+import jalview.schemes.CollectionColourSchemeI;
 import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
@@ -53,28 +53,28 @@ public class SliderPanel extends Panel implements ActionListener,
 
   boolean forConservation = true;
 
-  ColourSchemeI cs;
+  CollectionColourSchemeI cs;
 
   static Frame conservationSlider;
 
   static Frame PIDSlider;
 
   public static int setConservationSlider(AlignmentPanel ap,
-          ColourSchemeI cs, String source)
+          CollectionColourSchemeI ccs, String source)
   {
     SliderPanel sp = null;
 
     if (conservationSlider == null)
     {
-      sp = new SliderPanel(ap, cs.getConservationInc(), true, cs);
+      sp = new SliderPanel(ap, ccs.getConservationInc(), true, ccs);
       conservationSlider = new Frame();
       conservationSlider.add(sp);
     }
     else
     {
       sp = (SliderPanel) conservationSlider.getComponent(0);
-      sp.valueField.setText(String.valueOf(cs.getConservationInc()));
-      sp.cs = cs;
+      sp.cs = ccs;
+      sp.valueField.setText(String.valueOf(ccs.getConservationInc()));
     }
 
     conservationSlider
@@ -120,21 +120,21 @@ public class SliderPanel extends Panel implements ActionListener,
 
   }
 
-  public static int setPIDSliderSource(AlignmentPanel ap, ColourSchemeI cs,
-          String source)
+  public static int setPIDSliderSource(AlignmentPanel ap,
+          CollectionColourSchemeI ccs, String source)
   {
     SliderPanel pid = null;
     if (PIDSlider == null)
     {
-      pid = new SliderPanel(ap, cs.getThreshold(), false, cs);
+      pid = new SliderPanel(ap, ccs.getThreshold(), false, ccs);
       PIDSlider = new Frame();
       PIDSlider.add(pid);
     }
     else
     {
       pid = (SliderPanel) PIDSlider.getComponent(0);
-      pid.valueField.setText(String.valueOf(cs.getThreshold()));
-      pid.cs = cs;
+      pid.cs = ccs;
+      pid.valueField.setText(String.valueOf(ccs.getThreshold()));
     }
     PIDSlider
             .setTitle(MessageManager.formatMessage(
@@ -204,7 +204,7 @@ public class SliderPanel extends Panel implements ActionListener,
     }
   }
   public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
-          ColourSchemeI cs)
+          CollectionColourSchemeI collectionColourSchemeI)
   {
     try
     {
@@ -214,7 +214,7 @@ public class SliderPanel extends Panel implements ActionListener,
       e.printStackTrace();
     }
     this.ap = ap;
-    this.cs = cs;
+    this.cs = collectionColourSchemeI;
     forConservation = forConserve;
     undoButton.setVisible(false);
     applyButton.setVisible(false);
@@ -249,7 +249,7 @@ public class SliderPanel extends Panel implements ActionListener,
       return;
     }
 
-    ColourSchemeI toChange = cs;
+    CollectionColourSchemeI toChange = cs;
     Iterator<SequenceGroup> allGroups = null;
 
     if (allGroupsCheck.getState())