From: amwaterhouse Date: Thu, 16 Feb 2006 15:47:21 +0000 (+0000) Subject: No longer used for annotation gradient X-Git-Tag: Root_VamJalview_2_07b+~122 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=80d8204b59b242403096f443ea2d9aeb355103df;p=jalview.git No longer used for annotation gradient --- diff --git a/src/jalview/gui/SliderPanel.java b/src/jalview/gui/SliderPanel.java index 6a1ae97..b830d5d 100755 --- a/src/jalview/gui/SliderPanel.java +++ b/src/jalview/gui/SliderPanel.java @@ -44,7 +44,6 @@ public class SliderPanel extends GSliderPanel static JInternalFrame PIDSlider; AlignmentPanel ap; boolean forConservation = true; - boolean forAnnotation = false; ColourSchemeI cs; /** @@ -90,43 +89,6 @@ public class SliderPanel extends GSliderPanel valueField.setText(value + ""); } - public SliderPanel(final AlignmentAnnotation annotation, final AlignmentPanel ap) - { - forAnnotation = true; - undoButton.setVisible(false); - applyButton.setVisible(false); - allGroupsCheck.setVisible(false); - label.setText("Adjust value - "+annotation.threshold.label); - - float range = annotation.graphMax * 1000 - annotation.graphMin * 1000; - - slider.setMinimum( (int) (annotation.graphMin * 1000)); - slider.setMaximum( (int) (annotation.graphMax * 1000)); - slider.setValue( (int) (annotation.threshold.value * 1000)); - valueField.setText( annotation.threshold.value + ""); - slider.setMajorTickSpacing( (int) (range / 10f)); - slider.setMinorTickSpacing( (int) (range / 100f)); - slider.setPaintTicks(true); - - JInternalFrame slideFrame = new JInternalFrame(); - slideFrame.setLayer(JLayeredPane.PALETTE_LAYER); - Desktop.addInternalFrame(slideFrame, - "Adjust " + annotation.label +" value", - 250, 90); - - slideFrame.setContentPane(this); - slider.addChangeListener(new ChangeListener() - { - public void stateChanged(ChangeEvent evt) - { - valueField.setText( ((float)slider.getValue()/1000f) + ""); - annotation.threshold.value = (float)slider.getValue()/1000f; - ap.repaint(); - } - }); - - } - /** * DOCUMENT ME! @@ -282,12 +244,10 @@ public class SliderPanel extends GSliderPanel public void valueChanged(int i) { if (cs == null) - {System.out.println("cs is null"); + { return; } - - ColourSchemeI toChange = null; Vector allGroups = null; int groupIndex = 0; @@ -354,18 +314,10 @@ public class SliderPanel extends GSliderPanel { try { - if (forAnnotation) - { - float f = Float.parseFloat(valueField.getText()); - slider.setValue( (int)( f * 1000 )); - } - else - { int i = Integer.parseInt(valueField.getText()); slider.setValue(i); - } } - catch (Exception ex) + catch (NumberFormatException ex) { valueField.setText(slider.getValue() + ""); }