jc.validate();
// j.setPreferredSize(new Dimension(300,50));
add(jc, BorderLayout.CENTER);
+ ok.setEnabled(false);
j.add(ok);
j.add(cancel);
add(j, BorderLayout.SOUTH);
{
return;
}
+ ok.setEnabled(false);
if (dbviews.getSelectionCount() == 0)
{
selection = null;
}
+
tsel = dbviews.getSelectionPaths();
boolean forcedFirstChild = false;
List<DbSourceProxy> srcs = new ArrayList<DbSourceProxy>();
.getLastPathComponent();
if (dmt.getUserObject() != null)
{
+ /*
+ * enable OK button once a selection has been made
+ */
+ ok.setEnabled(true);
if (dmt.getUserObject() instanceof DbSourceProxy)
{
srcs.add((DbSourceProxy) dmt.getUserObject());
}
}
+ dbstatex.setText(" ");
if (allowMultiSelections)
{
dbstatus.setText(MessageManager.formatMessage(
(srcs.size() == 1 ? "" : "s"),
(srcs.size() > 0 ? " with " + x + " test quer"
+ (x == 1 ? "y" : "ies") : ".") }));
- dbstatex.setText(" ");
}
else
{
dbstatex.setText(MessageManager.formatMessage(
"label.example_param", new String[] { qr }));
}
- else
- {
- dbstatex.setText(" ");
- }
}
else
{
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);
}
}
{
debounceTrap++;
String currentSelection = database.getSelectedItem();
+ if (currentSelection == null)
+ {
+ close_actionPerformed(null);
+ }
+
+ showPanel();
if (currentSelection.equalsIgnoreCase("pdb")
&& (database.action == KeyEvent.VK_ENTER || ((debounceTrap % 2) == 0)))
{
this.progressIndicator = progressIndicator;
}
+
+ /**
+ * Make this panel visible (after a selection has been made in the database
+ * chooser)
+ */
+ void showPanel()
+ {
+ frame.setVisible(true);
+ }
}