- dbeg.setFont(new java.awt.Font("Verdana", Font.BOLD, 11));
- jLabel1.setFont(new java.awt.Font("Verdana", Font.ITALIC, 11));
- jLabel1.setHorizontalAlignment(SwingConstants.CENTER);
- jLabel1.setText(MessageManager
+ StringPair instructionItem = new StringPair(
+ MessageManager.getString("action.select_ddbb"));
+ database.setPrototypeDisplayValue(instructionItem);
+ String[] sources = new jalview.ws.SequenceFetcher().getSupportedDb();
+ Arrays.sort(sources, String.CASE_INSENSITIVE_ORDER);
+ database.addItem(instructionItem);
+ for (String source : sources)
+ {
+ List<DbSourceProxy> slist = sfetch.getSourceProxy(source);
+ if (slist.size() == 1 && slist.get(0) != null)
+ {
+ database.addItem(new StringPair(source, slist.get(0).getDbName()));
+ }
+ else
+ {
+ database.addItem(new StringPair(source));
+ }
+ }
+ setDatabaseSelectedItem(selectedDb);
+ if (database.getSelectedIndex() == -1)
+ {
+ database.setSelectedIndex(0);
+ }
+ database.setMaximumRowCount(database.getItemCount());
+ database.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ String currentSelection = ((StringPair) database.getSelectedItem())
+ .getKey();
+ updateExampleQuery(currentSelection);
+
+ if ("pdb".equalsIgnoreCase(currentSelection))
+ {
+ frame.dispose();
+ new PDBFTSPanel(SequenceFetcher.this);
+ }
+ else if ("uniprot".equalsIgnoreCase(currentSelection))
+ {
+ frame.dispose();
+ new UniprotFTSPanel(SequenceFetcher.this);
+ }
+ else if ("3d-beacons".equalsIgnoreCase(currentSelection))
+ {
+ frame.dispose();
+ new TDBeaconsFTSPanel(SequenceFetcher.this);
+ }
+ else
+ {
+ otherSourceAction();
+ }
+ }
+ });
+
+ exampleAccession = new JLabel("");
+ exampleAccession.setFont(new Font("Verdana", Font.BOLD, 11));
+ JLabel jLabel1 = new JLabel(MessageManager