package _VisualDVM.Visual.Menus;
import Common.MainModule_;
import Common.Utils.Utils_;
import Common.Visual.Fonts.VisualiserFonts;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Settings.SettingName;

import javax.swing.*;
public class SettingsSubmenu extends JMenu {
    public SettingsSubmenu(String title, String icon, SettingName... settings) {
        super(title);
        if (icon != null)
            setIcon(Utils_.getIcon(icon));
        setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.Menu));
        for (SettingName c : settings) {
            add((Global.mainModule.getDb()).settings.get(c).getMenuItem());
        }
    }
}
