class Export extends AbstractAction implements DynamicMenuContent {


    public Export() {
        super(NbBundle.getMessage(Export.class, "CTL_Export"));
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        // does nothing, this is a popup menu
    }

    @Override
    public JComponent[] getMenuPresenters() {
        return createMenu();
    }

    @Override
    public JComponent[] synchMenuPresenters(JComponent[] items) {
        return createMenu();
    }

    private JComponent[] createMenu() {<FILL_FUNCTION_BODY>}
}

        JMenu menu = new JMenu(NbBundle.getMessage(Export.class, "CTL_Export"));
        menu.setEnabled(Lookup.getDefault().lookup(ProjectController.class).hasCurrentProject());

        // Graph and image
        menu.add(new JMenuItem(
            Actions.forID("File", "org.gephi.desktop.io.export.ExportGraph")));
        menu.add(new JMenuItem(
            Actions.forID("File", "org.gephi.desktop.io.export.ExportImage")));

        // Others
        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 new JComponent[] {menu};
    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.String, javax.swing.Icon) ,public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener) ,public java.lang.Object[] getKeys() ,public synchronized java.beans.PropertyChangeListener[] getPropertyChangeListeners() ,public java.lang.Object getValue(java.lang.String) ,public boolean isEnabled() ,public void putValue(java.lang.String, java.lang.Object) ,public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener) ,public void setEnabled(boolean) <variables>private static java.lang.Boolean RECONFIGURE_ON_NULL,private transient javax.swing.ArrayTable arrayTable,protected javax.swing.event.SwingPropertyChangeSupport changeSupport,protected boolean enabled