package _VisualDVM.Visual.Menus;
import Common.Utils.Utils_;
import Common.Visual.UI_;
import Common.Visual.Fonts.VisualiserFonts;
import Visual_DVM_2021.Passes.PassCode;
import Common.Passes.Pass;
import _VisualDVM.Global;

import javax.swing.*;
public class PassesSubMenu extends JMenu {
    public PassesSubMenu(String title, String icon, PassCode... passes) {
        super(title);
        setIcon(Utils_.getIcon(icon));
        setFont(UI_.getTheme().Fonts.get(VisualiserFonts.Menu));
        for (PassCode code : passes) {
            add( Global.mainModule.getPass(code).createMenuItem());
        }
    }
}
