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