+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public SequenceI getSequence()
+ {
+ return sequence;
+ }
+
+ public void setSequence(SequenceI sequence)
+ {
+ this.sequence = sequence;
+ }
+
+ }
+
+ /**
+ * This inner class holds the Layout and configuration of the panel which
+ * handles association of manually fetched structures to a unique sequence
+ * when more than one sequence selection is made
+ *
+ * @author tcnofoegbu
+ *
+ */
+ public class AssociateSeqPanel extends JPanel implements ItemListener
+ {
+ private JComboBox<AssociateSeqOptions> cmb_assSeq = new JComboBox<>();
+
+ private JLabel lbl_associateSeq = new JLabel();
+
+ public AssociateSeqPanel()
+ {
+ this.setLayout(new FlowLayout());
+ this.add(cmb_assSeq);
+ this.add(lbl_associateSeq);
+ cmb_assSeq.setToolTipText(
+ MessageManager.getString("info.associate_wit_sequence"));
+ cmb_assSeq.addItemListener(this);
+ }
+
+ public void loadCmbAssSeq()
+ {
+ populateCmbAssociateSeqOptions(cmb_assSeq, lbl_associateSeq);
+ }
+
+ public JComboBox<AssociateSeqOptions> getCmb_assSeq()
+ {
+ return cmb_assSeq;
+ }
+
+ public void setCmb_assSeq(JComboBox<AssociateSeqOptions> cmb_assSeq)
+ {
+ this.cmb_assSeq = cmb_assSeq;
+ }
+
+ @Override
+ public void itemStateChanged(ItemEvent e)
+ {
+ if (e.getStateChange() == ItemEvent.SELECTED)
+ {
+ cmbAssSeqStateChanged();
+ }
+ }
+ }
+
+ public JTable getResultTable()
+ {
+ return tbl_summary;
+ }
+
+ public JComboBox<FilterOption> getCmbFilterOption()
+ {
+ return cmb_filterOption;
+ }
+
+ /**
+ * Custom ListCellRenderer for adding a separator between different categories
+ * of structure chooser filter option drop-down.
+ *
+ * @author tcnofoegbu
+ *
+ */
+ public abstract class CustomComboSeparatorsRenderer
+ implements ListCellRenderer<Object>
+ {
+ private ListCellRenderer<Object> regent;
+
+ private JPanel separatorPanel = new JPanel(new BorderLayout());
+
+ private JSeparator jSeparator = new JSeparator();
+
+ public CustomComboSeparatorsRenderer(
+ ListCellRenderer<Object> listCellRenderer)
+ {
+ this.regent = listCellRenderer;
+ }
+
+ @Override
+ public Component getListCellRendererComponent(JList list, Object value,
+ int index, boolean isSelected, boolean cellHasFocus)
+ {
+
+ Component comp = regent.getListCellRendererComponent(list, value,
+ index, isSelected, cellHasFocus);
+ if (index != -1
+ && addSeparatorAfter(list, (FilterOption) value, index))
+ {
+ separatorPanel.removeAll();
+ separatorPanel.add(comp, BorderLayout.CENTER);
+ separatorPanel.add(jSeparator, BorderLayout.SOUTH);
+ return separatorPanel;
+ }
+ else
+ {
+ return comp;
+ }
+ }
+
+ protected abstract boolean addSeparatorAfter(JList list,
+ FilterOption value, int index);
+ }
+
+ protected abstract void stateChanged(ItemEvent e);
+
+ protected abstract void add_ActionPerformed();
+
+ protected abstract void newView_ActionPerformed();
+
+ protected abstract void pdbFromFile_actionPerformed();
+
+ protected abstract void paeMatrixFile_actionPerformed();
+
+ protected abstract void txt_search_ActionPerformed();
+
+ protected abstract void populateCmbAssociateSeqOptions(
+ JComboBox<AssociateSeqOptions> cmb_assSeq,
+ JLabel lbl_associateSeq);
+
+ protected abstract void cmbAssSeqStateChanged();
+
+ protected abstract void tabRefresh();
+
+ protected abstract void validateSelections();
+
+ public JInternalFrame getFrame()
+ {
+ return mainFrame;
+ }
+
+ public void setPdbOptionsEnabled(boolean b)
+ {
+ lbl_chooseTempFacType.setEnabled(b);
+ combo_tempFacAs.setEnabled(b);
+ btn_paeMatrixFile.setEnabled(b);
+ lbl_paeFile.setEnabled(b);
+ }