label.standard_databases = Standard Databases
label.fetch_embl_uniprot = Fetch from EMBL/EMBLCDS or Uniprot/PDB and any selected DAS sources
label.fetch_uniprot_references = Fetch Uniprot references
-label.search_3dbeacons = Find models with 3D-Beacons
+label.search_3dbeacons = 3D-Beacons Search
+label.find_models_from_3dbeacons = Search 3D-Beacons for 3D structures and models
label.3dbeacons = 3D-Beacons
label.fetch_references_for = Fetch database references for {0} sequences ?
label.fetch_references_for_3dbeacons = 3D Beacons needs Uniprot References. Fetch database references for {0} sequences ?
{
private static final String AUTOSUPERIMPOSE = "AUTOSUPERIMPOSE";
- /**
- * transient combo box choice for initiating 3db fetch
- */
- private static final String VIEWS_QUERYING_TDB = "QUERY_3DB";
-
private SequenceI selectedSequence;
private SequenceI[] selectedSequences;
}
chk_superpose.setSelected(Cache.getDefault(AUTOSUPERIMPOSE, true));
+ btn_queryTDB.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ promptForTDBFetch();
+ }
+ });
Executors.defaultThreadFactory().newThread(new Runnable()
{
@Override
public void run()
{
- progressBar.setProgressBar("status.searching_3d_beacons", progressId);
+ mainFrame.setEnabled(false);
+ cmb_filterOption.setEnabled(false);
+ progressBar.setProgressBar(MessageManager.getString("status.searching_3d_beacons"), progressId);
// TODO: warn if no accessions discovered
populateSeqsWithoutSourceDBRef();
// redo initial discovery - this time with 3d beacons
initialStructureDiscovery();
if (!isStructuresDiscovered())
{
- progressBar.setProgressBar("status.no_structures_discovered_from_3d_beacons", progressId);
+ progressBar.setProgressBar(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"), progressId);
+ btn_queryTDB.setToolTipText(MessageManager.getString("status.no_structures_discovered_from_3d_beacons"));
+ btn_queryTDB.setEnabled(false);
} else {
+ btn_queryTDB.setVisible(false);
progressBar.setProgressBar(null, progressId);
}
+ mainFrame.setEnabled(true);
+ cmb_filterOption.setEnabled(true);
}
};
"-", VIEWS_FROM_FILE, false, null));
if (canQueryTDB && notQueriedTDBYet)
{
- FilterOption queryTDBOption = new FilterOption(
- MessageManager.getString("label.search_3dbeacons"), "-",
- VIEWS_QUERYING_TDB, false, null);
- cmb_filterOption.addItem(queryTDBOption);
+ btn_queryTDB.setVisible(true);
}
if (cachedPDBExist)
FilterOption selectedFilterOpt = ((FilterOption) cmb_filterOption
.getSelectedItem());
- // first check if we need to rebuild dialog
- if (selectedFilterOpt.getView() == VIEWS_QUERYING_TDB)
- {
- promptForTDBFetch();
- return;
- }
if (lastSelected == selectedFilterOpt)
{
// don't need to do anything, probably
import javax.swing.JTextField;
import javax.swing.ListCellRenderer;
import javax.swing.Timer;
+import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
protected JButton btn_newView;
protected JButton btn_pdbFromFile = new JButton();
+
+ protected JButton btn_queryTDB = new JButton();
protected JCheckBox chk_superpose = new JCheckBox(
MessageManager.getString("label.superpose_structures"));
protected ImageIcon warningImage = new ImageIcon(
getClass().getResource("/images/warning.gif"));
+ protected ImageIcon tdbImage = new ImageIcon(
+ getClass().getResource("/images/3d-beacons-logo-transparent.png"));
+
protected JLabel lbl_loading = new JLabel(loadingImage);
protected JLabel lbl_pdbManualFetchStatus = new JLabel(errorImage);
});
chk_invertFilter.addItemListener(this);
+ btn_queryTDB.setFont(VERDANA_12);
+ //btn_queryTDB.setPreferredSize(new Dimension(200,22));
+ btn_queryTDB.setText(MessageManager.getString("label.search_3dbeacons"));
+ btn_queryTDB.setToolTipText(MessageManager.getString("label.find_models_from_3dbeacons"));
+ btn_queryTDB.setIcon(tdbImage);
+ btn_queryTDB.setVisible(false);
targetView.setVisible(false);
actionsPanel.add(btn_newView);
actionsPanel.add(btn_cancel, "right");
- JPanel pnl_main = new JPanel();
- pnl_main.add(cmb_filterOption);
- pnl_main.add(lbl_loading);
- pnl_main.add(chk_invertFilter);
+ JPanel pnl_main = new JPanel(new BorderLayout());
+ JPanel pnl_controls = new JPanel();
+ pnl_main.add(btn_queryTDB,BorderLayout.NORTH);
+ pnl_controls.add(cmb_filterOption);
+ pnl_controls.add(lbl_loading);
+ pnl_controls.add(chk_invertFilter);
+ pnl_main.add(pnl_controls,BorderLayout.CENTER);
lbl_loading.setVisible(false);
JPanel pnl_fileChooser = new JPanel(new FlowLayout());