+ JPanel actionPanel = new JPanel();
+ actionPanel.add(backBtn);
+ actionPanel.add(exampleBtn);
+ actionPanel.add(clear);
+ actionPanel.add(okBtn);
+ actionPanel.add(closeBtn);
+
+ JPanel databasePanel = new JPanel();
+ databasePanel.setLayout(new BorderLayout());
+ databasePanel.add(database, BorderLayout.NORTH);
+ databasePanel.add(exampleAccession, BorderLayout.CENTER);
+ JPanel jPanel2a = new JPanel(new BorderLayout());
+ jPanel2a.add(jLabel1, BorderLayout.NORTH);
+ jPanel2a.add(replacePunctuation, BorderLayout.SOUTH);
+ databasePanel.add(jPanel2a, BorderLayout.SOUTH);
+
+ JPanel idsPanel = new JPanel();
+ idsPanel.setLayout(new BorderLayout(0, 5));
+ JScrollPane jScrollPane1 = new JScrollPane();
+ jScrollPane1.getViewport().add(textArea);
+ idsPanel.add(jScrollPane1, BorderLayout.CENTER);
+
+ this.add(actionPanel, BorderLayout.SOUTH);
+ this.add(idsPanel, BorderLayout.CENTER);
+ this.add(databasePanel, BorderLayout.NORTH);
+ }
+
+ /**
+ * Answers a semi-colon-delimited string with the example query or queries for
+ * the selected database
+ *
+ * @param db
+ * @return
+ */
+ protected String getExampleQueries(String db)
+ {
+ StringBuilder sb = new StringBuilder();
+ HashSet<String> hs = new HashSet<>();
+ for (DbSourceProxy dbs : sfetch.getSourceProxy(db))
+ {
+ String tq = dbs.getTestQuery();
+ if (hs.add(tq)) // not a duplicate source