From: gmungoc Date: Fri, 20 Jan 2017 14:44:02 +0000 (+0000) Subject: Merge branch 'features/JAL-2360colourSchemeApplicability' into X-Git-Tag: Release_2_10_3b1~357^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c63c9f4011573ca0e65befe9633a9380a829527b;p=jalview.git Merge branch 'features/JAL-2360colourSchemeApplicability' into features/JAL-2371collectionColourScheme Conflicts: src/jalview/appletgui/SliderPanel.java src/jalview/gui/SliderPanel.java --- c63c9f4011573ca0e65befe9633a9380a829527b diff --cc src/jalview/appletgui/SliderPanel.java index 2aa010f,b52fae9..1beb82b --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@@ -60,22 -60,21 +60,21 @@@ public class SliderPanel extends Panel static Frame PIDSlider; public static int setConservationSlider(AlignmentPanel ap, - CollectionColourSchemeI collectionColourSchemeI, String source) - ColourSchemeI cs, String source) ++ CollectionColourSchemeI ccs, String source) { SliderPanel sp = null; if (conservationSlider == null) { - sp = new SliderPanel(ap, - collectionColourSchemeI.getConservationInc(), true, - collectionColourSchemeI); - 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.cs = collectionColourSchemeI; - sp.valueField.setText(String.valueOf(cs.getConservationInc())); - sp.cs = cs; ++ sp.cs = ccs; ++ sp.valueField.setText(String.valueOf(ccs.getConservationInc())); } conservationSlider @@@ -134,7 -133,8 +133,8 @@@ 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( diff --cc src/jalview/gui/SeqPanel.java index 6b764d0,4fdb25a..47b0694 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@@ -1733,15 -1732,15 +1733,15 @@@ public class SeqPanel extends JPanel im stretchGroup.cs.alignmentChanged(stretchGroup, av.getHiddenRepSequences()); + CollectionColourSchemeI groupColourScheme = stretchGroup.getGroupColourScheme(); + String name = stretchGroup.getName(); if (stretchGroup.cs.conservationApplied()) { - SliderPanel.setConservationSlider(ap, stretchGroup.cs, - stretchGroup.getName()); + SliderPanel.setConservationSlider(ap, groupColourScheme, name); } - else + if (stretchGroup.cs.getThreshold() > 0) { - SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, - stretchGroup.getName()); + SliderPanel.setPIDSliderSource(ap, groupColourScheme, name); } } PaintRefresher.Refresh(this, av.getSequenceSetId()); diff --cc src/jalview/gui/SliderPanel.java index b386dec,62ee954..4600ab7 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@@ -118,7 -119,7 +118,7 @@@ public class SliderPanel extends GSlide * * @param ap * DOCUMENT ME! -- * @param cs ++ * @param ccs * DOCUMENT ME! * @param source * DOCUMENT ME! @@@ -126,13 -127,13 +126,13 @@@ * @return DOCUMENT ME! */ public static int setConservationSlider(AlignmentPanel ap, - CollectionColourSchemeI cs, String source) - 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 JInternalFrame(); conservationSlider.setContentPane(sp); conservationSlider.setLayer(JLayeredPane.PALETTE_LAYER); @@@ -140,8 -141,8 +140,8 @@@ else { sp = (SliderPanel) conservationSlider.getContentPane(); - sp.slider.setValue(cs.getConservationInc()); - sp.cs = cs; - sp.valueField.setText(String.valueOf(cs.getConservationInc())); - sp.cs = cs; ++ sp.valueField.setText(String.valueOf(ccs.getConservationInc())); ++ sp.cs = ccs; } conservationSlider @@@ -224,24 -225,23 +224,23 @@@ * * @param ap * DOCUMENT ME! - * @param collectionColourScheme - * @param cs ++ * @param ccs * DOCUMENT ME! * @param source * DOCUMENT ME! * * @return DOCUMENT ME! */ - public static int setPIDSliderSource(AlignmentPanel ap, ColourSchemeI cs, - String source) + public static int setPIDSliderSource(AlignmentPanel ap, - CollectionColourSchemeI collectionColourScheme, - String source) ++ CollectionColourSchemeI ccs, String source) { SliderPanel pid = null; - int threshold = collectionColourScheme.getThreshold(); - int threshold = cs.getThreshold(); ++ int threshold = ccs.getThreshold(); if (PIDSlider == null) { - pid = new SliderPanel(ap, threshold, false, collectionColourScheme); - pid = new SliderPanel(ap, threshold, false, cs); ++ pid = new SliderPanel(ap, threshold, false, ccs); PIDSlider = new JInternalFrame(); PIDSlider.setContentPane(pid); PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER); @@@ -249,8 -249,8 +248,8 @@@ else { pid = (SliderPanel) PIDSlider.getContentPane(); - pid.cs = collectionColourScheme; - pid.slider.setValue(collectionColourScheme.getThreshold()); - pid.valueField.setText(String.valueOf(cs.getThreshold())); - pid.cs = cs; ++ pid.cs = ccs; ++ pid.valueField.setText(String.valueOf(ccs.getThreshold())); } PIDSlider