X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;fp=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;h=bbd01f6f5f950a42eb881460b1c30a2cd2369e08;hb=f647b9ceacdc464621491653cfb3382b42ca14a5;hp=a8dff62e59045a0abb18408d4bda11ac2d0709c3;hpb=dfc0108321583d7a9b88357b079316397d3a107f;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java index a8dff62..bbd01f6 100644 --- a/src/jalview/appletgui/AnnotationColumnChooser.java +++ b/src/jalview/appletgui/AnnotationColumnChooser.java @@ -204,6 +204,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements thresholdValue.setEnabled(false); thresholdValue.setColumns(7); + thresholdValue.setCaretPosition(0); ok.addActionListener(this); cancel.addActionListener(this); @@ -219,6 +220,9 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements // thresholdPanel.setFont(JvSwingUtils.getLabelFont()); // thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]")); + percentThreshold.setLabel("As percentage"); + percentThreshold.addItemListener(this); + actionPanel.setBackground(Color.white); // actionPanel.setFont(JvSwingUtils.getLabelFont()); @@ -239,6 +243,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements ngStructureFilterPanel = new StructureFilterPanel(this); thresholdPanel.setTitle("Threshold Filter"); + thresholdPanel.add(percentThreshold); thresholdPanel.add(getThreshold()); thresholdPanel.add(slider); thresholdPanel.add(thresholdValue); @@ -425,7 +430,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000)); slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000)); slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000)); - thresholdValue.setText(getCurrentAnnotation().threshold.value + ""); + setThresholdValueText(); // slider.setMajorTickSpacing((int) (range / 10f)); slider.setEnabled(true); thresholdValue.setEnabled(true); @@ -574,6 +579,14 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements { threshold_actionPerformed(null); } + else if (e.getSource() == percentThreshold) + { + if (!adjusting) + { + percentageValue_actionPerformed(); + } + + } } public void selectedAnnotationChanged()