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;
-import java.util.ArrayList;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBox;
{
HiddenColumns oldHidden = av.getAnnotationColumnSelectionState()
.getOldHiddenColumns();
- if (oldHidden != null)
- {
- ArrayList<int[]> regions = oldHidden.getHiddenColumnsCopy();
- for (int[] positions : regions)
- {
- av.hideColumns(positions[0], positions[1]);
- }
- }
- // TODO not clear why we need to hide all the columns (above) if we are
- // going to copy the hidden columns over wholesale anyway
av.getAlignment().setHiddenColumns(oldHidden);
}
av.sendSelection();
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
}
}
updateView();
propagateSeqAssociatedThreshold(updateAllAnnotation,
getCurrentAnnotation());
- ap.paintAlignment(false);
+ ap.paintAlignment(false, false);
}
}
av.getColumnSelection().filterAnnotations(
getCurrentAnnotation().annotations, filterParams);
- if (getActionOption() == ACTION_OPTION_HIDE)
+ boolean hideCols = getActionOption() == ACTION_OPTION_HIDE;
+ if (hideCols)
{
av.hideSelectedColumns();
}
filterParams = null;
av.setAnnotationColumnSelectionState(this);
- ap.paintAlignment(true);
+ // only update overview and structures if columns were hidden
+ ap.paintAlignment(hideCols, hideCols);
}
public HiddenColumns getOldHiddenColumns()
MessageManager.getString("label.search_filter")));
searchBox.setPrototypeDisplayValue("XXXXXXXXXXXXXXXXXXXXXXX");
- searchBox.setToolTipText(
+ searchBox.getComponent().setToolTipText(
MessageManager.getString("info.enter_search_text_here"));
- searchBox.getEditor().getEditorComponent()
- .addKeyListener(new java.awt.event.KeyAdapter()
+ searchBox.addKeyListener(new java.awt.event.KeyAdapter()
{
@Override
public void keyPressed(KeyEvent e)
}
}
});
+ searchBox.addFocusListener(new FocusAdapter()
+ {
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ searchStringAction();
+ }
+ });
JvSwingUtils.jvInitComponent(displayName, "label.label");
displayName.addActionListener(new ActionListener()
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- discriptionCheckboxAction();
+ descriptionCheckboxAction();
}
});
syncState();
- this.add(searchBox);
+ this.add(searchBox.getComponent());
this.add(displayName);
this.add(description);
}
aColChooser.updateView();
}
- public void discriptionCheckboxAction()
+ public void descriptionCheckboxAction()
{
aColChooser.setCurrentSearchPanel(this);
aColChooser.updateView();