package _VisualDVM.Visual.Menus;
import Common.MainModule_;
import Common.Utils.Utils_;
import Common.Visual.Fonts.VisualiserFonts;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;

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