|
|
|
@ -46,11 +46,18 @@ public class DarkLaf extends ThemedLookAndFeel {
|
|
|
|
|
/* |
|
|
|
|
* All tasks for initializing the ui defaults in order of execution. |
|
|
|
|
*/ |
|
|
|
|
private static final DefaultsInitTask[] INIT_TASKS = |
|
|
|
|
new DefaultsInitTask[] {new RemoveUnusedInitTask(), new ThemeDefaultsInitTask(), |
|
|
|
|
new InputDefaultsInitTask(), new IdeaDefaultsInitTask(), new FontDefaultsInitTask(), |
|
|
|
|
new StyleSheetInitTask(), new ResourceBundleInitTask(), new SystemDefaultsInitTask(), |
|
|
|
|
new PlatformDefaultsInitTask(), new UserInitTask(), new UtilityDefaultsInitTask()}; |
|
|
|
|
private static final DefaultsInitTask[] INIT_TASKS = new DefaultsInitTask[] { |
|
|
|
|
new RemoveUnusedInitTask(), |
|
|
|
|
new ThemeDefaultsInitTask(), |
|
|
|
|
new InputDefaultsInitTask(), |
|
|
|
|
new IdeaDefaultsInitTask(), |
|
|
|
|
new FontDefaultsInitTask(), |
|
|
|
|
new StyleSheetInitTask(), |
|
|
|
|
new ResourceBundleInitTask(), |
|
|
|
|
new SystemDefaultsInitTask(), |
|
|
|
|
new PlatformDefaultsInitTask(), |
|
|
|
|
new UserInitTask(), |
|
|
|
|
new UtilityDefaultsInitTask()}; |
|
|
|
|
/* |
|
|
|
|
* The base look and feel. This may vary to handle different platform support. |
|
|
|
|
*/ |
|
|
|
@ -66,9 +73,16 @@ public class DarkLaf extends ThemedLookAndFeel {
|
|
|
|
|
*/ |
|
|
|
|
private Theme theme; |
|
|
|
|
|
|
|
|
|
private final boolean runListenerCallback; |
|
|
|
|
|
|
|
|
|
DarkLaf(final boolean runListenerCallback) { |
|
|
|
|
this.runListenerCallback = runListenerCallback; |
|
|
|
|
base = getBase(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** Create Custom Darcula LaF. */ |
|
|
|
|
public DarkLaf() { |
|
|
|
|
base = getBase(); |
|
|
|
|
this(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private LookAndFeel getBase() { |
|
|
|
@ -107,7 +121,9 @@ public class DarkLaf extends ThemedLookAndFeel {
|
|
|
|
|
PopupFactory.setSharedInstance(new DarkPopupFactory()); |
|
|
|
|
setupDecorations(); |
|
|
|
|
isInitialized = true; |
|
|
|
|
SwingUtilities.invokeLater(LafManager::notifyThemeInstalled); |
|
|
|
|
if (runListenerCallback) { |
|
|
|
|
SwingUtilities.invokeLater(LafManager::notifyThemeInstalled); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setupDecorations() { |
|
|
|
|