Search in sources :

Example 1 with RemoveSignatureDataSetsTask

use of org.baderlab.csplugins.enrichmentmap.task.postanalysis.RemoveSignatureDataSetsTask in project EnrichmentMapApp by BaderLab.

the class ControlPanelMediator method removeSignatureDataSets.

private void removeSignatureDataSets(EnrichmentMap map, EMViewControlPanel viewPanel) {
    Set<EMSignatureDataSet> dataSets = viewPanel.getSelectedSignatureDataSets();
    if (!dataSets.isEmpty()) {
        if (JOptionPane.YES_OPTION != JOptionPane.showConfirmDialog(getControlPanel(), "Are you sure you want to remove the selected Signature Gene Sets\nand associated nodes?", "Remove Signature Gene Sets", JOptionPane.YES_NO_OPTION))
            return;
        RemoveSignatureDataSetsTask task = removeDataSetsTaskFactory.create(dataSets, map);
        dialogTaskManager.execute(new TaskIterator(task), new TaskObserver() {

            @Override
            public void taskFinished(ObservableTask task) {
            }

            @Override
            public void allFinished(FinishStatus finishStatus) {
                viewPanel.updateDataSetSelector();
                updateLegends(viewPanel);
                viewPanel.getNetworkView().updateView();
            }
        });
    }
}
Also used : TaskObserver(org.cytoscape.work.TaskObserver) ObservableTask(org.cytoscape.work.ObservableTask) EMSignatureDataSet(org.baderlab.csplugins.enrichmentmap.model.EMSignatureDataSet) TaskIterator(org.cytoscape.work.TaskIterator) FinishStatus(org.cytoscape.work.FinishStatus) RemoveSignatureDataSetsTask(org.baderlab.csplugins.enrichmentmap.task.postanalysis.RemoveSignatureDataSetsTask)

Aggregations

EMSignatureDataSet (org.baderlab.csplugins.enrichmentmap.model.EMSignatureDataSet)1 RemoveSignatureDataSetsTask (org.baderlab.csplugins.enrichmentmap.task.postanalysis.RemoveSignatureDataSetsTask)1 FinishStatus (org.cytoscape.work.FinishStatus)1 ObservableTask (org.cytoscape.work.ObservableTask)1 TaskIterator (org.cytoscape.work.TaskIterator)1 TaskObserver (org.cytoscape.work.TaskObserver)1