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

org.noos.xing.yasaf.plaf.action.ActionEnabler Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
package org.noos.xing.yasaf.plaf.action;

import org.noos.xing.yasaf.view.ViewContext;
import org.noos.xing.yasaf.view.ViewContextChangeListener;

import javax.swing.*;

/**
 * @author Angelo De Caro ([email protected])
 */
public abstract class ActionEnabler implements ViewContextChangeListener {
    protected Action action;

    public ActionEnabler(Action action) {
        this.action = action;
        init();
    }

    public ActionEnabler(Action action, ViewContext viewContext, Object contextId) {
        this.action = action;
        viewContext.addViewContextChangeListener(contextId, this);
        init();
    }

    public Action getAction() {
        return action;
    }

    protected void init() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy