X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FSliderPanel.java;h=1beb82bcf251756d8de4cb9f5ac6feab15cdb6d7;hb=400b50efffaa43ae2c3b4d3f653bf8215c5d1edc;hp=5179eb0805eb02f39d57b6f0cc2700a757337946;hpb=06ce849ffedc7ab10a3c54cda96b9a7dec58c136;p=jalview.git diff --git a/src/jalview/appletgui/SliderPanel.java b/src/jalview/appletgui/SliderPanel.java index 5179eb0..1beb82b 100644 --- a/src/jalview/appletgui/SliderPanel.java +++ b/src/jalview/appletgui/SliderPanel.java @@ -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,27 +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.cs = cs; + sp.cs = ccs; + sp.valueField.setText(String.valueOf(ccs.getConservationInc())); } conservationSlider @@ -119,20 +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.cs = cs; + pid.cs = ccs; + pid.valueField.setText(String.valueOf(ccs.getThreshold())); } PIDSlider .setTitle(MessageManager.formatMessage( @@ -186,8 +188,8 @@ public class SliderPanel extends Panel implements ActionListener, if (PIDSlider != null) { PIDSlider.setVisible(false); + PIDSlider = null; } - PIDSlider = null; } /** @@ -198,11 +200,11 @@ public class SliderPanel extends Panel implements ActionListener, if (conservationSlider != null) { conservationSlider.setVisible(false); + conservationSlider = null; } - conservationSlider = null; } public SliderPanel(AlignmentPanel ap, int value, boolean forConserve, - ColourSchemeI cs) + CollectionColourSchemeI collectionColourSchemeI) { try { @@ -212,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); @@ -247,7 +249,7 @@ public class SliderPanel extends Panel implements ActionListener, return; } - ColourSchemeI toChange = cs; + CollectionColourSchemeI toChange = cs; Iterator allGroups = null; if (allGroupsCheck.getState())