@Override public void validate() throws IllegalStateException { Preferences prefs = NbPreferences.root().node("laf"); if (!prefs.getBoolean("darcula.installed", false)) { prefs.put("laf", DarculaLaf.class.getName()); SWITCH_EDITOR_COLORS = true; } prefs.putBoolean("darcula.installed", true); // to make LAF available in Tools > Options > Appearance > Look and Feel UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo(DarculaLaf.NAME, DarculaLaf.class.getName())); UIManager.put("Nb.DarculaLFCustoms", new DarculaLFCustoms()); }
private UIManager.LookAndFeelInfo[] getLookAndFeels() { final List<UIManager.LookAndFeelInfo> installed = Arrays .stream(UIManager.getInstalledLookAndFeels()) .filter(ui -> !ui.getName().toLowerCase().matches("cde/motif|metal|windows classic|nimbus")) .collect(Collectors.toList()); final List<BasicLookAndFeel> substance = Arrays.asList( new SubstanceBusinessLookAndFeel(), new SubstanceGraphiteAquaLookAndFeel() ); final List<UIManager.LookAndFeelInfo> extraLf = substance.stream() .map(l -> new UIManager.LookAndFeelInfo(l.getName(), l.getClass().getName())) .collect(Collectors.toList()); final ArrayList<UIManager.LookAndFeelInfo> result = new ArrayList<>(); result.addAll(installed); result.addAll(extraLf); return result.toArray(new UIManager.LookAndFeelInfo[0]); }
if (laf.isSupportedLookAndFeel()) LookAndFeelInfo info = new LookAndFeelInfo(laf.getName(), lafClass.getName()); UIManager.installLookAndFeel(info);
/** * Initializes the look and feel. */ public void initialize() { super.initialize(); if(!isInstalled) { isInstalled = true; searchDefaultTheme(); UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo( "TinyLookAndFeel", "net.sf.tinylaf.TinyLookAndFeel")); } TinyPopupFactory.install(); // Execute this one even if isInstalled is true // New in 1.3.6 KeyboardFocusManager.getCurrentKeyboardFocusManager(). addKeyEventPostProcessor(TinyMenuUI.ALT_PROCESSOR); clearAllCaches(); }
/** * Get a list of all installed LAFs plus CrossPlatform and System. * * @return The list of available {@link LookAndFeelInfo}s */ // This is also used by LookAndFeelCommand public static LookAndFeelInfo[] getAllLAFs() { UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); int i = lafs.length; UIManager.LookAndFeelInfo[] lafsAll = new UIManager.LookAndFeelInfo[i+2]; System.arraycopy(lafs, 0, lafsAll, 0, i); lafsAll[i++]=new UIManager.LookAndFeelInfo(CROSS_PLATFORM_LAF,UIManager.getCrossPlatformLookAndFeelClassName()); lafsAll[i]=new UIManager.LookAndFeelInfo(SYSTEM_LAF,UIManager.getSystemLookAndFeelClassName()); return lafsAll; }
public LookAndFeelInfo getLookAndFeelInfo() { return new UIManager.LookAndFeelInfo(this.getName(), SubstanceLafPlaceholder.class.getCanonicalName()); } }
public LookAndFeelInfo getLookAndFeelInfo() { return new UIManager.LookAndFeelInfo(this.getName(), JTattooLafPlaceholder.class.getCanonicalName()); } }
public KunststoffLookAndFeel() { // the next line was removed by Jens Niemeyer, jens@jensn.de, because it would // cause a crash when using Sun Web Start // super(); // install with the UIManager, if not done yet. if (!isInstalled) { UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("Kunststoff", "com.incors.plaf.kunststoff.KunststoffLookAndFeel")); isInstalled = true; } }