All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.noos.xing.mydoggy.plaf.actions.ToolsMenuToolWindowAction Maven / Gradle / Ivy

The newest version!
package org.noos.xing.mydoggy.plaf.actions;

import org.noos.xing.mydoggy.DockedTypeDescriptor;
import org.noos.xing.mydoggy.ToolWindowAction;

import javax.swing.*;
import java.awt.event.ActionEvent;

/**
 * @author Angelo De Caro ([email protected])
 */
public class ToolsMenuToolWindowAction extends ToolWindowAction implements PlafToolWindowAction {


    public ToolsMenuToolWindowAction() {
        super(TOOLS_MENU_ACTION_ID);
    }


    public void actionPerformed(ActionEvent e) {
    }

    public JMenuItem getMenuItem() {
        JMenu toolsMenu = toolWindow.getTypeDescriptor(DockedTypeDescriptor.class).getToolsMenu();

        return toolsMenu != null && toolsMenu.getMenuComponentCount() > 0 ? toolsMenu : null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy