import jalview.io.gff.SequenceOntologyI;
import jalview.util.DBRefUtils;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import jalview.ws.dbsources.das.api.DasSourceRegistryI;
import jalview.ws.seqfetcher.DbSourceProxy;
frame = new JInternalFrame();
frame.setContentPane(this);
- if (new jalview.util.Platform().isAMac())
+ if (Platform.isAMac())
{
- Desktop.addInternalFrame(frame, getFrameTitle(), 400, 240);
+ Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 240);
}
else
{
- Desktop.addInternalFrame(frame, getFrameTitle(), 400, 180);
+ Desktop.addInternalFrame(frame, getFrameTitle(), false, 400, 180);
}
}
jPanel1.add(close);
jPanel3.add(jPanel2, java.awt.BorderLayout.CENTER);
jPanel2.setLayout(borderLayout3);
- databaseButt = database.getDatabaseSelectorButton();
+ databaseButt = /*database.getDatabaseSelectorButton();
+ final JButton viewdbs =*/new JButton(
+ MessageManager.getString("action.select_ddbb"));
+ databaseButt.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ hidePanel();
+ database.showDialog();
+ }
+ });
databaseButt.setFont(JvSwingUtils.getLabelFont());
database.addActionListener(new ActionListener()
{
{
debounceTrap++;
String currentSelection = database.getSelectedItem();
+ if (currentSelection == null)
+ {
+ close_actionPerformed(null);
+ }
+
+ showPanel();
if (currentSelection.equalsIgnoreCase("pdb")
&& (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
Cache.log.info(
"Error retrieving " + accession
+ " from " + proxy.getDbName(), e);
- } finally
- {
- return success;
}
+ return success;
}
/**
for (String q : queries)
{
- DBRefEntry[] found = null;
DBRefEntry dbr = new DBRefEntry();
dbr.setSource(proxy.getDbSource());
dbr.setVersion(null);
{
if (rs[r] != null)
{
- found = DBRefUtils.searchRefs(rs[r].getDBRefs(), accId);
- if (found != null && found.length > 0)
+ List<DBRefEntry> found = DBRefUtils.searchRefs(rs[r].getDBRefs(),
+ accId);
+ if (!found.isEmpty())
{
rfound = true;
break;
{
this.progressIndicator = progressIndicator;
}
+
+ /**
+ * Make this panel visible (after a selection has been made in the database
+ * chooser)
+ */
+ void showPanel()
+ {
+ frame.setVisible(true);
+ }
+
+ /**
+ * Hide this panel (on clicking the database button to open the database
+ * chooser)
+ */
+ void hidePanel()
+ {
+ frame.setVisible(false);
+ }
}