use of org.gephi.desktop.io.export.spi.ExporterClassUI in project gephi by gephi.
the class Export method getMenuPresenter.
@Override
public JMenuItem getMenuPresenter() {
for (final ExporterClassUI ui : Lookup.getDefault().lookupAll(ExporterClassUI.class)) {
String menuName = ui.getName();
JMenuItem menuItem = new JMenuItem(new AbstractAction(menuName) {
@Override
public void actionPerformed(ActionEvent e) {
ui.action();
}
});
menu.add(menuItem);
menuItem.setEnabled(ui.isEnable());
}
return menu;
}
Aggregations