X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FAnnotationColumnChooser.java;h=999d217f6296143922c788b9cd9ad446a22b549a;hb=95702b58b4a81f53147aa5e4add078f965966437;hp=d0f1247554dfa9c1a2b35663ea2b77af965429af;hpb=8018887d2917a478af88ab5ed3c7621d7cf18967;p=jalview.git diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index d0f1247..999d217 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -21,7 +21,6 @@ package jalview.gui; -import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.ColumnSelection; import jalview.schemes.AnnotationColourGradient; import jalview.util.MessageManager; @@ -30,6 +29,7 @@ import jalview.viewmodel.annotationfilter.AnnotationFilterParameter; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Color; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; @@ -88,6 +88,10 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements private ColumnSelection oldColumnSelection; + protected int MIN_WIDTH = 420; + + protected int MIN_HEIGHT = 430; + public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap) { super(av, ap); @@ -97,6 +101,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements Desktop.addInternalFrame(frame, MessageManager.getString("label.select_by_annotation"), 520, 215); + frame.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT)); addSliderChangeListener(); addSliderMouseListeners(); @@ -318,16 +323,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000)); slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000)); - if (percentThreshold.isSelected()) - { - thresholdValue - .setText("" - + ((getCurrentAnnotation().threshold.value - getCurrentAnnotation().graphMin) * 100f / (getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin))); - } - else - { - thresholdValue.setText(getCurrentAnnotation().threshold.value + ""); - } + setThresholdValueText(); slider.setMajorTickSpacing((int) (range / 10f)); slider.setEnabled(true); @@ -337,7 +333,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements // build filter params filterParams .setThresholdType(AnnotationFilterParameter.ThresholdType.NO_THRESHOLD); - if (getCurrentAnnotation().graph != AlignmentAnnotation.NO_GRAPH) + if (getCurrentAnnotation().isQuantitative()) { filterParams .setThresholdValue(getCurrentAnnotation().threshold.value); @@ -498,8 +494,9 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements public void selectedAnnotationChanged() { String currentView = AnnotationColumnChooser.NO_GRAPH_VIEW; - if (av.getAlignment().getAlignmentAnnotation()[annmap[getAnnotations() - .getSelectedIndex()]].graph != AlignmentAnnotation.NO_GRAPH) + if (av.getAlignment() + .getAlignmentAnnotation()[annmap[getAnnotations() + .getSelectedIndex()]].isQuantitative()) { currentView = AnnotationColumnChooser.GRAPH_VIEW; }