+ /**
+ * This inner class provides the provides the data model for associate
+ * sequence combo-box - cmb_assSeq
+ *
+ * @author tcnofoegbu
+ *
+ */
+ public class AssociateSeqOptions
+ {
+ private SequenceI sequence;
+
+ private String name;
+
+ public AssociateSeqOptions(SequenceI seq)
+ {
+ this.sequence = seq;
+ this.name = (seq.getName().length() >= 23) ? seq.getName().substring(
+ 0, 23) : seq.getName();
+ }
+
+ public AssociateSeqOptions(String name, SequenceI seq)
+ {
+ this.name = name;
+ this.sequence = seq;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ 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 AssciateSeqPanel extends JPanel implements ItemListener
+ {
+ private JComboBox<AssociateSeqOptions> cmb_assSeq = new JComboBox<AssociateSeqOptions>();
+
+ private JLabel lbl_associateSeq = new JLabel();
+
+ public AssciateSeqPanel()
+ {
+ 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;
+ }