JAL-2231 save preferred scroll height _without_ progress bar message
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21
22 package jalview.jbgui;
23
24 import jalview.datamodel.SequenceI;
25 import jalview.fts.api.FTSDataColumnI;
26 import jalview.fts.core.FTSDataColumnPreferences;
27 import jalview.fts.core.FTSDataColumnPreferences.PreferenceSource;
28 import jalview.fts.service.pdb.PDBFTSRestClient;
29 import jalview.gui.AlignmentPanel;
30 import jalview.gui.Desktop;
31 import jalview.gui.JvSwingUtils;
32 import jalview.util.MessageManager;
33
34 import java.awt.BorderLayout;
35 import java.awt.CardLayout;
36 import java.awt.Dimension;
37 import java.awt.FlowLayout;
38 import java.awt.GridLayout;
39 import java.awt.event.ActionEvent;
40 import java.awt.event.ItemEvent;
41 import java.awt.event.ItemListener;
42 import java.awt.event.KeyAdapter;
43 import java.awt.event.KeyEvent;
44 import java.awt.event.MouseAdapter;
45 import java.awt.event.MouseEvent;
46 import java.util.Arrays;
47 import java.util.HashMap;
48 import java.util.Map;
49
50 import javax.swing.ImageIcon;
51 import javax.swing.JButton;
52 import javax.swing.JCheckBox;
53 import javax.swing.JComboBox;
54 import javax.swing.JFrame;
55 import javax.swing.JInternalFrame;
56 import javax.swing.JLabel;
57 import javax.swing.JPanel;
58 import javax.swing.JScrollPane;
59 import javax.swing.JTabbedPane;
60 import javax.swing.JTable;
61 import javax.swing.JTextField;
62 import javax.swing.event.ChangeEvent;
63 import javax.swing.event.ChangeListener;
64 import javax.swing.event.DocumentEvent;
65 import javax.swing.event.DocumentListener;
66 import javax.swing.event.InternalFrameEvent;
67 import javax.swing.table.TableColumn;
68
69 @SuppressWarnings("serial")
70 /**
71  * GUI layout for structure chooser 
72  * @author tcnofoegbu
73  *
74  */
75 public abstract class GStructureChooser extends JPanel implements
76         ItemListener
77 {
78   protected JPanel statusPanel = new JPanel();
79
80   public JLabel statusBar = new JLabel();
81
82   private JPanel pnl_actionsAndStatus = new JPanel(new BorderLayout());
83
84   protected String frameTitle = MessageManager
85           .getString("label.structure_chooser");
86
87   protected JInternalFrame mainFrame = new JInternalFrame(frameTitle);
88
89   protected JComboBox<FilterOption> cmb_filterOption = new JComboBox<FilterOption>();
90
91   protected AlignmentPanel ap;
92
93   protected StringBuilder errorWarning = new StringBuilder();
94
95   protected JLabel lbl_result = new JLabel(
96           MessageManager.getString("label.select"));
97
98   protected JButton btn_view = new JButton();
99
100   protected JButton btn_cancel = new JButton();
101
102   protected JButton btn_pdbFromFile = new JButton();
103
104   protected JTextField txt_search = new JTextField(14);
105
106   private JPanel pnl_actions = new JPanel();
107
108   private JPanel pnl_main = new JPanel();
109
110   private JPanel pnl_idInput = new JPanel(new FlowLayout());
111
112   private JPanel pnl_fileChooser = new JPanel(new FlowLayout());
113
114   private JPanel pnl_idInputBL = new JPanel(new BorderLayout());
115
116   private JPanel pnl_fileChooserBL = new JPanel(new BorderLayout());
117
118   private JPanel pnl_locPDB = new JPanel(new BorderLayout());
119
120   protected JPanel pnl_switchableViews = new JPanel(new CardLayout());
121
122   protected CardLayout layout_switchableViews = (CardLayout) (pnl_switchableViews
123           .getLayout());
124
125   private BorderLayout mainLayout = new BorderLayout();
126
127   protected JCheckBox chk_rememberSettings = new JCheckBox(
128           MessageManager.getString("label.dont_ask_me_again"));
129
130   protected JCheckBox chk_invertFilter = new JCheckBox(
131           MessageManager.getString("label.invert"));
132
133   protected ImageIcon loadingImage = new ImageIcon(getClass().getResource(
134           "/images/loading.gif"));
135
136   protected ImageIcon goodImage = new ImageIcon(getClass().getResource(
137           "/images/good.png"));
138
139   protected ImageIcon errorImage = new ImageIcon(getClass().getResource(
140           "/images/error.png"));
141
142   protected ImageIcon warningImage = new ImageIcon(getClass().getResource(
143           "/images/warning.gif"));
144
145   protected JLabel lbl_warning = new JLabel(warningImage);
146
147   protected JLabel lbl_loading = new JLabel(loadingImage);
148
149   protected JLabel lbl_pdbManualFetchStatus = new JLabel(errorImage);
150
151   protected JLabel lbl_fromFileStatus = new JLabel(errorImage);
152
153   protected AssciateSeqPanel idInputAssSeqPanel = new AssciateSeqPanel();
154
155   protected AssciateSeqPanel fileChooserAssSeqPanel = new AssciateSeqPanel();
156
157   protected static final String VIEWS_FILTER = "VIEWS_FILTER";
158
159   protected static final String VIEWS_FROM_FILE = "VIEWS_FROM_FILE";
160
161   protected static final String VIEWS_ENTER_ID = "VIEWS_ENTER_ID";
162
163   protected static final String VIEWS_LOCAL_PDB = "VIEWS_LOCAL_PDB";
164
165   protected JTable tbl_local_pdb = new JTable();
166
167   protected JScrollPane scrl_localPDB = new JScrollPane(tbl_local_pdb);
168
169   protected JTabbedPane pnl_filter = new JTabbedPane();
170
171   protected FTSDataColumnPreferences pdbDocFieldPrefs = new FTSDataColumnPreferences(
172           PreferenceSource.STRUCTURE_CHOOSER,
173           PDBFTSRestClient.getInstance());
174
175   protected FTSDataColumnI[] previousWantedFields;
176
177   protected static Map<String, Integer> tempUserPrefs = new HashMap<String, Integer>();
178
179   private JTable tbl_summary = new JTable()
180   {
181     private boolean inLayout;
182
183     @Override
184     public boolean getScrollableTracksViewportWidth()
185     {
186       return hasExcessWidth();
187
188     }
189
190     @Override
191     public void doLayout()
192     {
193       if (hasExcessWidth())
194       {
195         autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS;
196       }
197       inLayout = true;
198       super.doLayout();
199       inLayout = false;
200       autoResizeMode = AUTO_RESIZE_OFF;
201     }
202
203     protected boolean hasExcessWidth()
204     {
205       return getPreferredSize().width < getParent().getWidth();
206     }
207
208     @Override
209     public void columnMarginChanged(ChangeEvent e)
210     {
211       if (isEditing())
212       {
213         removeEditor();
214       }
215       TableColumn resizingColumn = getTableHeader().getResizingColumn();
216       // Need to do this here, before the parent's
217       // layout manager calls getPreferredSize().
218       if (resizingColumn != null && autoResizeMode == AUTO_RESIZE_OFF
219               && !inLayout)
220       {
221         resizingColumn.setPreferredWidth(resizingColumn.getWidth());
222         String colHeader = resizingColumn.getHeaderValue().toString();
223         tempUserPrefs.put(colHeader, resizingColumn.getWidth());
224       }
225       resizeAndRepaint();
226     }
227
228     @Override
229     public String getToolTipText(MouseEvent evt)
230     {
231       String toolTipText = null;
232       java.awt.Point pnt = evt.getPoint();
233       int rowIndex = rowAtPoint(pnt);
234       int colIndex = columnAtPoint(pnt);
235
236       try
237       {
238         if (getValueAt(rowIndex, colIndex) == null)
239         {
240           return null;
241         }
242         toolTipText = getValueAt(rowIndex, colIndex).toString();
243       } catch (Exception e)
244       {
245         // e.printStackTrace();
246       }
247       toolTipText = (toolTipText == null ? null
248               : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip(
249                       true, "\"" + toolTipText.subSequence(0, 500)
250                               + "...\"") : JvSwingUtils.wrapTooltip(true,
251                       toolTipText)));
252       return toolTipText;
253     }
254   };
255
256   protected JScrollPane scrl_foundStructures = new JScrollPane(tbl_summary);
257
258   public GStructureChooser()
259   {
260     try
261     {
262       jbInit();
263       mainFrame.setVisible(false);
264       mainFrame.invalidate();
265       mainFrame.pack();
266     } catch (Exception e)
267     {
268       e.printStackTrace();
269     }
270   }
271
272   /**
273    * Initializes the GUI default properties
274    * 
275    * @throws Exception
276    */
277   private void jbInit() throws Exception
278   {
279     Integer width = tempUserPrefs.get("structureChooser.width") == null ? 800
280             : tempUserPrefs.get("structureChooser.width");
281     Integer height = tempUserPrefs.get("structureChooser.height") == null ? 400
282             : tempUserPrefs.get("structureChooser.height");
283     tbl_summary.setAutoCreateRowSorter(true);
284     tbl_summary.getTableHeader().setReorderingAllowed(false);
285     tbl_summary.addMouseListener(new MouseAdapter()
286     {
287       @Override
288       public void mouseClicked(MouseEvent e)
289       {
290         validateSelections();
291       }
292
293       @Override
294       public void mouseReleased(MouseEvent e)
295       {
296         validateSelections();
297       }
298     });
299     tbl_summary.addKeyListener(new KeyAdapter()
300     {
301       @Override
302       public void keyPressed(KeyEvent evt)
303       {
304         validateSelections();
305         switch (evt.getKeyCode())
306         {
307         case KeyEvent.VK_ESCAPE: // escape key
308           mainFrame.dispose();
309           break;
310         case KeyEvent.VK_ENTER: // enter key
311           if (btn_view.isEnabled())
312           {
313             ok_ActionPerformed();
314           }
315           break;
316         case KeyEvent.VK_TAB: // tab key
317           if (evt.isShiftDown())
318           {
319             pnl_filter.requestFocus();
320           }
321           else
322           {
323             btn_view.requestFocus();
324           }
325           evt.consume();
326           break;
327         default:
328           return;
329         }
330       }
331     });
332     tbl_local_pdb.setAutoCreateRowSorter(true);
333     tbl_local_pdb.getTableHeader().setReorderingAllowed(false);
334     tbl_local_pdb.addMouseListener(new MouseAdapter()
335     {
336       @Override
337       public void mouseClicked(MouseEvent e)
338       {
339         validateSelections();
340       }
341
342       @Override
343       public void mouseReleased(MouseEvent e)
344       {
345         validateSelections();
346       }
347     });
348     tbl_local_pdb.addKeyListener(new KeyAdapter()
349     {
350       @Override
351       public void keyPressed(KeyEvent evt)
352       {
353         validateSelections();
354         switch (evt.getKeyCode())
355         {
356         case KeyEvent.VK_ESCAPE: // escape key
357           mainFrame.dispose();
358           break;
359         case KeyEvent.VK_ENTER: // enter key
360           if (btn_view.isEnabled())
361           {
362             ok_ActionPerformed();
363           }
364           break;
365         case KeyEvent.VK_TAB: // tab key
366           if (evt.isShiftDown())
367           {
368             cmb_filterOption.requestFocus();
369           }
370           else
371           {
372             if (btn_view.isEnabled())
373             {
374               btn_view.requestFocus();
375             }
376             else
377             {
378               btn_cancel.requestFocus();
379             }
380           }
381           evt.consume();
382           break;
383         default:
384           return;
385         }
386       }
387     });
388     btn_view.setFont(new java.awt.Font("Verdana", 0, 12));
389     btn_view.setText(MessageManager.getString("action.view"));
390     btn_view.addActionListener(new java.awt.event.ActionListener()
391     {
392       @Override
393       public void actionPerformed(ActionEvent e)
394       {
395         ok_ActionPerformed();
396       }
397     });
398     btn_view.addKeyListener(new KeyAdapter()
399     {
400       @Override
401       public void keyPressed(KeyEvent evt)
402       {
403         if (evt.getKeyCode() == KeyEvent.VK_ENTER)
404         {
405           ok_ActionPerformed();
406         }
407       }
408     });
409
410     btn_cancel.setFont(new java.awt.Font("Verdana", 0, 12));
411     btn_cancel.setText(MessageManager.getString("action.cancel"));
412     btn_cancel.addActionListener(new java.awt.event.ActionListener()
413     {
414       @Override
415       public void actionPerformed(ActionEvent e)
416       {
417         closeAction(pnl_filter.getHeight());
418       }
419     });
420     btn_cancel.addKeyListener(new KeyAdapter()
421     {
422       @Override
423       public void keyPressed(KeyEvent evt)
424       {
425         if (evt.getKeyCode() == KeyEvent.VK_ENTER)
426         {
427           closeAction(pnl_filter.getHeight());
428         }
429       }
430     });
431
432     btn_pdbFromFile.setFont(new java.awt.Font("Verdana", 0, 12));
433     String btn_title = MessageManager.getString("label.select_pdb_file");
434     btn_pdbFromFile.setText(btn_title + "              ");
435     btn_pdbFromFile.addActionListener(new java.awt.event.ActionListener()
436     {
437       @Override
438       public void actionPerformed(ActionEvent e)
439       {
440         pdbFromFile_actionPerformed();
441       }
442     });
443     btn_pdbFromFile.addKeyListener(new KeyAdapter()
444     {
445       @Override
446       public void keyPressed(KeyEvent evt)
447       {
448         if (evt.getKeyCode() == KeyEvent.VK_ENTER)
449         {
450           pdbFromFile_actionPerformed();
451         }
452       }
453     });
454
455     scrl_foundStructures.setPreferredSize(new Dimension(width, height));
456
457     scrl_localPDB.setPreferredSize(new Dimension(width, height));
458     scrl_localPDB
459             .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
460
461     cmb_filterOption.setFont(new java.awt.Font("Verdana", 0, 12));
462     chk_invertFilter.setFont(new java.awt.Font("Verdana", 0, 12));
463     chk_rememberSettings.setFont(new java.awt.Font("Verdana", 0, 12));
464     chk_rememberSettings.setVisible(false);
465     txt_search.setToolTipText(JvSwingUtils.wrapTooltip(true,
466             MessageManager.getString("label.enter_pdb_id")));
467     cmb_filterOption.setToolTipText(MessageManager
468             .getString("info.select_filter_option"));
469     txt_search.getDocument().addDocumentListener(new DocumentListener()
470     {
471       @Override
472       public void insertUpdate(DocumentEvent e)
473       {
474         txt_search_ActionPerformed();
475       }
476
477       @Override
478       public void removeUpdate(DocumentEvent e)
479       {
480         txt_search_ActionPerformed();
481       }
482
483       @Override
484       public void changedUpdate(DocumentEvent e)
485       {
486         txt_search_ActionPerformed();
487       }
488     });
489
490     cmb_filterOption.addItemListener(this);
491     chk_invertFilter.addItemListener(this);
492
493     pnl_actions.add(chk_rememberSettings);
494     pnl_actions.add(btn_view);
495     pnl_actions.add(btn_cancel);
496
497     // pnl_filter.add(lbl_result);
498     pnl_main.add(cmb_filterOption);
499     pnl_main.add(lbl_loading);
500     pnl_main.add(chk_invertFilter);
501     lbl_loading.setVisible(false);
502
503     pnl_fileChooser.add(btn_pdbFromFile);
504     pnl_fileChooser.add(lbl_fromFileStatus);
505     pnl_fileChooserBL.add(fileChooserAssSeqPanel, BorderLayout.NORTH);
506     pnl_fileChooserBL.add(pnl_fileChooser, BorderLayout.CENTER);
507
508     pnl_idInput.add(txt_search);
509     pnl_idInput.add(lbl_pdbManualFetchStatus);
510     pnl_idInputBL.add(idInputAssSeqPanel, BorderLayout.NORTH);
511     pnl_idInputBL.add(pnl_idInput, BorderLayout.CENTER);
512
513     final String foundStructureSummary = MessageManager
514             .getString("label.found_structures_summary");
515     final String configureCols = MessageManager
516             .getString("label.configure_displayed_columns");
517     ChangeListener changeListener = new ChangeListener()
518     {
519       @Override
520       public void stateChanged(ChangeEvent changeEvent)
521       {
522         JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent
523                 .getSource();
524         int index = sourceTabbedPane.getSelectedIndex();
525         btn_view.setVisible(true);
526         btn_cancel.setVisible(true);
527         if (sourceTabbedPane.getTitleAt(index).equals(configureCols))
528         {
529           btn_view.setEnabled(false);
530           btn_cancel.setEnabled(false);
531           btn_view.setVisible(false);
532           btn_cancel.setVisible(false);
533           previousWantedFields = pdbDocFieldPrefs
534                   .getStructureSummaryFields().toArray(
535                           new FTSDataColumnI[0]);
536         }
537         if (sourceTabbedPane.getTitleAt(index)
538                 .equals(foundStructureSummary))
539         {
540           btn_cancel.setEnabled(true);
541           if (wantedFieldsUpdated())
542           {
543             tabRefresh();
544           }
545           else
546           {
547             validateSelections();
548           }
549         }
550       }
551     };
552     pnl_filter.addChangeListener(changeListener);
553     pnl_filter.setPreferredSize(new Dimension(width, height));
554     pnl_filter.add(foundStructureSummary, scrl_foundStructures);
555     pnl_filter.add(configureCols, pdbDocFieldPrefs);
556
557     pnl_locPDB.add(scrl_localPDB);
558
559     pnl_switchableViews.add(pnl_fileChooserBL, VIEWS_FROM_FILE);
560     pnl_switchableViews.add(pnl_idInputBL, VIEWS_ENTER_ID);
561     pnl_switchableViews.add(pnl_filter, VIEWS_FILTER);
562     pnl_switchableViews.add(pnl_locPDB, VIEWS_LOCAL_PDB);
563
564     this.setLayout(mainLayout);
565     this.add(pnl_main, java.awt.BorderLayout.NORTH);
566     this.add(pnl_switchableViews, java.awt.BorderLayout.CENTER);
567     // this.add(pnl_actions, java.awt.BorderLayout.SOUTH);
568     statusPanel.setLayout(new GridLayout());
569     pnl_actionsAndStatus.add(pnl_actions, BorderLayout.CENTER);
570     pnl_actionsAndStatus.add(statusPanel, BorderLayout.SOUTH);
571     statusPanel.add(statusBar, null);
572     this.add(pnl_actionsAndStatus, java.awt.BorderLayout.SOUTH);
573
574     mainFrame
575             .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
576             {
577               @Override
578               public void internalFrameClosing(InternalFrameEvent e)
579               {
580                 closeAction(pnl_filter.getHeight());
581               }
582             });
583     mainFrame.setVisible(true);
584     mainFrame.setContentPane(this);
585     mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
586     Integer x = tempUserPrefs.get("structureChooser.x");
587     Integer y = tempUserPrefs.get("structureChooser.y");
588     if (x != null && y != null)
589     {
590       mainFrame.setLocation(x, y);
591     }
592     Desktop.addInternalFrame(mainFrame, frameTitle, width, height);
593   }
594
595   protected void closeAction(int preferredHeight)
596   {
597     // System.out.println(">>>>>>>>>> closing internal frame!!!");
598     // System.out.println("width : " + mainFrame.getWidth());
599     // System.out.println("heigh : " + mainFrame.getHeight());
600     // System.out.println("x : " + mainFrame.getX());
601     // System.out.println("y : " + mainFrame.getY());
602     tempUserPrefs.put("structureChooser.width", pnl_filter.getWidth());
603     tempUserPrefs.put("structureChooser.height", preferredHeight);
604     tempUserPrefs.put("structureChooser.x", mainFrame.getX());
605     tempUserPrefs.put("structureChooser.y", mainFrame.getY());
606     mainFrame.dispose();
607   }
608
609   public boolean wantedFieldsUpdated()
610   {
611     if (previousWantedFields == null)
612     {
613       return true;
614     }
615     
616     FTSDataColumnI[] currentWantedFields = pdbDocFieldPrefs
617             .getStructureSummaryFields()
618             .toArray(new FTSDataColumnI[0]);
619     return Arrays.equals(currentWantedFields, previousWantedFields) ? false
620             : true;
621
622   }
623
624   @Override
625   /**
626    * Event listener for the 'filter' combo-box and 'invert' check-box
627    */
628   public void itemStateChanged(ItemEvent e)
629   {
630     stateChanged(e);
631   }
632
633   /**
634    * This inner class provides the data model for the structure filter combo-box
635    * 
636    * @author tcnofoegbu
637    *
638    */
639   public class FilterOption
640   {
641     private String name;
642
643     private String value;
644
645     private String view;
646
647     public FilterOption(String name, String value, String view)
648     {
649       this.name = name;
650       this.value = value;
651       this.view = view;
652     }
653
654     public String getName()
655     {
656       return name;
657     }
658
659     public void setName(String name)
660     {
661       this.name = name;
662     }
663
664     public String getValue()
665     {
666       return value;
667     }
668
669     public void setValue(String value)
670     {
671       this.value = value;
672     }
673
674     public String getView()
675     {
676       return view;
677     }
678
679     public void setView(String view)
680     {
681       this.view = view;
682     }
683
684     @Override
685     public String toString()
686     {
687       return this.name;
688     }
689   }
690
691   /**
692    * This inner class provides the provides the data model for associate
693    * sequence combo-box - cmb_assSeq
694    * 
695    * @author tcnofoegbu
696    *
697    */
698   public class AssociateSeqOptions
699   {
700     private SequenceI sequence;
701
702     private String name;
703
704     public AssociateSeqOptions(SequenceI seq)
705     {
706       this.sequence = seq;
707       this.name = (seq.getName().length() >= 23) ? seq.getName().substring(
708               0, 23) : seq.getName();
709     }
710
711     public AssociateSeqOptions(String name, SequenceI seq)
712     {
713       this.name = name;
714       this.sequence = seq;
715     }
716
717     @Override
718     public String toString()
719     {
720       return name;
721     }
722
723     public String getName()
724     {
725       return name;
726     }
727
728     public void setName(String name)
729     {
730       this.name = name;
731     }
732
733     public SequenceI getSequence()
734     {
735       return sequence;
736     }
737
738     public void setSequence(SequenceI sequence)
739     {
740       this.sequence = sequence;
741     }
742
743   }
744
745   /**
746    * This inner class holds the Layout and configuration of the panel which
747    * handles association of manually fetched structures to a unique sequence
748    * when more than one sequence selection is made
749    * 
750    * @author tcnofoegbu
751    *
752    */
753   public class AssciateSeqPanel extends JPanel implements ItemListener
754   {
755     private JComboBox<AssociateSeqOptions> cmb_assSeq = new JComboBox<AssociateSeqOptions>();
756
757     private JLabel lbl_associateSeq = new JLabel();
758
759     public AssciateSeqPanel()
760     {
761       this.setLayout(new FlowLayout());
762       this.add(cmb_assSeq);
763       this.add(lbl_associateSeq);
764       cmb_assSeq.setToolTipText(MessageManager
765               .getString("info.associate_wit_sequence"));
766       cmb_assSeq.addItemListener(this);
767     }
768
769     public void loadCmbAssSeq()
770     {
771       populateCmbAssociateSeqOptions(cmb_assSeq, lbl_associateSeq);
772     }
773
774     public JComboBox<AssociateSeqOptions> getCmb_assSeq()
775     {
776       return cmb_assSeq;
777     }
778
779     public void setCmb_assSeq(JComboBox<AssociateSeqOptions> cmb_assSeq)
780     {
781       this.cmb_assSeq = cmb_assSeq;
782     }
783
784     @Override
785     public void itemStateChanged(ItemEvent e)
786     {
787       if (e.getStateChange() == ItemEvent.SELECTED)
788       {
789         cmbAssSeqStateChanged();
790       }
791     }
792   }
793
794   public JTable getResultTable()
795   {
796     return tbl_summary;
797   }
798   public JComboBox<FilterOption> getCmbFilterOption()
799   {
800     return cmb_filterOption;
801   }
802
803   protected abstract void stateChanged(ItemEvent e);
804
805   protected abstract void updateCurrentView();
806
807   protected abstract void populateFilterComboBox();
808
809   protected abstract void ok_ActionPerformed();
810
811   protected abstract void pdbFromFile_actionPerformed();
812
813   protected abstract void txt_search_ActionPerformed();
814
815   public abstract void populateCmbAssociateSeqOptions(
816           JComboBox<AssociateSeqOptions> cmb_assSeq, JLabel lbl_associateSeq);
817
818   public abstract void cmbAssSeqStateChanged();
819
820   public abstract void tabRefresh();
821
822   public abstract void validateSelections();
823 }