SliderPanel pid = null;
if (PIDSlider == null)
{
- pid = new SliderPanel(ap, 50, false, cs);
+ pid = new SliderPanel(ap, cs.getThreshold(), false, cs);
PIDSlider = new Frame();
PIDSlider.add(pid);
}
}
+ /**
+ * Hides the PID slider panel if it is shown
+ */
public static void hidePIDSlider()
{
- PIDSlider.setVisible(false);
- PIDSlider = null;
+ if (PIDSlider != null)
+ {
+ PIDSlider.setVisible(false);
+ PIDSlider = null;
+ }
}
+ /**
+ * Hides the conservation slider panel if it is shown
+ */
public static void hideConservationSlider()
{
- conservationSlider.setVisible(false);
- conservationSlider = null;
+ if (conservationSlider != null)
+ {
+ conservationSlider.setVisible(false);
+ conservationSlider = null;
+ }
}
public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,
ColourSchemeI cs)