X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationRowFilter.java;h=71ad6a54e709df92a868bb1bc0f24e049465518d;hb=e34a4c5332c2d4d92651e0adc99ab7c5d262d13b;hp=8b2486fd652b5b14ffc9fa45d793e59abd4104e1;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index 8b2486f..71ad6a5 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -80,7 +80,7 @@ public abstract class AnnotationRowFilter extends JPanel */ protected boolean sliderDragging = false; - protected JComboBox threshold = new JComboBox(); + protected JComboBox threshold = new JComboBox<>(); protected JComboBox annotations; @@ -177,7 +177,6 @@ public abstract class AnnotationRowFilter extends JPanel sliderDragging = false; valueChanged(true); } - ap.paintAlignment(true); } }); } @@ -192,9 +191,9 @@ public abstract class AnnotationRowFilter extends JPanel */ public Vector getAnnotationItems(boolean isSeqAssociated) { - annotationLabels = new HashMap(); + annotationLabels = new HashMap<>(); - Vector list = new Vector(); + Vector list = new Vector<>(); int index = 1; int[] anmap = new int[av.getAlignment() .getAlignmentAnnotation().length]; @@ -271,7 +270,7 @@ public abstract class AnnotationRowFilter extends JPanel public void cancel_actionPerformed() { reset(); - ap.paintAlignment(true); + ap.paintAlignment(true, true); try { frame.setClosed(true); @@ -413,6 +412,11 @@ public abstract class AnnotationRowFilter extends JPanel this.currentAnnotation = annotation; } + /** + * update associated view model and trigger any necessary repaints. + * + * @param updateAllAnnotation + */ protected abstract void valueChanged(boolean updateAllAnnotation); protected abstract void updateView();