@Override
protected void loadVcf_actionPerformed()
{
- // TODO: JAL-3048 - No VCF support in JsJalview
JalviewFileChooser chooser = new JalviewFileChooser(
Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle(MessageManager.getString("label.load_vcf_file"));
chooser.setToolTipText(MessageManager.getString("label.load_vcf_file"));
+ final AlignFrame us = this;
+ chooser.response(new RunResponse(JalviewFileChooser.APPROVE_OPTION)
+ {
+ @Override
+ public void run()
+ {
- int value = chooser.showOpenDialog(null);
+ {
+ String choice = chooser.getSelectedFile().getPath();
+ Cache.setProperty("LAST_DIRECTORY", choice);
+ SequenceI[] seqs = viewport.getAlignment().getSequencesArray();
+ new VCFLoader(choice).loadVCF(seqs, us);
+ }
- if (value == JalviewFileChooser.APPROVE_OPTION)
- {
- String choice = chooser.getSelectedFile().getPath();
- Cache.setProperty("LAST_DIRECTORY", choice);
- SequenceI[] seqs = viewport.getAlignment().getSequencesArray();
- new VCFLoader(choice).loadVCF(seqs, this);
- }
+ };
+ }).openDialog(null);
}