label.graduated_color_for_params = Graduated Feature Colour for {0}
label.select_backgroud_colour = Select Background Colour
label.invalid_font = Invalid Font
-label.separate_multiple_accession_ids = Separate multiple PDB accession ids with semi colon ";"
-label.separate_multiple_query_values = Separate multiple query values with semi colon ";"
+label.separate_multiple_accession_ids = Enter one or more PDB Ids
+label.separate_multiple_query_values = Enter one or more {0}s separated by a semi-colon ";"
+label.search_all = Enter one or more search values separated by a semi-colon ";" (Note: This Searches the entire PDB database)
label.replace_commas_semicolons = Replace commas with semi-colons
label.parsing_failed_syntax_errors_shown_below_param = Parsing failed. Syntax errors shown below {0}
label.parsing_failed_unrecoverable_exception_thrown_param = \nParsing failed. An unrecoverable exception was thrown\:\n {0}
public void transferToSequenceFetcher(String ids)
{
- mainFrame.dispose();
+ // mainFrame.dispose();
seqFetcher.textArea.setText(ids);
Thread worker = new Thread(seqFetcher);
worker.start();
*/
public void loadSelectedPDBSequencesToAlignment()
{
- mainFrame.dispose();
+ // mainFrame.dispose();
StringBuilder selectedIds = new StringBuilder();
HashSet<String> selectedIdsSet = new HashSet<String>();
int pdbIdCol = PDBRestClient.getPDBIdColumIndex(wantedFields, false);
package jalview.jbgui;
import jalview.gui.Desktop;
+import jalview.gui.JvSwingUtils;
import jalview.jbgui.PDBDocFieldPreferences.PreferenceSource;
import jalview.util.MessageManager;
import jalview.ws.dbsources.PDBRestClient.PDBDocField;
{
public void mouseClicked(MouseEvent e)
{
- if (tbl_summary.getSelectedRows().length > 0)
- {
- btn_ok.setEnabled(true);
- }
- else
- {
- btn_ok.setEnabled(false);
- }
+ validateSelection();
+ }
+ public void mouseReleased(MouseEvent e)
+ {
+ validateSelection();
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- txt_search.setToolTipText(MessageManager
- .getString("label.separate_multiple_query_values"));
- if ("pdb id".equalsIgnoreCase(getCmbSearchTarget()
+ String tooltipText;
+ if ("all".equalsIgnoreCase(getCmbSearchTarget().getSelectedItem()
+ .toString()))
+ {
+ tooltipText = MessageManager.getString("label.search_all");
+ }
+ else if ("pdb id".equalsIgnoreCase(getCmbSearchTarget()
.getSelectedItem().toString()))
{
- txt_search.setToolTipText(MessageManager
- .getString("label.separate_multiple_accession_ids"));
+ tooltipText = MessageManager
+ .getString("label.separate_multiple_accession_ids");
}
+ else
+ {
+ tooltipText = MessageManager.formatMessage(
+ "label.separate_multiple_query_values", new Object[]
+ { getCmbSearchTarget().getSelectedItem().toString() });
+ }
+ txt_search.setToolTipText(JvSwingUtils.wrapTooltip(true,
+ tooltipText));
txt_search_ActionPerformed();
}
});
Desktop.addInternalFrame(mainFrame, frameTitle, 800, 400);
}
+ public void validateSelection()
+ {
+ if (tbl_summary.getSelectedRows().length > 0)
+ {
+ btn_ok.setEnabled(true);
+ }
+ else
+ {
+ btn_ok.setEnabled(false);
+ }
+ }
public JComboBox<PDBDocField> getCmbSearchTarget()
{
return cmb_searchTarget;