2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
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.
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.
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.
22 package jalview.jbgui;
24 import java.awt.BorderLayout;
25 import java.awt.CardLayout;
26 import java.awt.Component;
27 import java.awt.Dimension;
28 import java.awt.FlowLayout;
30 import java.awt.GridLayout;
31 import java.awt.Insets;
32 import java.awt.Point;
33 import java.awt.event.ActionEvent;
34 import java.awt.event.ActionListener;
35 import java.awt.event.ItemEvent;
36 import java.awt.event.ItemListener;
37 import java.awt.event.KeyAdapter;
38 import java.awt.event.KeyEvent;
39 import java.awt.event.MouseAdapter;
40 import java.awt.event.MouseEvent;
41 import java.util.Arrays;
42 import java.util.HashMap;
45 import javax.swing.ImageIcon;
46 import javax.swing.JButton;
47 import javax.swing.JCheckBox;
48 import javax.swing.JComboBox;
49 import javax.swing.JFrame;
50 import javax.swing.JInternalFrame;
51 import javax.swing.JLabel;
52 import javax.swing.JList;
53 import javax.swing.JPanel;
54 import javax.swing.JScrollPane;
55 import javax.swing.JSeparator;
56 import javax.swing.JTabbedPane;
57 import javax.swing.JTable;
58 import javax.swing.JTextField;
59 import javax.swing.ListCellRenderer;
60 import javax.swing.SwingConstants;
61 import javax.swing.Timer;
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;
69 import jalview.datamodel.SequenceI;
70 import jalview.fts.api.FTSDataColumnI;
71 import jalview.fts.core.FTSDataColumnPreferences;
72 import jalview.gui.AlignmentPanel;
73 import jalview.gui.Desktop;
74 import jalview.gui.JvSwingUtils;
75 import jalview.gui.StructureViewer;
76 import jalview.util.MessageManager;
77 import net.miginfocom.swing.MigLayout;
79 @SuppressWarnings("serial")
81 * GUI layout for structure chooser
86 public abstract class GStructureChooser extends JPanel
87 implements ItemListener
89 private static final Font VERDANA_12 = new Font("Verdana", 0, 12);
91 public static final String VIEWS_FILTER = "VIEWS_FILTER";
93 protected static final String VIEWS_FROM_FILE = "VIEWS_FROM_FILE";
95 protected static final String VIEWS_ENTER_ID = "VIEWS_ENTER_ID";
98 * 'cached' structure view
100 protected static final String VIEWS_LOCAL_PDB = "VIEWS_LOCAL_PDB";
102 protected JPanel statusPanel = new JPanel();
104 public JLabel statusBar = new JLabel();
106 protected String frameTitle = MessageManager
107 .getString("label.structure_chooser");
109 protected JInternalFrame mainFrame = new JInternalFrame(frameTitle);
111 protected JComboBox<FilterOption> cmb_filterOption = new JComboBox<>();
113 protected AlignmentPanel ap;
115 protected StringBuilder errorWarning = new StringBuilder();
117 protected JButton btn_add;
119 protected JButton btn_newView;
121 protected JButton btn_pdbFromFile = new JButton();
123 // holder for icon and button
124 protected JPanel pnl_queryTDB;
126 protected JButton btn_queryTDB = new JButton();
128 protected JCheckBox chk_superpose = new JCheckBox(
129 MessageManager.getString("label.superpose_structures"));
131 protected JTextField txt_search = new JTextField(14);
133 protected JPanel pnl_switchableViews = new JPanel(new CardLayout());
135 protected CardLayout layout_switchableViews = (CardLayout) (pnl_switchableViews
138 protected JCheckBox chk_invertFilter = new JCheckBox(
139 MessageManager.getString("label.invert"));
141 protected ImageIcon loadingImage = new ImageIcon(
142 getClass().getResource("/images/loading.gif"));
144 protected ImageIcon goodImage = new ImageIcon(
145 getClass().getResource("/images/good.png"));
147 protected ImageIcon errorImage = new ImageIcon(
148 getClass().getResource("/images/error.png"));
150 protected ImageIcon warningImage = new ImageIcon(
151 getClass().getResource("/images/warning.gif"));
153 protected ImageIcon tdbImage = new ImageIcon(getClass()
154 .getResource("/images/3d-beacons-logo-transparent.png"));
156 protected JLabel lbl_loading = new JLabel(loadingImage);
158 protected JLabel lbl_pdbManualFetchStatus = new JLabel(errorImage);
160 protected JLabel lbl_fromFileStatus = new JLabel(errorImage);
162 protected AssociateSeqPanel idInputAssSeqPanel = new AssociateSeqPanel();
164 protected AssociateSeqPanel fileChooserAssSeqPanel = new AssociateSeqPanel();
166 protected JComboBox<StructureViewer> targetView = new JComboBox<>();
168 protected JTable tbl_local_pdb = new JTable();
170 protected JTabbedPane pnl_filter = new JTabbedPane();
172 protected abstract FTSDataColumnPreferences getFTSDocFieldPrefs();
174 protected abstract void setFTSDocFieldPrefs(
175 FTSDataColumnPreferences newPrefs);
177 protected FTSDataColumnI[] previousWantedFields;
179 protected static Map<String, Integer> tempUserPrefs = new HashMap<>();
181 private JTable tbl_summary = new JTable()
183 private boolean inLayout;
186 public boolean getScrollableTracksViewportWidth()
188 return hasExcessWidth();
193 public void doLayout()
195 if (hasExcessWidth())
197 autoResizeMode = AUTO_RESIZE_SUBSEQUENT_COLUMNS;
202 autoResizeMode = AUTO_RESIZE_OFF;
205 protected boolean hasExcessWidth()
207 return getPreferredSize().width < getParent().getWidth();
211 public void columnMarginChanged(ChangeEvent e)
217 TableColumn resizingColumn = getTableHeader().getResizingColumn();
218 // Need to do this here, before the parent's
219 // layout manager calls getPreferredSize().
220 if (resizingColumn != null && autoResizeMode == AUTO_RESIZE_OFF
223 resizingColumn.setPreferredWidth(resizingColumn.getWidth());
224 String colHeader = resizingColumn.getHeaderValue().toString();
225 tempUserPrefs.put(colHeader, resizingColumn.getWidth());
231 public String getToolTipText(MouseEvent evt)
233 String toolTipText = null;
234 java.awt.Point pnt = evt.getPoint();
235 int rowIndex = rowAtPoint(pnt);
236 int colIndex = columnAtPoint(pnt);
240 if (getValueAt(rowIndex, colIndex) == null)
244 toolTipText = getValueAt(rowIndex, colIndex).toString();
245 } catch (Exception e)
247 // e.printStackTrace();
249 toolTipText = (toolTipText == null ? null
250 : (toolTipText.length() > 500
251 ? JvSwingUtils.wrapTooltip(true,
252 "\"" + toolTipText.subSequence(0, 500)
254 : JvSwingUtils.wrapTooltip(true, toolTipText)));
259 public GStructureChooser()
263 protected void initDialog()
269 mainFrame.setVisible(false);
270 mainFrame.invalidate();
272 } catch (Exception e)
274 System.out.println(e); // for JavaScript TypeError
279 // BH SwingJS optimization
280 // (a) 100-ms interruptable timer for text entry -- BH 1/10/2019
281 // (b) two-character minimum, at least for JavaScript.
285 protected void txt_search_ActionPerformedDelayed()
291 timer = new Timer(300, new ActionListener()
295 public void actionPerformed(ActionEvent e)
297 txt_search_ActionPerformed();
300 timer.setRepeats(false);
306 * Initializes the GUI default properties
310 private void jbInit() throws Exception
312 Integer width = tempUserPrefs.get("structureChooser.width") == null
314 : tempUserPrefs.get("structureChooser.width");
315 Integer height = tempUserPrefs.get("structureChooser.height") == null
317 : tempUserPrefs.get("structureChooser.height");
318 tbl_summary.setAutoCreateRowSorter(true);
319 tbl_summary.getTableHeader().setReorderingAllowed(false);
320 tbl_summary.addMouseListener(new MouseAdapter()
323 public void mousePressed(MouseEvent e)
327 super.mousePressed(e);
332 public void mouseClicked(MouseEvent e)
336 validateSelections();
341 public void mouseReleased(MouseEvent e)
345 validateSelections();
349 boolean popupAction(MouseEvent e)
351 if (e.isPopupTrigger())
353 Point pt = e.getPoint();
354 int selectedRow = tbl_summary.rowAtPoint(pt);
355 if (showPopupFor(selectedRow, pt.x, pt.y))
363 tbl_summary.addKeyListener(new KeyAdapter()
366 public void keyPressed(KeyEvent evt)
368 validateSelections();
369 switch (evt.getKeyCode())
371 case KeyEvent.VK_ESCAPE: // escape key
374 case KeyEvent.VK_ENTER: // enter key
375 if (btn_add.isEnabled())
377 add_ActionPerformed();
380 case KeyEvent.VK_TAB: // tab key
381 if (evt.isShiftDown())
383 pnl_filter.requestFocus();
387 btn_add.requestFocus();
397 JButton btn_cancel = new JButton(
398 MessageManager.getString("action.cancel"));
399 btn_cancel.setFont(VERDANA_12);
400 btn_cancel.addActionListener(new java.awt.event.ActionListener()
403 public void actionPerformed(ActionEvent e)
405 closeAction(pnl_filter.getHeight());
408 btn_cancel.addKeyListener(new KeyAdapter()
411 public void keyPressed(KeyEvent evt)
413 if (evt.getKeyCode() == KeyEvent.VK_ENTER)
415 closeAction(pnl_filter.getHeight());
420 tbl_local_pdb.setAutoCreateRowSorter(true);
421 tbl_local_pdb.getTableHeader().setReorderingAllowed(false);
422 tbl_local_pdb.addMouseListener(new MouseAdapter()
425 public void mouseClicked(MouseEvent e)
427 validateSelections();
431 public void mouseReleased(MouseEvent e)
433 validateSelections();
436 tbl_local_pdb.addKeyListener(new KeyAdapter()
439 public void keyPressed(KeyEvent evt)
441 validateSelections();
442 switch (evt.getKeyCode())
444 case KeyEvent.VK_ESCAPE: // escape key
447 case KeyEvent.VK_ENTER: // enter key
448 if (btn_add.isEnabled())
450 add_ActionPerformed();
453 case KeyEvent.VK_TAB: // tab key
454 if (evt.isShiftDown())
456 cmb_filterOption.requestFocus();
460 if (btn_add.isEnabled())
462 btn_add.requestFocus();
466 btn_cancel.requestFocus();
477 btn_newView = new JButton(
478 MessageManager.formatMessage("action.new_structure_view_with",
479 StructureViewer.getViewerType().toString()));
480 btn_newView.setFont(VERDANA_12);
481 btn_newView.addActionListener(new java.awt.event.ActionListener()
484 public void actionPerformed(ActionEvent e)
486 newView_ActionPerformed();
489 btn_newView.addKeyListener(new KeyAdapter()
492 public void keyPressed(KeyEvent evt)
494 if (evt.getKeyCode() == KeyEvent.VK_ENTER)
496 newView_ActionPerformed();
501 // TODO: JAL-3898 - get list of available external programs to view
504 btn_add = new JButton(MessageManager.getString("action.add"));
505 btn_add.setFont(VERDANA_12);
506 btn_add.addActionListener(new java.awt.event.ActionListener()
509 public void actionPerformed(ActionEvent e)
511 add_ActionPerformed();
514 btn_add.addKeyListener(new KeyAdapter()
517 public void keyPressed(KeyEvent evt)
519 if (evt.getKeyCode() == KeyEvent.VK_ENTER)
521 add_ActionPerformed();
526 btn_pdbFromFile.setFont(VERDANA_12);
527 String btn_title = MessageManager.getString("label.select_pdb_file");
528 btn_pdbFromFile.setText(btn_title + " ");
529 btn_pdbFromFile.addActionListener(new java.awt.event.ActionListener()
532 public void actionPerformed(ActionEvent e)
534 pdbFromFile_actionPerformed();
537 btn_pdbFromFile.addKeyListener(new KeyAdapter()
540 public void keyPressed(KeyEvent evt)
542 if (evt.getKeyCode() == KeyEvent.VK_ENTER)
544 pdbFromFile_actionPerformed();
549 JScrollPane scrl_foundStructures = new JScrollPane(tbl_summary);
550 scrl_foundStructures.setPreferredSize(new Dimension(width, height));
552 JScrollPane scrl_localPDB = new JScrollPane(tbl_local_pdb);
553 scrl_localPDB.setPreferredSize(new Dimension(width, height));
554 scrl_localPDB.setHorizontalScrollBarPolicy(
555 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
557 chk_invertFilter.setFont(VERDANA_12);
558 txt_search.setToolTipText(JvSwingUtils.wrapTooltip(true,
559 MessageManager.getString("label.enter_pdb_id_tip")));
560 txt_search.getDocument().addDocumentListener(new DocumentListener()
563 public void insertUpdate(DocumentEvent e)
565 txt_search_ActionPerformedDelayed();
569 public void removeUpdate(DocumentEvent e)
571 txt_search_ActionPerformedDelayed();
575 public void changedUpdate(DocumentEvent e)
577 txt_search_ActionPerformedDelayed();
581 cmb_filterOption.setFont(VERDANA_12);
582 cmb_filterOption.setToolTipText(
583 MessageManager.getString("info.select_filter_option"));
584 cmb_filterOption.addItemListener(this);
585 // add CustomComboSeparatorsRenderer to filter option combo-box
586 cmb_filterOption.setRenderer(new CustomComboSeparatorsRenderer(
587 (ListCellRenderer<Object>) cmb_filterOption.getRenderer())
590 protected boolean addSeparatorAfter(JList list, FilterOption value,
593 return value.isAddSeparatorAfter();
597 chk_invertFilter.addItemListener(this);
598 btn_queryTDB = new JButton(
599 MessageManager.getString("label.search_3dbeacons"));
600 btn_queryTDB.setIconTextGap(12);
601 btn_queryTDB.setIcon(tdbImage);
602 btn_queryTDB.setVerticalTextPosition(SwingConstants.CENTER);
603 btn_queryTDB.setHorizontalTextPosition(SwingConstants.TRAILING);
604 btn_queryTDB.setFont(VERDANA_12);
605 btn_queryTDB.setToolTipText(
606 MessageManager.getString("label.find_models_from_3dbeacons"));
607 btn_queryTDB.setMargin(new Insets(2, 16, 2, 20));
608 // btn_queryTDB.setPreferredSize(new Dimension(200, 32));
609 btn_queryTDB.setVisible(false);
611 targetView.setVisible(false);
613 JPanel actionsPanel = new JPanel(new MigLayout());
614 actionsPanel.add(targetView, "left");
615 actionsPanel.add(btn_add, "wrap");
616 actionsPanel.add(chk_superpose, "left");
617 actionsPanel.add(btn_newView);
618 actionsPanel.add(btn_cancel, "right");
620 JPanel pnl_main = new JPanel(new BorderLayout());
621 JPanel pnl_controls = new JPanel();
622 pnl_queryTDB = new JPanel();
623 pnl_queryTDB.setLayout(new FlowLayout(FlowLayout.CENTER, 4, 4));
624 pnl_queryTDB.setBackground(getBackground());
625 pnl_queryTDB.add(btn_queryTDB);
627 pnl_queryTDB.setVisible(false);
628 pnl_main.add(pnl_queryTDB, BorderLayout.NORTH);
629 pnl_controls.add(cmb_filterOption);
630 pnl_controls.add(lbl_loading);
631 pnl_controls.add(chk_invertFilter);
632 pnl_main.add(pnl_controls, BorderLayout.CENTER);
633 lbl_loading.setVisible(false);
635 JPanel pnl_fileChooser = new JPanel(new FlowLayout());
636 pnl_fileChooser.add(btn_pdbFromFile);
637 pnl_fileChooser.add(lbl_fromFileStatus);
638 JPanel pnl_fileChooserBL = new JPanel(new BorderLayout());
639 pnl_fileChooserBL.add(fileChooserAssSeqPanel, BorderLayout.NORTH);
640 pnl_fileChooserBL.add(pnl_fileChooser, BorderLayout.CENTER);
642 JPanel pnl_idInput = new JPanel(new FlowLayout());
643 pnl_idInput.add(txt_search);
644 pnl_idInput.add(lbl_pdbManualFetchStatus);
646 JPanel pnl_idInputBL = new JPanel(new BorderLayout());
647 pnl_idInputBL.add(idInputAssSeqPanel, BorderLayout.NORTH);
648 pnl_idInputBL.add(pnl_idInput, BorderLayout.CENTER);
650 final String foundStructureSummary = MessageManager
651 .getString("label.found_structures_summary");
652 final String configureCols = MessageManager
653 .getString("label.configure_displayed_columns");
654 ChangeListener changeListener = new ChangeListener()
657 public void stateChanged(ChangeEvent changeEvent)
659 JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent
661 int index = sourceTabbedPane.getSelectedIndex();
662 btn_add.setVisible(targetView.isVisible());
663 btn_newView.setVisible(true);
664 btn_cancel.setVisible(true);
665 if (sourceTabbedPane.getTitleAt(index).equals(configureCols))
667 btn_add.setEnabled(false);
668 btn_cancel.setEnabled(false);
669 btn_add.setVisible(false);
670 btn_newView.setEnabled(false);
671 btn_cancel.setVisible(false);
672 previousWantedFields = getFTSDocFieldPrefs()
673 .getStructureSummaryFields()
674 .toArray(new FTSDataColumnI[0]);
676 if (sourceTabbedPane.getTitleAt(index)
677 .equals(foundStructureSummary))
679 btn_cancel.setEnabled(true);
680 if (wantedFieldsUpdated())
686 validateSelections();
691 pnl_filter.addChangeListener(changeListener);
692 pnl_filter.setPreferredSize(new Dimension(width, height));
693 pnl_filter.add(foundStructureSummary, scrl_foundStructures);
694 pnl_filter.add(configureCols, getFTSDocFieldPrefs());
696 JPanel pnl_locPDB = new JPanel(new BorderLayout());
697 pnl_locPDB.add(scrl_localPDB);
699 pnl_switchableViews.add(pnl_fileChooserBL, VIEWS_FROM_FILE);
700 pnl_switchableViews.add(pnl_idInputBL, VIEWS_ENTER_ID);
701 pnl_switchableViews.add(pnl_filter, VIEWS_FILTER);
702 pnl_switchableViews.add(pnl_locPDB, VIEWS_LOCAL_PDB);
704 this.setLayout(new BorderLayout());
705 this.add(pnl_main, java.awt.BorderLayout.NORTH);
706 this.add(pnl_switchableViews, java.awt.BorderLayout.CENTER);
707 // this.add(pnl_actions, java.awt.BorderLayout.SOUTH);
708 statusPanel.setLayout(new GridLayout());
710 JPanel pnl_actionsAndStatus = new JPanel(new BorderLayout());
711 pnl_actionsAndStatus.add(actionsPanel, BorderLayout.CENTER);
712 pnl_actionsAndStatus.add(statusPanel, BorderLayout.SOUTH);
713 statusPanel.add(statusBar, null);
714 this.add(pnl_actionsAndStatus, java.awt.BorderLayout.SOUTH);
716 mainFrame.addInternalFrameListener(
717 new javax.swing.event.InternalFrameAdapter()
720 public void internalFrameClosing(InternalFrameEvent e)
722 closeAction(pnl_filter.getHeight());
725 mainFrame.setVisible(true);
726 mainFrame.setContentPane(this);
727 mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
728 Integer x = tempUserPrefs.get("structureChooser.x");
729 Integer y = tempUserPrefs.get("structureChooser.y");
730 if (x != null && y != null)
732 mainFrame.setLocation(x, y);
734 Desktop.addInternalFrame(mainFrame, frameTitle, width, height);
737 protected abstract boolean showPopupFor(int selectedRow, int x, int y);
739 protected void closeAction(int preferredHeight)
741 // System.out.println(">>>>>>>>>> closing internal frame!!!");
742 // System.out.println("width : " + mainFrame.getWidth());
743 // System.out.println("heigh : " + mainFrame.getHeight());
744 // System.out.println("x : " + mainFrame.getX());
745 // System.out.println("y : " + mainFrame.getY());
746 tempUserPrefs.put("structureChooser.width", pnl_filter.getWidth());
747 tempUserPrefs.put("structureChooser.height", preferredHeight);
748 tempUserPrefs.put("structureChooser.x", mainFrame.getX());
749 tempUserPrefs.put("structureChooser.y", mainFrame.getY());
753 public boolean wantedFieldsUpdated()
755 if (previousWantedFields == null)
760 FTSDataColumnI[] currentWantedFields = getFTSDocFieldPrefs()
761 .getStructureSummaryFields().toArray(new FTSDataColumnI[0]);
762 return Arrays.equals(currentWantedFields, previousWantedFields) ? false
769 * Event listener for the 'filter' combo-box and 'invert' check-box
771 public void itemStateChanged(ItemEvent e)
777 * This inner class provides the provides the data model for associate
778 * sequence combo-box - cmb_assSeq
783 public class AssociateSeqOptions
785 private SequenceI sequence;
789 public AssociateSeqOptions(SequenceI seq)
792 this.name = (seq.getName().length() >= 23)
793 ? seq.getName().substring(0, 23)
797 public AssociateSeqOptions(String name, SequenceI seq)
804 public String toString()
809 public String getName()
814 public void setName(String name)
819 public SequenceI getSequence()
824 public void setSequence(SequenceI sequence)
826 this.sequence = sequence;
832 * This inner class holds the Layout and configuration of the panel which
833 * handles association of manually fetched structures to a unique sequence
834 * when more than one sequence selection is made
839 public class AssociateSeqPanel extends JPanel implements ItemListener
841 private JComboBox<AssociateSeqOptions> cmb_assSeq = new JComboBox<>();
843 private JLabel lbl_associateSeq = new JLabel();
845 public AssociateSeqPanel()
847 this.setLayout(new FlowLayout());
848 this.add(cmb_assSeq);
849 this.add(lbl_associateSeq);
850 cmb_assSeq.setToolTipText(
851 MessageManager.getString("info.associate_wit_sequence"));
852 cmb_assSeq.addItemListener(this);
855 public void loadCmbAssSeq()
857 populateCmbAssociateSeqOptions(cmb_assSeq, lbl_associateSeq);
860 public JComboBox<AssociateSeqOptions> getCmb_assSeq()
865 public void setCmb_assSeq(JComboBox<AssociateSeqOptions> cmb_assSeq)
867 this.cmb_assSeq = cmb_assSeq;
871 public void itemStateChanged(ItemEvent e)
873 if (e.getStateChange() == ItemEvent.SELECTED)
875 cmbAssSeqStateChanged();
880 public JTable getResultTable()
885 public JComboBox<FilterOption> getCmbFilterOption()
887 return cmb_filterOption;
891 * Custom ListCellRenderer for adding a separator between different categories
892 * of structure chooser filter option drop-down.
897 public abstract class CustomComboSeparatorsRenderer
898 implements ListCellRenderer<Object>
900 private ListCellRenderer<Object> regent;
902 private JPanel separatorPanel = new JPanel(new BorderLayout());
904 private JSeparator jSeparator = new JSeparator();
906 public CustomComboSeparatorsRenderer(
907 ListCellRenderer<Object> listCellRenderer)
909 this.regent = listCellRenderer;
913 public Component getListCellRendererComponent(JList list, Object value,
914 int index, boolean isSelected, boolean cellHasFocus)
917 Component comp = regent.getListCellRendererComponent(list, value,
918 index, isSelected, cellHasFocus);
920 && addSeparatorAfter(list, (FilterOption) value, index))
922 separatorPanel.removeAll();
923 separatorPanel.add(comp, BorderLayout.CENTER);
924 separatorPanel.add(jSeparator, BorderLayout.SOUTH);
925 return separatorPanel;
933 protected abstract boolean addSeparatorAfter(JList list,
934 FilterOption value, int index);
937 protected abstract void stateChanged(ItemEvent e);
939 protected abstract void add_ActionPerformed();
941 protected abstract void newView_ActionPerformed();
943 protected abstract void pdbFromFile_actionPerformed();
945 protected abstract void txt_search_ActionPerformed();
947 protected abstract void populateCmbAssociateSeqOptions(
948 JComboBox<AssociateSeqOptions> cmb_assSeq,
949 JLabel lbl_associateSeq);
951 protected abstract void cmbAssSeqStateChanged();
953 protected abstract void tabRefresh();
955 protected abstract void validateSelections();
957 public JInternalFrame getFrame()