+ protected void changeApplyTo_actionPerformed()
+ {
+ setAnnotationVisibility(true);
+
+ ap.updateAnnotation();
+ }
+
+ /**
+ * Update display when an annotation type is selected or deselected.
+ * <p>
+ * If the type is selected, set visibility of annotations of that type which
+ * are in the application scope (all, selected or unselected sequences).
+ * <p>
+ * If the type is unselected, set visibility to the opposite value. That is,
+ * treat select/deselect as a 'toggle' operation.
+ *
+ * @param type
+ */
+ protected void changeTypeSelected_actionPerformed(String type)
+ {
+ boolean typeSelected = this.selectedTypes.containsKey(type);
+ for (AlignmentAnnotation aa : this.ap.getAlignment()
+ .getAlignmentAnnotation())
+ {
+ if (aa.sequenceRef != null && type.equals(aa.label)
+ && isInActionScope(aa))
+ {
+ aa.visible = typeSelected ? this.showSelected : !this.showSelected;
+ }
+ }
+ ap.updateAnnotation();
+ }
+
+ /**
+ * Update display on change of choice of Show or Hide
+ * <p>
+ * For annotations of any selected type, set visibility of annotations of that
+ * type which are in the application scope (all, selected or unselected
+ * sequences).
+ *
+ * @param dataSourceType
+ */
+ protected void changeShowHide_actionPerformed()
+ {
+ setAnnotationVisibility(false);
+
+ ap.updateAnnotation();
+ }
+
+ /**
+ * Update visibility flags on annotation rows as per the current user choices.
+ *
+ * @param updateAllRows
+ */
+ protected void setAnnotationVisibility(boolean updateAllRows)