Search in sources :

Example 1 with RemoveVisualMappingsTask

use of org.cytoscape.view.vizmap.gui.internal.task.RemoveVisualMappingsTask in project cytoscape-impl by cytoscape.

the class RemoveVisualMappingsCommand method execute.

@Override
@SuppressWarnings("unchecked")
public void execute(final INotification notification) {
    final Set<VisualMappingFunction<?, ?>> set = (Set<VisualMappingFunction<?, ?>>) notification.getBody();
    final VizMapperProxy proxy = (VizMapperProxy) getFacade().retrieveProxy(VizMapperProxy.NAME);
    final VisualStyle style = proxy.getCurrentVisualStyle();
    final TaskIterator iterator = new TaskIterator(new RemoveVisualMappingsTask(set, style, servicesUtil));
    final DialogTaskManager taskManager = servicesUtil.get(DialogTaskManager.class);
    taskManager.execute(iterator);
}
Also used : VizMapperProxy(org.cytoscape.view.vizmap.gui.internal.model.VizMapperProxy) Set(java.util.Set) TaskIterator(org.cytoscape.work.TaskIterator) VisualMappingFunction(org.cytoscape.view.vizmap.VisualMappingFunction) VisualStyle(org.cytoscape.view.vizmap.VisualStyle) RemoveVisualMappingsTask(org.cytoscape.view.vizmap.gui.internal.task.RemoveVisualMappingsTask) DialogTaskManager(org.cytoscape.work.swing.DialogTaskManager)

Aggregations

Set (java.util.Set)1 VisualMappingFunction (org.cytoscape.view.vizmap.VisualMappingFunction)1 VisualStyle (org.cytoscape.view.vizmap.VisualStyle)1 VizMapperProxy (org.cytoscape.view.vizmap.gui.internal.model.VizMapperProxy)1 RemoveVisualMappingsTask (org.cytoscape.view.vizmap.gui.internal.task.RemoveVisualMappingsTask)1 TaskIterator (org.cytoscape.work.TaskIterator)1 DialogTaskManager (org.cytoscape.work.swing.DialogTaskManager)1