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