X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fjbgui%2FGStructureChooser.java;h=d8cff06968935629621837ac566f6e11018679a9;hb=08c587d9947f357382199bdb6900c263efc62739;hp=7224b78110c318326ec4383a7a160abd0e1f0336;hpb=0ae0771700df811f421f8548e40dae2cd11cfae0;p=jalview.git
diff --git a/src/jalview/jbgui/GStructureChooser.java b/src/jalview/jbgui/GStructureChooser.java
index 7224b78..d8cff06 100644
--- a/src/jalview/jbgui/GStructureChooser.java
+++ b/src/jalview/jbgui/GStructureChooser.java
@@ -1,18 +1,48 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+
package jalview.jbgui;
+import jalview.datamodel.SequenceI;
import jalview.gui.AlignmentPanel;
import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
+import jalview.jbgui.PDBDocFieldPreferences.PreferenceSource;
import jalview.util.MessageManager;
-import jalview.ws.uimodel.PDBSearchResponse.PDBResponseSummary;
+import jalview.ws.dbsources.PDBRestClient;
+import jalview.ws.dbsources.PDBRestClient.PDBDocField;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
-import java.awt.Image;
+import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.Arrays;
import javax.swing.ImageIcon;
import javax.swing.JButton;
@@ -21,64 +51,103 @@ import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
-import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
-import javax.swing.ListSelectionModel;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
@SuppressWarnings("serial")
+/**
+ * GUI layout for structure chooser
+ * @author tcnofoegbu
+ *
+ */
public abstract class GStructureChooser extends JPanel implements
ItemListener
{
- protected String frameTitle = "Structure Chooser";
+ protected JPanel statusPanel = new JPanel();
- protected JInternalFrame mainFrame = new JInternalFrame(frameTitle);
+ public JLabel statusBar = new JLabel();
+ private JPanel pnl_actionsAndStatus = new JPanel(new BorderLayout());
+ protected String frameTitle = MessageManager
+ .getString("label.structure_chooser");
- protected JComboBox filterOptionsComboBox = new JComboBox();
+ protected JInternalFrame mainFrame = new JInternalFrame(frameTitle);
+
+ protected JComboBox cmb_filterOption = new JComboBox();
protected AlignmentPanel ap;
- protected JLabel resultLabel = new JLabel("Select : ");
+ protected StringBuilder errorWarning = new StringBuilder();
- protected JButton ok = new JButton();
+ protected JLabel lbl_result = new JLabel(
+ MessageManager.getString("label.select"));
- protected JButton cancel = new JButton();
+ protected JButton btn_view = new JButton();
- protected JButton pdbFromFile = new JButton();
+ protected JButton btn_cancel = new JButton();
- protected JTextField search = new JTextField(16);
+ protected JButton btn_pdbFromFile = new JButton();
- protected JPanel actionPanel = new JPanel();
+ protected JTextField txt_search = new JTextField(14);
- protected JPanel filterPanel = new JPanel();
+ private JPanel pnl_actions = new JPanel();
- protected JPanel idInputPanel = new JPanel();
+ private JPanel pnl_main = new JPanel();
- protected JPanel fileChooserPanel = new JPanel();
+ private JPanel pnl_idInput = new JPanel(new FlowLayout());
- protected JPanel switchableViewsPanel = new JPanel(new CardLayout());
+ private JPanel pnl_fileChooser = new JPanel(new FlowLayout());
- protected CardLayout switchableViewsLayout = (CardLayout) (switchableViewsPanel
- .getLayout());
+ private JPanel pnl_idInputBL = new JPanel(new BorderLayout());
- protected BorderLayout mainLayout = new BorderLayout();
+ private JPanel pnl_fileChooserBL = new JPanel(new BorderLayout());
- protected BorderLayout idInputPanelLayout = new BorderLayout();
+ private JPanel pnl_locPDB = new JPanel(new BorderLayout());
- protected BorderLayout fileChooserPanelLayout = new BorderLayout();
+ protected JPanel pnl_switchableViews = new JPanel(new CardLayout());
- protected JCheckBox rememberSettings = new JCheckBox("Don't ask me again");
+ protected CardLayout layout_switchableViews = (CardLayout) (pnl_switchableViews
+ .getLayout());
+
+ private BorderLayout mainLayout = new BorderLayout();
+
+ protected JCheckBox chk_rememberSettings = new JCheckBox(
+ MessageManager.getString("label.dont_ask_me_again"));
- protected JCheckBox invertFilter = new JCheckBox("Invert");
+ protected JCheckBox chk_invertFilter = new JCheckBox(
+ MessageManager.getString("label.invert"));
protected ImageIcon loadingImage = new ImageIcon(getClass().getResource(
"/images/loading.gif"));
- protected JLabel loadingImageLabel = new JLabel(loadingImage);
+ protected ImageIcon goodImage = new ImageIcon(getClass().getResource(
+ "/images/good.png"));
+
+ protected ImageIcon errorImage = new ImageIcon(getClass().getResource(
+ "/images/error.png"));
+
+ protected ImageIcon warningImage = new ImageIcon(getClass().getResource(
+ "/images/warning.gif"));
+
+ protected JLabel lbl_warning = new JLabel(warningImage);
+
+ protected JLabel lbl_loading = new JLabel(loadingImage);
+
+ protected JLabel lbl_pdbManualFetchStatus = new JLabel(errorImage);
+
+ protected JLabel lbl_fromFileStatus = new JLabel(errorImage);
+
+ protected AssciateSeqPanel idInputAssSeqPanel = new AssciateSeqPanel();
+
+ protected AssciateSeqPanel fileChooserAssSeqPanel = new AssciateSeqPanel();
protected static final String VIEWS_FILTER = "VIEWS_FILTER";
@@ -86,14 +155,46 @@ public abstract class GStructureChooser extends JPanel implements
protected static final String VIEWS_ENTER_ID = "VIEWS_ENTER_ID";
- protected JList jListFoundStructures = new JList();
+ protected static final String VIEWS_LOCAL_PDB = "VIEWS_LOCAL_PDB";
- // protected JScrollPane foundStructuresScroller = new JScrollPane(
- // jListFoundStructures);
+ protected JTable tbl_summary = new JTable()
+ {
+ @Override
+ public String getToolTipText(MouseEvent evt)
+ {
+ String toolTipText = null;
+ java.awt.Point pnt = evt.getPoint();
+ int rowIndex = rowAtPoint(pnt);
+ int colIndex = columnAtPoint(pnt);
- protected JTable summaryTable = new JTable();
- protected JScrollPane foundStructuresScroller = new JScrollPane(
- summaryTable);
+ try
+ {
+ toolTipText = getValueAt(rowIndex, colIndex).toString();
+ } catch (Exception e)
+ {
+ // e.printStackTrace();
+ }
+ toolTipText = (toolTipText == null ? null
+ : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip(
+ true, "\"" + toolTipText.subSequence(0, 500)
+ + "...\"") : JvSwingUtils.wrapTooltip(true,
+ toolTipText)));
+ return toolTipText;
+ }
+ };
+
+ protected JScrollPane scrl_foundStructures = new JScrollPane(tbl_summary);
+
+ protected JTable tbl_local_pdb = new JTable();
+
+ protected JScrollPane scrl_localPDB = new JScrollPane(tbl_local_pdb);
+
+ private JTabbedPane pnl_filter = new JTabbedPane();
+
+ private PDBDocFieldPreferences pdbDocFieldPrefs = new PDBDocFieldPreferences(
+ PreferenceSource.STRUCTURE_CHOOSER);
+
+ protected PDBDocField[] previousWantedFields;
public GStructureChooser()
{
@@ -109,81 +210,301 @@ public abstract class GStructureChooser extends JPanel implements
}
}
+ /**
+ * Initializes the GUI default properties
+ *
+ * @throws Exception
+ */
private void jbInit() throws Exception
{
- ok.setFont(new java.awt.Font("Verdana", 0, 12));
- ok.setText(MessageManager.getString("action.view"));
- ok.addActionListener(new java.awt.event.ActionListener()
+ tbl_summary.setAutoCreateRowSorter(true);
+ tbl_summary.getTableHeader().setReorderingAllowed(false);
+ tbl_summary.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ validateSelections();
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent e)
+ {
+ validateSelections();
+ }
+ });
+ tbl_summary.addKeyListener(new KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ validateSelections();
+ switch (evt.getKeyCode())
+ {
+ case KeyEvent.VK_ESCAPE: // escape key
+ mainFrame.dispose();
+ break;
+ case KeyEvent.VK_ENTER: // enter key
+ if (btn_view.isEnabled())
+ {
+ ok_ActionPerformed();
+ }
+ break;
+ case KeyEvent.VK_TAB: // tab key
+ if (evt.isShiftDown())
+ {
+ pnl_filter.requestFocus();
+ }
+ else
+ {
+ btn_view.requestFocus();
+ }
+ evt.consume();
+ break;
+ default:
+ return;
+ }
+ }
+ });
+ tbl_local_pdb.setAutoCreateRowSorter(true);
+ tbl_local_pdb.getTableHeader().setReorderingAllowed(false);
+ tbl_local_pdb.addMouseListener(new MouseAdapter()
+ {
+ @Override
+ public void mouseClicked(MouseEvent e)
+ {
+ validateSelections();
+ }
+
+ @Override
+ public void mouseReleased(MouseEvent e)
+ {
+ validateSelections();
+ }
+ });
+ tbl_local_pdb.addKeyListener(new KeyAdapter()
{
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ validateSelections();
+ switch (evt.getKeyCode())
+ {
+ case KeyEvent.VK_ESCAPE: // escape key
+ mainFrame.dispose();
+ break;
+ case KeyEvent.VK_ENTER: // enter key
+ if (btn_view.isEnabled())
+ {
+ ok_ActionPerformed();
+ }
+ break;
+ case KeyEvent.VK_TAB: // tab key
+ if (evt.isShiftDown())
+ {
+ cmb_filterOption.requestFocus();
+ }
+ else
+ {
+ if (btn_view.isEnabled())
+ {
+ btn_view.requestFocus();
+ }
+ else
+ {
+ btn_cancel.requestFocus();
+ }
+ }
+ evt.consume();
+ default:
+ return;
+ }
+ }
+ });
+ btn_view.setFont(new java.awt.Font("Verdana", 0, 12));
+ btn_view.setText(MessageManager.getString("action.view"));
+ btn_view.addActionListener(new java.awt.event.ActionListener()
+ {
+ @Override
public void actionPerformed(ActionEvent e)
{
ok_ActionPerformed();
}
});
- cancel.setFont(new java.awt.Font("Verdana", 0, 12));
- cancel.setText(MessageManager.getString("action.cancel"));
- cancel.addActionListener(new java.awt.event.ActionListener()
+ btn_view.addKeyListener(new KeyAdapter()
{
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ if (evt.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ ok_ActionPerformed();
+ }
+ }
+ });
+
+ btn_cancel.setFont(new java.awt.Font("Verdana", 0, 12));
+ btn_cancel.setText(MessageManager.getString("action.cancel"));
+ btn_cancel.addActionListener(new java.awt.event.ActionListener()
+ {
+ @Override
public void actionPerformed(ActionEvent e)
{
mainFrame.dispose();
}
});
+ btn_cancel.addKeyListener(new KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ if (evt.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ mainFrame.dispose();
+ }
+ }
+ });
- pdbFromFile.setFont(new java.awt.Font("Verdana", 0, 12));
- pdbFromFile.setText(" Select PDB File ");
- pdbFromFile.addActionListener(new java.awt.event.ActionListener()
+ btn_pdbFromFile.setFont(new java.awt.Font("Verdana", 0, 12));
+ String btn_title = MessageManager.getString("label.select_pdb_file");
+ btn_pdbFromFile.setText(btn_title + " ");
+ btn_pdbFromFile.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
pdbFromFile_actionPerformed();
}
});
+ btn_pdbFromFile.addKeyListener(new KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent evt)
+ {
+ if (evt.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ pdbFromFile_actionPerformed();
+ }
+ }
+ });
- jListFoundStructures
- .setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
- jListFoundStructures.setLayoutOrientation(JList.VERTICAL);
- jListFoundStructures.setVisibleRowCount(-1);
- foundStructuresScroller.setPreferredSize(new Dimension(500, 300));
- foundStructuresScroller
+ scrl_foundStructures.setPreferredSize(new Dimension(500, 300));
+ scrl_foundStructures
.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- filterOptionsComboBox.setFont(new java.awt.Font("Verdana", 0, 12));
- invertFilter.setFont(new java.awt.Font("Verdana", 0, 12));
- rememberSettings.setFont(new java.awt.Font("Verdana", 0, 12));
-
- filterOptionsComboBox.addItemListener(this);
- invertFilter.addItemListener(this);
-
- actionPanel.add(rememberSettings);
- actionPanel.add(ok);
- actionPanel.add(cancel);
-
+ scrl_localPDB.setPreferredSize(new Dimension(500, 300));
+ scrl_localPDB
+ .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
- filterPanel.add(resultLabel);
- filterPanel.add(filterOptionsComboBox);
- loadingImageLabel.setVisible(false);
+ cmb_filterOption.setFont(new java.awt.Font("Verdana", 0, 12));
+ chk_invertFilter.setFont(new java.awt.Font("Verdana", 0, 12));
+ chk_rememberSettings.setFont(new java.awt.Font("Verdana", 0, 12));
+ chk_rememberSettings.setVisible(false);
- filterPanel.add(loadingImageLabel);
+ txt_search.setToolTipText(MessageManager
+ .getString("label.enter_pdb_id"));
+ cmb_filterOption.setToolTipText(MessageManager
+ .getString("info.select_filter_option"));
+ txt_search.getDocument().addDocumentListener(new DocumentListener()
+ {
+ @Override
+ public void insertUpdate(DocumentEvent e)
+ {
+ txt_search_ActionPerformed();
+ }
- filterPanel.add(invertFilter);
+ @Override
+ public void removeUpdate(DocumentEvent e)
+ {
+ txt_search_ActionPerformed();
+ }
- idInputPanel.setLayout(new FlowLayout());
- idInputPanel.add(search);
+ @Override
+ public void changedUpdate(DocumentEvent e)
+ {
+ txt_search_ActionPerformed();
+ }
+ });
+ cmb_filterOption.addItemListener(this);
+ chk_invertFilter.addItemListener(this);
+
+ pnl_actions.add(chk_rememberSettings);
+ pnl_actions.add(btn_view);
+ pnl_actions.add(btn_cancel);
+
+ // pnl_filter.add(lbl_result);
+ pnl_main.add(cmb_filterOption);
+ pnl_main.add(lbl_loading);
+ pnl_main.add(chk_invertFilter);
+ lbl_loading.setVisible(false);
+
+ pnl_fileChooser.add(btn_pdbFromFile);
+ pnl_fileChooser.add(lbl_fromFileStatus);
+ pnl_fileChooserBL.add(fileChooserAssSeqPanel, BorderLayout.NORTH);
+ pnl_fileChooserBL.add(pnl_fileChooser, BorderLayout.CENTER);
+
+ pnl_idInput.add(txt_search);
+ pnl_idInput.add(lbl_pdbManualFetchStatus);
+ pnl_idInputBL.add(idInputAssSeqPanel, BorderLayout.NORTH);
+ pnl_idInputBL.add(pnl_idInput, BorderLayout.CENTER);
+
+ final String foundStructureSummary = MessageManager
+ .getString("label.found_structures_summary");
+ final String configureCols = MessageManager
+ .getString("label.configure_displayed_columns");
+ ChangeListener changeListener = new ChangeListener()
+ {
+ @Override
+ public void stateChanged(ChangeEvent changeEvent)
+ {
+ JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent
+ .getSource();
+ int index = sourceTabbedPane.getSelectedIndex();
+ if (sourceTabbedPane.getTitleAt(index).equals(configureCols))
+ {
+ btn_view.setEnabled(false);
+ btn_cancel.setEnabled(false);
+ previousWantedFields = PDBDocFieldPreferences
+ .getStructureSummaryFields().toArray(
+ new PDBRestClient.PDBDocField[0]);
+ }
+ if (sourceTabbedPane.getTitleAt(index)
+ .equals(foundStructureSummary))
+ {
+ btn_cancel.setEnabled(true);
+ if (wantedFieldsUpdated())
+ {
+ tabRefresh();
+ }
+ else
+ {
+ validateSelections();
+ }
+ }
+ }
+ };
+ pnl_filter.addChangeListener(changeListener);
+ pnl_filter.setPreferredSize(new Dimension(500, 300));
+ pnl_filter.add(foundStructureSummary, scrl_foundStructures);
+ pnl_filter.add(configureCols, pdbDocFieldPrefs);
- fileChooserPanel.setLayout(new FlowLayout());
- fileChooserPanel.add(pdbFromFile);
+ pnl_locPDB.add(scrl_localPDB);
- switchableViewsPanel.add(fileChooserPanel, VIEWS_FROM_FILE);
- switchableViewsPanel.add(idInputPanel, VIEWS_ENTER_ID);
- switchableViewsPanel.add(foundStructuresScroller, VIEWS_FILTER);
+ pnl_switchableViews.add(pnl_fileChooserBL, VIEWS_FROM_FILE);
+ pnl_switchableViews.add(pnl_idInputBL, VIEWS_ENTER_ID);
+ pnl_switchableViews.add(pnl_filter, VIEWS_FILTER);
+ pnl_switchableViews.add(pnl_locPDB, VIEWS_LOCAL_PDB);
-
this.setLayout(mainLayout);
- this.add(filterPanel, java.awt.BorderLayout.NORTH);
- this.add(switchableViewsPanel, java.awt.BorderLayout.CENTER);
- this.add(actionPanel, java.awt.BorderLayout.SOUTH);
+ this.add(pnl_main, java.awt.BorderLayout.NORTH);
+ this.add(pnl_switchableViews, java.awt.BorderLayout.CENTER);
+ // this.add(pnl_actions, java.awt.BorderLayout.SOUTH);
+ statusPanel.setLayout(new GridLayout());
+ pnl_actionsAndStatus.add(pnl_actions, BorderLayout.CENTER);
+ pnl_actionsAndStatus.add(statusPanel, BorderLayout.SOUTH);
+ statusPanel.add(statusBar, null);
+ this.add(pnl_actionsAndStatus, java.awt.BorderLayout.SOUTH);
mainFrame.setVisible(true);
mainFrame.setContentPane(this);
@@ -191,24 +512,35 @@ public abstract class GStructureChooser extends JPanel implements
Desktop.addInternalFrame(mainFrame, frameTitle, 800, 400);
}
-
- private ImageIcon scaleImageIcone(ImageIcon imageIcon, int width, int height)
+ public boolean wantedFieldsUpdated()
{
- Image image = imageIcon.getImage(); // transform it
+ if (previousWantedFields == null)
+ {
+ return true;
+ }
- Image newimg = image.getScaledInstance(width, height,
- java.awt.Image.SCALE_SMOOTH); // scale it the smooth way
+ return Arrays.equals(PDBDocFieldPreferences.getStructureSummaryFields()
+ .toArray(new PDBRestClient.PDBDocField[0]),
+ previousWantedFields) ? false : true;
- return new ImageIcon(newimg);
}
-
+
@Override
+ /**
+ * Event listener for the 'filter' combo-box and 'invert' check-box
+ */
public void itemStateChanged(ItemEvent e)
{
stateChanged(e);
}
- public class FilterOptions
+ /**
+ * This inner class provides the data model for the structure filter combo-box
+ *
+ * @author tcnofoegbu
+ *
+ */
+ public class FilterOption
{
private String name;
@@ -216,20 +548,13 @@ public abstract class GStructureChooser extends JPanel implements
private String view;
- public FilterOptions(String name, String value, String view)
+ public FilterOption(String name, String value, String view)
{
this.name = name;
this.value = value;
this.view = view;
}
- // public FilterOptions(PDBDocField field, String view)
- // {
- // this.name = "Best " + field.getName();
- // this.value = field.getCode();
- // this.view = view;
- // }
-
public String getName()
{
return name;
@@ -260,19 +585,139 @@ public abstract class GStructureChooser extends JPanel implements
this.view = view;
}
+ @Override
public String toString()
{
return this.name;
}
}
+ /**
+ * 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 cmb_assSeq = new JComboBox();
+
+ 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 getCmb_assSeq()
+ {
+ return cmb_assSeq;
+ }
+
+ public void setCmb_assSeq(JComboBox cmb_assSeq)
+ {
+ this.cmb_assSeq = cmb_assSeq;
+ }
+
+ @Override
+ public void itemStateChanged(ItemEvent e)
+ {
+ if (e.getStateChange() == ItemEvent.SELECTED)
+ {
+ cmbAssSeqStateChanged();
+ }
+ }
+ }
+
+ public JComboBox getCmbFilterOption()
+ {
+ return cmb_filterOption;
+ }
+
protected abstract void stateChanged(ItemEvent e);
protected abstract void updateCurrentView();
- protected abstract void ok_ActionPerformed();
+ protected abstract void populateFilterComboBox();
- protected abstract void populateFilterOptions();
+ protected abstract void ok_ActionPerformed();
protected abstract void pdbFromFile_actionPerformed();
+
+ protected abstract void txt_search_ActionPerformed();
+
+ public abstract void populateCmbAssociateSeqOptions(
+ JComboBox cmb_assSeq, JLabel lbl_associateSeq);
+
+ public abstract void cmbAssSeqStateChanged();
+
+ public abstract void tabRefresh();
+
+ public abstract void validateSelections();
}