X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationColumnChooser.java;h=5adecad0a226dbe24e45a7c72c9ee25177844a18;hb=6f04e0a80f3c3ba8087a1ad316debd395d0a4db0;hp=8dd988ee99fb99945712a2a71bbf565441f82c07;hpb=f1e2d882404c5cdc821a772f0bd6103a226822ac;p=jalview.git diff --git a/src/jalview/gui/AnnotationColumnChooser.java b/src/jalview/gui/AnnotationColumnChooser.java index 8dd988e..5adecad 100644 --- a/src/jalview/gui/AnnotationColumnChooser.java +++ b/src/jalview/gui/AnnotationColumnChooser.java @@ -33,6 +33,8 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.KeyEvent; @@ -243,7 +245,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter av.getAlignment().setHiddenColumns(oldHidden); } av.sendSelection(); - ap.paintAlignment(true); + ap.paintAlignment(true, true); } } @@ -256,7 +258,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter updateView(); propagateSeqAssociatedThreshold(updateAllAnnotation, getCurrentAnnotation()); - ap.paintAlignment(false); + ap.paintAlignment(false, false); } } @@ -380,7 +382,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter av.getColumnSelection().filterAnnotations( getCurrentAnnotation().annotations, filterParams); - if (getActionOption() == ACTION_OPTION_HIDE) + boolean hideCols = getActionOption() == ACTION_OPTION_HIDE; + if (hideCols) { av.hideSelectedColumns(); } @@ -388,7 +391,8 @@ public class AnnotationColumnChooser extends AnnotationRowFilter filterParams = null; av.setAnnotationColumnSelectionState(this); - ap.paintAlignment(true); + // only update overview and structures if columns were hidden + ap.paintAlignment(hideCols, hideCols); } public HiddenColumns getOldHiddenColumns() @@ -742,6 +746,15 @@ public class AnnotationColumnChooser extends AnnotationRowFilter } } }); + searchBox.getEditor().getEditorComponent() + .addFocusListener(new FocusAdapter() + { + @Override + public void focusLost(FocusEvent e) + { + searchStringAction(); + } + }); JvSwingUtils.jvInitComponent(displayName, "label.label"); displayName.addActionListener(new ActionListener() @@ -759,7 +772,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter @Override public void actionPerformed(ActionEvent actionEvent) { - discriptionCheckboxAction(); + descriptionCheckboxAction(); } }); @@ -775,7 +788,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter aColChooser.updateView(); } - public void discriptionCheckboxAction() + public void descriptionCheckboxAction() { aColChooser.setCurrentSearchPanel(this); aColChooser.updateView();