use of org.baderlab.csplugins.enrichmentmap.task.FilterNodesEdgesTask.FilterMode in project EnrichmentMapApp by BaderLab.
the class ControlPanelMediator method getOptionsMenu.
private JPopupMenu getOptionsMenu() {
final JPopupMenu menu = new JPopupMenu();
{
final JMenuItem mi = new JCheckBoxMenuItem("Show Legend");
mi.addActionListener(evt -> {
if (legendPanelMediatorProvider.get().getDialog().isVisible()) {
legendPanelMediatorProvider.get().hideDialog();
} else {
CyNetworkView netView = getCurrentEMView();
EMViewControlPanel viewPanel = getControlPanel().getViewControlPanel(netView);
legendPanelMediatorProvider.get().showDialog(createStyleOptions(netView), getFilteredDataSets(viewPanel));
}
});
mi.setSelected(legendPanelMediatorProvider.get().getDialog().isVisible());
menu.add(mi);
}
menu.addSeparator();
for (FilterMode mode : FilterMode.values()) {
final JMenuItem mi = new JCheckBoxMenuItem(mode.toString());
mi.addActionListener(evt -> setFilterMode(mode));
mi.setSelected(filterMode == mode);
menu.add(mi);
}
return menu;
}
Aggregations