Desktop.instance.removeJalviewPropertyChangeListener("services",
thisListener);
closeMenuItem_actionPerformed(true);
-- };
++ }
});
// Finally, build the menu once to get current service state
new Thread(new Runnable()
{
overview.dispose();
alignPanel.setOverviewPanel(null);
-- };
++ }
});
if (getKeyListeners().length > 0)
{
trimrs.setSelected(trimrs.isSelected());
Cache.setProperty(DBRefFetcher.TRIM_RETRIEVED_SEQUENCES,
Boolean.valueOf(trimrs.isSelected()).toString());
-- };
++ }
});
rfetch.add(trimrs);
JMenuItem fetchr = new JMenuItem(
chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle(MessageManager.getString("label.load_vcf_file"));
chooser.setToolTipText(MessageManager.getString("label.load_vcf_file"));
-
- int value = chooser.showOpenDialog(null);
-
- if (value == JalviewFileChooser.APPROVE_OPTION)
+ final AlignFrame us = this;
+ chooser.setResponseHandler(0, new Runnable()
{
- String choice = chooser.getSelectedFile().getPath();
- Cache.setProperty("LAST_DIRECTORY", choice);
- SequenceI[] seqs = viewport.getAlignment().getSequencesArray();
- new VCFLoader(choice).loadVCF(seqs, this);
- }
+ @Override
+ public void run()
+ {
+ String choice = chooser.getSelectedFile().getPath();
+ Cache.setProperty("LAST_DIRECTORY", choice);
+ SequenceI[] seqs = viewport.getAlignment().getSequencesArray();
+ new VCFLoader(choice).loadVCF(seqs, us);
- };
++ }
+ });
+ chooser.showOpenDialog(null);
}
+
}
class PrintThread extends Thread
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
--import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
/**
mouseDragging = false;
ap.getSeqPanel().stopScrolling();
+ // todo res calculation should be a method on AlignViewport
int xCords = Math.max(0, evt.getX()); // prevent negative X coordinates
+ ViewportRanges ranges = av.getRanges();
int res = (xCords / av.getCharWidth())
- + av.getRanges().getStartRes();
-
+ + ranges.getStartRes();
+ res = Math.min(res, ranges.getEndRes());
if (av.hasHiddenColumns())
{
res = av.getAlignment().getHiddenColumns()