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 accession ids with semi colon ";"
+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.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}
mainFrame.dispose();
}
+ public void transferToSequenceFetcher(String ids)
+ {
+ mainFrame.dispose();
+ seqFetcher.textArea.setText(ids);
+ Thread worker = new Thread(seqFetcher);
+ worker.start();
+ }
+
/**
* Add the discovered/selected sequences to a target alignment window
*/
}
String ids = selectedIds.toString();
- System.out.println(">>>>>>>>>>>>>>>> selected Ids: " + ids);
+ // System.out.println(">>>>>>>>>>>>>>>> selected Ids: " + ids);
seqFetcher.textArea.setText(ids);
Thread worker = new Thread(seqFetcher);
worker.start();
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@Override
public void actionPerformed(ActionEvent e)
{
+ txt_search.setToolTipText(MessageManager
+ .getString("label.separate_multiple_query_values"));
+ if ("pdb id".equalsIgnoreCase(getCmbSearchTarget()
+ .getSelectedItem().toString()))
+ {
+ txt_search.setToolTipText(MessageManager
+ .getString("label.separate_multiple_accession_ids"));
+ }
txt_search_ActionPerformed();
}
});
populateCmbSearchTargetOptions();
- txt_search.setToolTipText(MessageManager
- .getString("label.separate_multiple_accession_ids"));
+
+
txt_search.setFont(new java.awt.Font("Verdana", 0, 12));
+
+ txt_search.addKeyListener(new KeyAdapter()
+ {
+ @Override
+ public void keyPressed(KeyEvent e)
+ {
+ if (e.getKeyCode() == KeyEvent.VK_ENTER)
+ {
+ if (txt_search.getText() == null
+ || txt_search.getText().isEmpty())
+ {
+ return;
+ }
+ if ("pdb id".equalsIgnoreCase(getCmbSearchTarget()
+ .getSelectedItem().toString()))
+ {
+ transferToSequenceFetcher(txt_search.getText());
+ }
+ }
+ }
+ });
+
txt_search.getDocument().addDocumentListener(new DocumentListener()
{
@Override
return mainFrame;
}
+ public abstract void transferToSequenceFetcher(String ids);
+
public abstract void txt_search_ActionPerformed();
public abstract void btn_ok_ActionPerformed();