Package com.boxysystems.scriptmonkey.intellij.ui

Source Code of com.boxysystems.scriptmonkey.intellij.ui.ScriptShellPanelAction

package com.boxysystems.scriptmonkey.intellij.ui;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Presentation;

import javax.swing.*;

/**
* Created by IntelliJ IDEA.
* User: siddique
* Date: Dec 9, 2008
* Time: 7:58:35 PM
* To change this template use File | Settings | File Templates.
*/
public abstract class ScriptShellPanelAction extends AnAction {
    protected boolean enabled = false;

    protected ScriptShellPanelAction() {
    }

    protected ScriptShellPanelAction(String text, String description, Icon icon) {
        super(text, description, icon);
    }

    public void update(AnActionEvent actionEvent) {
        super.update(actionEvent);
        final Presentation presentation = actionEvent.getPresentation();
        presentation.setEnabled(enabled);
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public boolean isEnabled() {
        return enabled;
    }
}
TOP

Related Classes of com.boxysystems.scriptmonkey.intellij.ui.ScriptShellPanelAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.