-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix problem with creation dialog blocking table command task.
- Loading branch information
1 parent
b82836f
commit 3769c35
Showing
2 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...main/java/org/baderlab/csplugins/enrichmentmap/actions/OpenEnrichmentMapPanelsAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.baderlab.csplugins.enrichmentmap.actions; | ||
|
||
import java.awt.event.ActionEvent; | ||
|
||
import org.baderlab.csplugins.enrichmentmap.view.control.ControlPanelMediator; | ||
import org.baderlab.csplugins.enrichmentmap.view.heatmap.HeatMapMediator; | ||
import org.cytoscape.application.swing.AbstractCyAction; | ||
import org.cytoscape.work.Task; | ||
import org.cytoscape.work.TaskMonitor; | ||
|
||
import com.google.inject.Inject; | ||
import com.google.inject.Provider; | ||
import com.google.inject.Singleton; | ||
|
||
@SuppressWarnings("serial") | ||
@Singleton | ||
public class OpenEnrichmentMapPanelsAction extends AbstractCyAction implements Task { | ||
|
||
public static final String NAME = "EnrichmentMap"; | ||
|
||
@Inject private Provider<ControlPanelMediator> controlPanelMediatorProvider; | ||
@Inject private Provider<HeatMapMediator> heatMapMediatorProvider; | ||
|
||
public OpenEnrichmentMapPanelsAction() { | ||
super(NAME); | ||
setPreferredMenu("Apps"); | ||
} | ||
|
||
public synchronized void showPanels() { | ||
controlPanelMediatorProvider.get().showControlPanel(); | ||
heatMapMediatorProvider.get().showHeatMapPanel(); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
showPanels(); | ||
} | ||
|
||
@Override | ||
public void run(TaskMonitor taskMonitor) { | ||
showPanels(); | ||
} | ||
|
||
@Override | ||
public void cancel() { | ||
} | ||
} |