3 import jalview.api.analysis.AnnotationFilterParameter;
4 import jalview.datamodel.AlignmentAnnotation;
5 import jalview.datamodel.ColumnSelection;
6 import jalview.schemes.AnnotationColourGradient;
7 import jalview.util.MessageManager;
9 import java.awt.BorderLayout;
10 import java.awt.CardLayout;
11 import java.awt.Color;
12 import java.awt.Dimension;
13 import java.awt.event.ActionEvent;
14 import java.awt.event.ActionListener;
15 import java.awt.event.ItemEvent;
16 import java.awt.event.ItemListener;
17 import java.util.Iterator;
19 import javax.swing.ButtonGroup;
20 import javax.swing.JButton;
21 import javax.swing.JCheckBox;
22 import javax.swing.JComboBox;
23 import javax.swing.JInternalFrame;
24 import javax.swing.JLabel;
25 import javax.swing.JLayeredPane;
26 import javax.swing.JPanel;
27 import javax.swing.JRadioButton;
28 import javax.swing.JTextField;
29 import javax.swing.border.TitledBorder;
30 import javax.swing.event.DocumentEvent;
31 import javax.swing.event.DocumentListener;
33 import net.miginfocom.swing.MigLayout;
35 @SuppressWarnings("serial")
36 public class AnnotationColumnChooser extends AnnotationRowFilter implements
40 private JComboBox<String> annotations;
42 private JButton ok = new JButton();
44 private JButton cancel = new JButton();
46 private JPanel actionPanel = new JPanel();
48 private JPanel thresholdPanel = new JPanel();
50 private JPanel switchableViewsPanel = new JPanel(new CardLayout());
52 private CardLayout switchableViewsLayout = (CardLayout) (switchableViewsPanel
55 private JPanel noGraphFilterView = new JPanel();
57 private JPanel graphFilterView = new JPanel();
59 private JPanel annotationComboBoxPanel = new JPanel();
61 private JLabel annotationLabel = new JLabel();
63 private BorderLayout borderLayout1 = new BorderLayout();
65 private JComboBox<String> threshold = new JComboBox<String>();
67 private StructureFilterPanel gStructureFilterPanel;
69 private StructureFilterPanel ngStructureFilterPanel;
71 private StructureFilterPanel currentStructureFilterPanel;
73 private SearchPanel currentSearchPanel;
75 private SearchPanel gSearchPanel;
77 private SearchPanel ngSearchPanel;
79 private FurtherActionPanel currentFurtherActionPanel;
81 private FurtherActionPanel gFurtherActionPanel;
83 private FurtherActionPanel ngFurtherActionPanel;
85 public static final int ACTION_OPTION_SELECT = 1;
87 public static int ACTION_OPTION_HIDE = 2;
89 public static String NO_GRAPH_VIEW = "0";
91 public static String GRAPH_VIEW = "1";
93 private int actionOption = ACTION_OPTION_SELECT;
95 private ColumnSelection oldColumnSelection;
97 public AnnotationColumnChooser()
102 } catch (Exception ex)
104 ex.printStackTrace();
108 public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
111 frame = new JInternalFrame();
112 frame.setContentPane(this);
113 frame.setLayer(JLayeredPane.PALETTE_LAYER);
114 Desktop.addInternalFrame(frame,
115 MessageManager.getString("label.select_by_annotation"), 520,
118 addSliderChangeListener();
119 addSliderMouseListeners();
121 if (av.getAlignment().getAlignmentAnnotation() == null)
125 setOldColumnSelection(av.getColumnSelection());
128 setAnnotations(new JComboBox<String>(getAnnotationItems(false)));
129 populateThresholdComboBox(threshold);
131 // restore Object state from the previous session if one exists
132 if (av.getAnnotationColumnSelectionState() != null)
134 currentSearchPanel = av.getAnnotationColumnSelectionState()
135 .getCurrentSearchPanel();
136 currentStructureFilterPanel = av.getAnnotationColumnSelectionState()
137 .getCurrentStructureFilterPanel();
138 annotations.setSelectedIndex(av.getAnnotationColumnSelectionState()
139 .getAnnotations().getSelectedIndex());
140 threshold.setSelectedIndex(av.getAnnotationColumnSelectionState()
141 .getThreshold().getSelectedIndex());
142 actionOption = av.getAnnotationColumnSelectionState()
149 } catch (Exception ex)
159 private void jbInit() throws Exception
162 ok.setText(MessageManager.getString("action.ok"));
163 ok.addActionListener(new ActionListener()
166 public void actionPerformed(ActionEvent e)
168 ok_actionPerformed(e);
172 cancel.setOpaque(false);
173 cancel.setText(MessageManager.getString("action.cancel"));
174 cancel.addActionListener(new ActionListener()
177 public void actionPerformed(ActionEvent e)
179 cancel_actionPerformed(e);
183 annotations.addItemListener(this);
184 threshold.addActionListener(new ActionListener()
187 public void actionPerformed(ActionEvent e)
189 threshold_actionPerformed(e);
193 thresholdValue.setEnabled(false);
194 thresholdValue.setColumns(7);
195 thresholdValue.addActionListener(new ActionListener()
198 public void actionPerformed(ActionEvent e)
200 thresholdValue_actionPerformed(e);
204 slider.setPaintLabels(false);
205 slider.setPaintTicks(true);
206 slider.setBackground(Color.white);
207 slider.setEnabled(false);
208 slider.setOpaque(false);
209 slider.setPreferredSize(new Dimension(100, 32));
211 annotationLabel.setBackground(Color.white);
212 annotationLabel.setFont(JvSwingUtils.getLabelFont());
213 annotationLabel.setText("Select Annotation : ");
215 thresholdPanel.setBorder(new TitledBorder("Threshold Filter"));
216 thresholdPanel.setBackground(Color.white);
217 thresholdPanel.setFont(JvSwingUtils.getLabelFont());
218 thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
220 actionPanel.setBackground(Color.white);
221 actionPanel.setFont(JvSwingUtils.getLabelFont());
223 graphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
224 graphFilterView.setBackground(Color.white);
226 noGraphFilterView.setLayout(new MigLayout("", "[left][right]", "[][]"));
227 noGraphFilterView.setBackground(Color.white);
228 annotationComboBoxPanel.setBackground(Color.white);
229 annotationComboBoxPanel.setFont(JvSwingUtils.getLabelFont());
231 gSearchPanel = new SearchPanel(this);
232 ngSearchPanel = new SearchPanel(this);
233 gFurtherActionPanel = new FurtherActionPanel(this);
234 ngFurtherActionPanel = new FurtherActionPanel(this);
235 gStructureFilterPanel = new StructureFilterPanel(this);
236 ngStructureFilterPanel = new StructureFilterPanel(this);
238 thresholdPanel.add(getThreshold());
239 thresholdPanel.add(thresholdValue, "wrap");
240 thresholdPanel.add(slider, "grow, span, wrap");
243 actionPanel.add(cancel);
245 graphFilterView.add(gSearchPanel, "grow, span, wrap");
246 graphFilterView.add(gStructureFilterPanel, "grow, span, wrap");
247 graphFilterView.add(thresholdPanel, "grow, span, wrap");
248 graphFilterView.add(gFurtherActionPanel);
250 noGraphFilterView.add(ngSearchPanel, "grow, span, wrap");
251 noGraphFilterView.add(ngStructureFilterPanel, "grow, span, wrap");
252 noGraphFilterView.add(ngFurtherActionPanel);
254 annotationComboBoxPanel.add(getAnnotations());
255 switchableViewsPanel.add(noGraphFilterView,
256 AnnotationColumnChooser.NO_GRAPH_VIEW);
257 switchableViewsPanel.add(graphFilterView,
258 AnnotationColumnChooser.GRAPH_VIEW);
260 this.setLayout(borderLayout1);
261 this.add(annotationComboBoxPanel, java.awt.BorderLayout.PAGE_START);
262 this.add(switchableViewsPanel, java.awt.BorderLayout.CENTER);
263 this.add(actionPanel, java.awt.BorderLayout.SOUTH);
265 selectedAnnotationChanged();
269 @SuppressWarnings("unchecked")
272 if (this.getOldColumnSelection() != null)
274 av.getColumnSelection().clear();
276 if (av.getAnnotationColumnSelectionState() != null)
278 ColumnSelection oldSelection = av
279 .getAnnotationColumnSelectionState()
280 .getOldColumnSelection();
281 if (oldSelection != null && oldSelection.getHiddenColumns() != null
282 && !oldSelection.getHiddenColumns().isEmpty())
284 for (Iterator<int[]> itr = oldSelection.getHiddenColumns()
285 .iterator(); itr.hasNext();)
287 int positions[] = itr.next();
288 av.hideColumns(positions[0], positions[1]);
291 av.setColumnSelection(oldSelection);
293 ap.paintAlignment(true);
298 public void valueChanged(boolean updateAllAnnotation)
300 if (slider.isEnabled())
302 getCurrentAnnotation().threshold.value = slider.getValue() / 1000f;
304 propagateSeqAssociatedThreshold(updateAllAnnotation,
305 getCurrentAnnotation());
306 ap.paintAlignment(false);
310 public JComboBox<String> getThreshold()
315 public void setThreshold(JComboBox<String> threshold)
317 this.threshold = threshold;
320 public JComboBox<String> getAnnotations()
325 public void setAnnotations(JComboBox<String> annotations)
327 this.annotations = annotations;
331 public void updateView()
333 // Check if combobox is still adjusting
339 AnnotationFilterParameter filterParams = new AnnotationFilterParameter();
341 setCurrentAnnotation(av.getAlignment().getAlignmentAnnotation()[annmap[getAnnotations()
342 .getSelectedIndex()]]);
344 int selectedThresholdItem = getSelectedThresholdItem(getThreshold()
345 .getSelectedIndex());
347 slider.setEnabled(true);
348 thresholdValue.setEnabled(true);
350 if (selectedThresholdItem == AnnotationColourGradient.NO_THRESHOLD)
352 slider.setEnabled(false);
353 thresholdValue.setEnabled(false);
354 thresholdValue.setText("");
355 // build filter params
357 else if (selectedThresholdItem != AnnotationColourGradient.NO_THRESHOLD)
359 if (getCurrentAnnotation().threshold == null)
361 getCurrentAnnotation()
363 new jalview.datamodel.GraphLine(
364 (getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin) / 2f,
365 "Threshold", Color.black));
369 float range = getCurrentAnnotation().graphMax * 1000
370 - getCurrentAnnotation().graphMin * 1000;
372 slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
373 slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
374 slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
375 thresholdValue.setText(getCurrentAnnotation().threshold.value + "");
376 slider.setMajorTickSpacing((int) (range / 10f));
377 slider.setEnabled(true);
378 thresholdValue.setEnabled(true);
381 // build filter params
383 .setThresholdType(AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
384 if (getCurrentAnnotation().graph != AlignmentAnnotation.NO_GRAPH)
387 if (selectedThresholdItem == AnnotationColourGradient.ABOVE_THRESHOLD)
390 .setThresholdType(AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD);
392 else if (selectedThresholdItem == AnnotationColourGradient.BELOW_THRESHOLD)
395 .setThresholdType(AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD);
400 if (currentStructureFilterPanel != null)
402 if (currentStructureFilterPanel.getAlphaHelix().isSelected())
404 filterParams.setFilterAlphaHelix(true);
406 if (currentStructureFilterPanel.getBetaStrand().isSelected())
408 filterParams.setFilterBetaSheet(true);
410 if (currentStructureFilterPanel.getTurn().isSelected())
412 filterParams.setFilterTurn(true);
416 if (currentSearchPanel != null)
418 if (!currentSearchPanel.getSearchString().isEmpty())
420 currentSearchPanel.getDescription().setEnabled(true);
421 currentSearchPanel.getDisplayName().setEnabled(true);
422 filterParams.setRegexString(currentSearchPanel.getSearchString());
423 if (currentSearchPanel.isDisplayNameChecked())
426 .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING);
428 if (currentSearchPanel.isDescriptionChecked())
431 .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION);
436 currentSearchPanel.getDescription().setEnabled(false);
437 currentSearchPanel.getDisplayName().setEnabled(false);
441 filterAnnotations(getCurrentAnnotation().annotations, filterParams,
442 av.getColumnSelection());
444 av.showAllHiddenColumns();
445 if (getActionOption() == ACTION_OPTION_HIDE)
447 av.hideSelectedColumns();
451 av.setAnnotationColumnSelectionState(this);
452 ap.paintAlignment(true);
455 public ColumnSelection getOldColumnSelection()
457 return oldColumnSelection;
460 public void setOldColumnSelection(ColumnSelection currentColumnSelection)
462 if (currentColumnSelection != null)
464 this.oldColumnSelection = new ColumnSelection(currentColumnSelection);
468 public void select_action(ActionEvent actionEvent)
470 JRadioButton radioButton = (JRadioButton) actionEvent.getSource();
471 if (radioButton.isSelected())
473 setActionOption(ACTION_OPTION_SELECT);
478 public void hide_action(ActionEvent actionEvent)
480 JRadioButton radioButton = (JRadioButton) actionEvent.getSource();
481 if (radioButton.isSelected())
483 setActionOption(ACTION_OPTION_HIDE);
489 public void itemStateChanged(ItemEvent e)
491 selectedAnnotationChanged();
494 public void selectedAnnotationChanged()
496 String currentView = AnnotationColumnChooser.NO_GRAPH_VIEW;
497 if (av.getAlignment().getAlignmentAnnotation()[annmap[getAnnotations()
498 .getSelectedIndex()]].graph != AlignmentAnnotation.NO_GRAPH)
500 currentView = AnnotationColumnChooser.GRAPH_VIEW;
503 gSearchPanel.syncState();
504 gFurtherActionPanel.syncState();
505 gStructureFilterPanel.syncState();
507 ngSearchPanel.syncState();
508 ngFurtherActionPanel.syncState();
509 ngStructureFilterPanel.syncState();
511 switchableViewsLayout.show(switchableViewsPanel, currentView);
515 public FurtherActionPanel getCurrentFutherActionPanel()
517 return currentFurtherActionPanel;
520 public void setCurrentFutherActionPanel(
521 FurtherActionPanel currentFutherActionPanel)
523 this.currentFurtherActionPanel = currentFutherActionPanel;
526 public SearchPanel getCurrentSearchPanel()
528 return currentSearchPanel;
531 public void setCurrentSearchPanel(SearchPanel currentSearchPanel)
533 this.currentSearchPanel = currentSearchPanel;
536 public int getActionOption()
541 public void setActionOption(int actionOption)
543 this.actionOption = actionOption;
546 public StructureFilterPanel getCurrentStructureFilterPanel()
548 return currentStructureFilterPanel;
551 public void setCurrentStructureFilterPanel(
552 StructureFilterPanel currentStructureFilterPanel)
554 this.currentStructureFilterPanel = currentStructureFilterPanel;
557 public class FurtherActionPanel extends JPanel
559 private AnnotationColumnChooser aColChooser;
561 private JRadioButton hideOption = new JRadioButton();
563 private JRadioButton selectOption = new JRadioButton();
565 private ButtonGroup optionsGroup = new ButtonGroup();
567 public FurtherActionPanel(AnnotationColumnChooser aColChooser)
569 this.aColChooser = aColChooser;
570 getSelectOption().setBackground(Color.white);
571 getSelectOption().setFont(JvSwingUtils.getLabelFont());
572 getSelectOption().setText("Select");
573 getSelectOption().addActionListener(new ActionListener()
576 public void actionPerformed(ActionEvent actionEvent)
578 selectRadioAction(actionEvent);
582 getHideOption().setBackground(Color.white);
583 getHideOption().setFont(JvSwingUtils.getLabelFont());
584 getHideOption().setText("Hide");
585 getHideOption().addActionListener(new ActionListener()
588 public void actionPerformed(ActionEvent actionEvent)
590 hideRadioAction(actionEvent);
594 getOptionsGroup().add(getSelectOption());
595 getOptionsGroup().add(getHideOption());
596 getOptionsGroup().setSelected(getSelectOption().getModel(), true);
598 this.setBackground(Color.white);
599 this.setFont(JvSwingUtils.getLabelFont());
602 this.add(getSelectOption());
603 this.add(getHideOption());
606 public void selectRadioAction(ActionEvent actionEvent)
608 aColChooser.setCurrentFutherActionPanel(this);
609 aColChooser.select_action(actionEvent);
612 public void hideRadioAction(ActionEvent actionEvent)
614 aColChooser.setCurrentFutherActionPanel(this);
615 aColChooser.hide_action(actionEvent);
618 public JRadioButton getHideOption()
623 public void setHideOption(JRadioButton hideOption)
625 this.hideOption = hideOption;
628 public JRadioButton getSelectOption()
633 public void setSelectOption(JRadioButton selectOption)
635 this.selectOption = selectOption;
638 public ButtonGroup getOptionsGroup()
643 public void setOptionsGroup(ButtonGroup optionsGroup)
645 this.optionsGroup = optionsGroup;
648 public void syncState()
650 if (aColChooser.getActionOption() == AnnotationColumnChooser.ACTION_OPTION_HIDE)
652 this.getOptionsGroup().setSelected(this.getHideOption().getModel(),
657 this.getOptionsGroup().setSelected(
658 this.getSelectOption().getModel(), true);
663 public class StructureFilterPanel extends JPanel
665 private AnnotationColumnChooser aColChooser;
667 private JCheckBox alphaHelix = new JCheckBox();
669 private JCheckBox betaStrand = new JCheckBox();
671 private JCheckBox turn = new JCheckBox();
673 private JCheckBox all = new JCheckBox();
675 public StructureFilterPanel(AnnotationColumnChooser aColChooser)
677 this.aColChooser = aColChooser;
679 alphaHelix.setBackground(Color.white);
680 alphaHelix.setFont(JvSwingUtils.getLabelFont());
681 alphaHelix.setText("Alpha Helix");
682 alphaHelix.addActionListener(new ActionListener()
685 public void actionPerformed(ActionEvent actionEvent)
687 alphaHelix_actionPerformed();
691 betaStrand.setBackground(Color.white);
692 betaStrand.setFont(JvSwingUtils.getLabelFont());
693 betaStrand.setText("Beta Strand");
694 betaStrand.addActionListener(new ActionListener()
697 public void actionPerformed(ActionEvent actionEvent)
699 betaStrand_actionPerformed();
703 turn.setBackground(Color.white);
704 turn.setFont(JvSwingUtils.getLabelFont());
705 turn.setText("Turn");
706 turn.addActionListener(new ActionListener()
709 public void actionPerformed(ActionEvent actionEvent)
711 turn_actionPerformed();
715 all.setBackground(Color.white);
716 all.setFont(JvSwingUtils.getLabelFont());
717 all.setText("Select all");
718 all.addActionListener(new ActionListener()
721 public void actionPerformed(ActionEvent actionEvent)
723 all_actionPerformed();
727 this.setBorder(new TitledBorder("Structures Filter"));
728 this.setBackground(Color.white);
729 this.setFont(JvSwingUtils.getLabelFont());
732 this.add(alphaHelix);
733 this.add(betaStrand);
737 public void alphaHelix_actionPerformed()
739 updateSelectAllState();
740 aColChooser.setCurrentStructureFilterPanel(this);
741 aColChooser.updateView();
744 public void betaStrand_actionPerformed()
746 updateSelectAllState();
747 aColChooser.setCurrentStructureFilterPanel(this);
748 aColChooser.updateView();
751 public void turn_actionPerformed()
753 updateSelectAllState();
754 aColChooser.setCurrentStructureFilterPanel(this);
755 aColChooser.updateView();
758 public void all_actionPerformed()
760 if (all.isSelected())
762 alphaHelix.setSelected(true);
763 betaStrand.setSelected(true);
764 turn.setSelected(true);
768 alphaHelix.setSelected(false);
769 betaStrand.setSelected(false);
770 turn.setSelected(false);
772 aColChooser.setCurrentStructureFilterPanel(this);
773 aColChooser.updateView();
776 public void updateSelectAllState()
778 if (alphaHelix.isSelected() && betaStrand.isSelected()
779 && turn.isSelected())
781 all.setSelected(true);
785 all.setSelected(false);
789 public void syncState()
791 StructureFilterPanel sfp = aColChooser
792 .getCurrentStructureFilterPanel();
795 alphaHelix.setSelected(sfp.getAlphaHelix().isSelected());
796 betaStrand.setSelected(sfp.getBetaStrand().isSelected());
797 turn.setSelected(sfp.getTurn().isSelected());
798 if (sfp.getAll().isSelected())
800 all.setSelected(true);
801 alphaHelix.setSelected(true);
802 betaStrand.setSelected(true);
803 turn.setSelected(true);
809 public JCheckBox getAlphaHelix()
814 public void setAlphaHelix(JCheckBox alphaHelix)
816 this.alphaHelix = alphaHelix;
819 public JCheckBox getBetaStrand()
824 public void setBetaStrand(JCheckBox betaStrand)
826 this.betaStrand = betaStrand;
829 public JCheckBox getTurn()
834 public void setTurn(JCheckBox turn)
839 public JCheckBox getAll()
844 public void setAll(JCheckBox all)
851 public class SearchPanel extends JPanel
853 private AnnotationColumnChooser aColChooser;
855 private JCheckBox displayName = new JCheckBox();
857 private JCheckBox description = new JCheckBox();
859 private JTextField searchBox = new JTextField(10);
861 private JCheckBox structuresFilter = new JCheckBox();
863 public SearchPanel(AnnotationColumnChooser aColChooser)
866 this.aColChooser = aColChooser;
867 this.setBorder(new TitledBorder("Search Filter"));
868 this.setBackground(Color.white);
869 this.setFont(JvSwingUtils.getLabelFont());
871 getSearchBox().setBackground(Color.white);
872 getSearchBox().setFont(JvSwingUtils.getLabelFont());
873 getSearchBox().getDocument().addDocumentListener(
874 new DocumentListener()
877 public void insertUpdate(DocumentEvent e)
879 searchStringAction();
883 public void removeUpdate(DocumentEvent e)
885 searchStringAction();
889 public void changedUpdate(DocumentEvent e)
891 searchStringAction();
895 getDisplayName().setBackground(Color.white);
896 getDisplayName().setFont(JvSwingUtils.getLabelFont());
897 getDisplayName().setText("Display Name");
898 getDisplayName().setEnabled(false);
899 getDisplayName().addActionListener(new ActionListener()
902 public void actionPerformed(ActionEvent actionEvent)
904 displayNameCheckboxAction();
908 getDescription().setBackground(Color.white);
909 getDescription().setFont(JvSwingUtils.getLabelFont());
910 getDescription().setText("Description");
911 getDescription().setEnabled(false);
912 getDescription().addActionListener(new ActionListener()
915 public void actionPerformed(ActionEvent actionEvent)
917 discriptionCheckboxAction();
922 this.add(getSearchBox());
923 this.add(getDisplayName());
924 this.add(getDescription());
927 public boolean isDescriptionChecked()
929 return getDescription().isSelected();
932 public boolean isDisplayNameChecked()
934 return getDisplayName().isSelected();
937 public String getSearchString()
939 return getSearchBox().getText();
942 public void displayNameCheckboxAction()
944 aColChooser.setCurrentSearchPanel(this);
945 aColChooser.updateView();
948 public void discriptionCheckboxAction()
950 aColChooser.setCurrentSearchPanel(this);
951 aColChooser.updateView();
954 public void searchStringAction()
956 aColChooser.setCurrentSearchPanel(this);
957 aColChooser.updateView();
960 public JCheckBox getDisplayName()
965 public void setDisplayName(JCheckBox displayName)
967 this.displayName = displayName;
970 public JCheckBox getDescription()
975 public void setDescription(JCheckBox description)
977 this.description = description;
980 public JTextField getSearchBox()
985 public void setSearchBox(JTextField searchBox)
987 this.searchBox = searchBox;
990 public JCheckBox getStructuresFilter()
992 return structuresFilter;
995 public void setStructuresFilter(JCheckBox structuresFilter)
997 this.structuresFilter = structuresFilter;
1000 public void syncState()
1002 SearchPanel sp = aColChooser.getCurrentSearchPanel();
1005 description.setEnabled(sp.getDescription().isEnabled());
1006 description.setSelected(sp.getDescription().isSelected());
1008 displayName.setEnabled(sp.getDisplayName().isEnabled());
1009 displayName.setSelected(sp.getDisplayName().isSelected());
1011 searchBox.setText(sp.getSearchBox().getText());