package Common.Visual.Controls;
import Common.Passes.Pass;
import Common.Utils.Utils_;
public class StablePassMenuItem extends StableMenuItem implements PassControl {
    public StablePassMenuItem(Pass pass) {
        setText(pass.getDescription());
        setToolTipText(pass.getDescription());
        if (pass.getIconPath() != null) setIcon(pass.getIconPath());
        addActionListener(pass.getControlAction());
        pass.addControl(this);
    }
    @Override
    public void setIcon(String icon_path) {
        setIcon(Utils_.getIcon(icon_path));
    }
}
