Package net.sourceforge.ganttproject.action

Source Code of net.sourceforge.ganttproject.action.NewArtefactAction$ActiveActionProvider

package net.sourceforge.ganttproject.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Icon;

public class NewArtefactAction extends GPAction implements RolloverAction {

    private ActiveActionProvider myProvider;

    private Icon myIconOnMouseOver;

    public NewArtefactAction(ActiveActionProvider provider, String iconSize) {
        super("", iconSize);
        myProvider = provider;
    }

    public void actionPerformed(ActionEvent e) {
        AbstractAction activeAction = myProvider.getActiveAction();
        activeAction.actionPerformed(e);
    }

    public static interface ActiveActionProvider {
        public AbstractAction getActiveAction();
    }

    protected String getIconFilePrefix() {
        return "insert_";
    }

    public void isIconVisible(boolean isNull) {
        setIconVisible(isNull);
    }
}
TOP

Related Classes of net.sourceforge.ganttproject.action.NewArtefactAction$ActiveActionProvider

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.