X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationRowFilter.java;h=8b2486fd652b5b14ffc9fa45d793e59abd4104e1;hp=a3ce528e96313ed8bbcbbc55614f3c6215e64d73;hb=3d0101179759ef157b088ea135423cd909512d9f;hpb=7c70cb09e9de68ab567e38520d6d09f0c17a3939 diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index a3ce528..8b2486f 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -98,7 +98,8 @@ public abstract class AnnotationRowFilter extends JPanel * @param viewport * @param alignPanel */ - public AnnotationRowFilter(AlignViewport viewport, final AlignmentPanel alignPanel) + public AnnotationRowFilter(AlignViewport viewport, + final AlignmentPanel alignPanel) { this.av = viewport; this.ap = alignPanel; @@ -148,6 +149,7 @@ public abstract class AnnotationRowFilter extends JPanel } adjusting = oldadj; } + protected void addSliderMouseListeners() { @@ -180,23 +182,25 @@ public abstract class AnnotationRowFilter extends JPanel }); } -/** - * Builds and returns a list of menu items (display text) for choice of - * annotation. Also builds maps between annotations, their positions in the - * list, and their display labels in the list. - * - * @param isSeqAssociated - * @return - */ + /** + * Builds and returns a list of menu items (display text) for choice of + * annotation. Also builds maps between annotations, their positions in the + * list, and their display labels in the list. + * + * @param isSeqAssociated + * @return + */ public Vector getAnnotationItems(boolean isSeqAssociated) { annotationLabels = new HashMap(); Vector list = new Vector(); int index = 1; - int[] anmap = new int[av.getAlignment().getAlignmentAnnotation().length]; + int[] anmap = new int[av.getAlignment() + .getAlignmentAnnotation().length]; seqAssociated.setEnabled(false); - for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++) + for (int i = 0; i < av.getAlignment() + .getAlignmentAnnotation().length; i++) { AlignmentAnnotation annotation = av.getAlignment() .getAlignmentAnnotation()[i]; @@ -298,9 +302,8 @@ public abstract class AnnotationRowFilter extends JPanel float f = Float.parseFloat(thresholdValue.getText()); if (percentThreshold.isSelected()) { - slider.setValue(slider.getMinimum() - + ((int) ((f / 100f) * (slider.getMaximum() - slider - .getMinimum())))); + slider.setValue(slider.getMinimum() + ((int) ((f / 100f) + * (slider.getMaximum() - slider.getMinimum())))); } else { @@ -379,9 +382,11 @@ public abstract class AnnotationRowFilter extends JPanel } float thr = annotation.threshold.value; - for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++) + for (int i = 0; i < av.getAlignment() + .getAlignmentAnnotation().length; i++) { - AlignmentAnnotation aa = av.getAlignment().getAlignmentAnnotation()[i]; + AlignmentAnnotation aa = av.getAlignment() + .getAlignmentAnnotation()[i]; if (aa.label.equals(annotation.label) && (annotation.getCalcId() == null ? aa.getCalcId() == null : annotation.getCalcId().equals(aa.getCalcId()))) @@ -451,8 +456,8 @@ public abstract class AnnotationRowFilter extends JPanel selectedAnnotationChanged(); } }); - annotations.setToolTipText(MessageManager - .getString("info.select_annotation_row")); + annotations.setToolTipText( + MessageManager.getString("info.select_annotation_row")); threshold.addActionListener(new ActionListener() { @@ -474,7 +479,8 @@ public abstract class AnnotationRowFilter extends JPanel } }); - percentThreshold.setText(MessageManager.getString("label.as_percentage")); + percentThreshold + .setText(MessageManager.getString("label.as_percentage")); percentThreshold.addActionListener(new ActionListener() { @Override