Browse Source

Build: Reenable autostyle

modulesv2
weisj 3 years ago
parent
commit
989854c9a4
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 2
      build.gradle.kts
  2. 4
      core/build.gradle.kts
  3. 9
      core/src/main/java/com/github/weisj/darklaf/ui/text/dummy/DummyEditorPaneUI.java
  4. 21
      core/src/test/java/com/github/weisj/darklaf/core/test/DarklafOnly.java
  5. 13
      core/src/test/java/com/github/weisj/darklaf/core/test/DemoTest.java
  6. 6
      core/src/test/java/com/github/weisj/darklaf/core/test/NativeLibraryTest.java
  7. 2
      core/src/test/java/com/github/weisj/darklaf/core/test/TestUtils.java
  8. 4
      core/src/test/java/com/github/weisj/darklaf/core/theme/ThemeEditor.java
  9. 2
      core/src/test/java/com/github/weisj/darklaf/icon/IconDemo.java
  10. 2
      core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java
  11. 4
      core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java
  12. 1
      core/src/test/java/com/github/weisj/darklaf/ui/DemoLauncher.java
  13. 1
      core/src/test/java/com/github/weisj/darklaf/ui/PreferenceChangeDemo.java
  14. 2
      core/src/test/java/com/github/weisj/darklaf/ui/button/GridButtonsDemo.java
  15. 2
      core/src/test/java/com/github/weisj/darklaf/ui/button/GroupedButtonDemo.java
  16. 8
      core/src/test/java/com/github/weisj/darklaf/ui/button/HelpButtonDemo.java
  17. 5
      core/src/test/java/com/github/weisj/darklaf/ui/button/SplitButtonDemo.java
  18. 8
      core/src/test/java/com/github/weisj/darklaf/ui/button/ToggleButtonDemo.java
  19. 2
      core/src/test/java/com/github/weisj/darklaf/ui/checkBox/CheckBoxDemo.java
  20. 2
      core/src/test/java/com/github/weisj/darklaf/ui/checkBox/TriCheckBoxDemo.java
  21. 2
      core/src/test/java/com/github/weisj/darklaf/ui/colorChooser/ColorChooserDemo.java
  22. 4
      core/src/test/java/com/github/weisj/darklaf/ui/comboBox/ComboBoxDemo.java
  23. 38
      core/src/test/java/com/github/weisj/darklaf/ui/demo/BaseComponentDemo.java
  24. 21
      core/src/test/java/com/github/weisj/darklaf/ui/demo/BooleanDemoSpec.java
  25. 21
      core/src/test/java/com/github/weisj/darklaf/ui/demo/ClientPropertySpecBinding.java
  26. 24
      core/src/test/java/com/github/weisj/darklaf/ui/demo/ComponentDemo.java
  27. 21
      core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutionSpec.java
  28. 48
      core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutor.java
  29. 49
      core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoMenuBar.java
  30. 24
      core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoSpec.java
  31. 21
      core/src/test/java/com/github/weisj/darklaf/ui/demo/EnumDemoSpec.java
  32. 24
      core/src/test/java/com/github/weisj/darklaf/ui/demo/SpacerSpec.java
  33. 21
      core/src/test/java/com/github/weisj/darklaf/ui/demo/SpecBinding.java
  34. 1
      core/src/test/java/com/github/weisj/darklaf/ui/dialog/DialogDemo.java
  35. 1
      core/src/test/java/com/github/weisj/darklaf/ui/fileChooser/FileChooserDemo.java
  36. 2
      core/src/test/java/com/github/weisj/darklaf/ui/font/FallbackFontDemo.java
  37. 2
      core/src/test/java/com/github/weisj/darklaf/ui/font/KerningDemo.java
  38. 4
      core/src/test/java/com/github/weisj/darklaf/ui/internalFrame/InternalFrameDemo.java
  39. 3
      core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemo.java
  40. 3
      core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemoBase.java
  41. 3
      core/src/test/java/com/github/weisj/darklaf/ui/label/LoadIndicatorDemo.java
  42. 2
      core/src/test/java/com/github/weisj/darklaf/ui/list/ListDemo.java
  43. 2
      core/src/test/java/com/github/weisj/darklaf/ui/list/ToggleButtonListDemo.java
  44. 2
      core/src/test/java/com/github/weisj/darklaf/ui/popupMenu/PopupMenuDemo.java
  45. 2
      core/src/test/java/com/github/weisj/darklaf/ui/progressBar/ProgressBarDemo.java
  46. 2
      core/src/test/java/com/github/weisj/darklaf/ui/radioButton/RadioButtonDemo.java
  47. 4
      core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java
  48. 2
      core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneDemo.java
  49. 4
      core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneTextDemo.java
  50. 4
      core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/ScrollPaneDemo.java
  51. 2
      core/src/test/java/com/github/weisj/darklaf/ui/slider/SliderDemo.java
  52. 2
      core/src/test/java/com/github/weisj/darklaf/ui/spinner/SpinnerDemo.java
  53. 2
      core/src/test/java/com/github/weisj/darklaf/ui/splitPane/SplitPaneDemo.java
  54. 4
      core/src/test/java/com/github/weisj/darklaf/ui/tabFrame/TabFrameDemo.java
  55. 3
      core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/AbstractTabbedPaneDemo.java
  56. 1
      core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/ClosableTabbedPaneDemo.java
  57. 1
      core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/TabbedPaneDemo.java
  58. 2
      core/src/test/java/com/github/weisj/darklaf/ui/table/TableDemo.java
  59. 1
      core/src/test/java/com/github/weisj/darklaf/ui/text/ColoredTextDemo.java
  60. 3
      core/src/test/java/com/github/weisj/darklaf/ui/text/EditorPaneDemo.java
  61. 1
      core/src/test/java/com/github/weisj/darklaf/ui/text/FormattedTextFieldDemo.java
  62. 3
      core/src/test/java/com/github/weisj/darklaf/ui/text/HTMLPaneDemo.java
  63. 2
      core/src/test/java/com/github/weisj/darklaf/ui/text/PasswordFieldDemo.java
  64. 1
      core/src/test/java/com/github/weisj/darklaf/ui/text/TextAreaDemo.java
  65. 3
      core/src/test/java/com/github/weisj/darklaf/ui/text/TextComponentDemo.java
  66. 2
      core/src/test/java/com/github/weisj/darklaf/ui/text/TextFieldDemo.java
  67. 1
      core/src/test/java/com/github/weisj/darklaf/ui/text/TextPaneDemo.java
  68. 4
      core/src/test/java/com/github/weisj/darklaf/ui/toolTip/ToolTipDemo.java
  69. 2
      core/src/test/java/com/github/weisj/darklaf/ui/tree/CheckBoxTreeDemo.java
  70. 4
      core/src/test/java/com/github/weisj/darklaf/ui/tree/FileTreeDemo.java
  71. 2
      core/src/test/java/com/github/weisj/darklaf/ui/tree/TreeDemo.java
  72. 2
      core/src/test/java/com/github/weisj/darklaf/ui/treetable/TreeTableDemo.java
  73. 8
      utils/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java

2
build.gradle.kts

@ -20,7 +20,7 @@ plugins {
val skipJavadoc by props()
val enableMavenLocal by props(false)
val enableGradleMetadata by props()
val skipAutostyle by props(true)
val skipAutostyle by props(false)
val isRelease = project.stringProperty("release").toBool()
val snapshotName by props("")

4
core/build.gradle.kts

@ -40,8 +40,8 @@ dependencies {
fun JavaForkOptions.patchTestExecParams() {
if (!JavaVersion.current().isJava9Compatible || props.bool("skipModuleInfo")) return
val patchFiles = sourceSets.test.get().output.classesDirs +
sourceSets.test.get().resources.sourceDirectories +
sourceSets.main.get().resources.sourceDirectories
sourceSets.test.get().resources.sourceDirectories +
sourceSets.main.get().resources.sourceDirectories
val resourceDir = sourceSets.test.get().resources.sourceDirectories.singleFile
val testPackages = sourceSets.test.get().resources.asSequence().map { it.parentFile }.toSet().asSequence().map {
it.relativeTo(resourceDir).toPath().joinToString(separator = ".")

9
core/src/main/java/com/github/weisj/darklaf/ui/text/dummy/DummyEditorPaneUI.java

@ -59,12 +59,12 @@ public class DummyEditorPaneUI extends BasicEditorPaneUI implements DummyTextUIM
public void uninstallUI(final JTextComponent editor) {
try {
super.uninstallUI(editor);
} catch (UninstallBlockedException ignored) {}
} catch (UninstallBlockedException ignored) {
}
}
@Override
protected void uninstallKeyboardActions() {
}
protected void uninstallKeyboardActions() {}
@Override
protected void uninstallListeners() {
@ -72,5 +72,6 @@ public class DummyEditorPaneUI extends BasicEditorPaneUI implements DummyTextUIM
throw new UninstallBlockedException();
}
private static class UninstallBlockedException extends RuntimeException {}
private static class UninstallBlockedException extends RuntimeException {
}
}

21
core/src/test/java/com/github/weisj/darklaf/core/test/DarklafOnly.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.core.test;
import java.lang.annotation.ElementType;

13
core/src/test/java/com/github/weisj/darklaf/core/test/DemoTest.java

@ -30,23 +30,22 @@ import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import com.github.weisj.darklaf.ui.demo.ComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoSpec;
import com.github.weisj.darklaf.util.Pair;
import javax.swing.JComponent;
import javax.swing.UIManager;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.ui.DemoLauncher;
import com.github.weisj.darklaf.ui.demo.ComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoSpec;
import com.github.weisj.darklaf.util.Lambdas;
import com.github.weisj.darklaf.util.LogUtil;
import javax.swing.JComponent;
import javax.swing.UIManager;
import com.github.weisj.darklaf.util.Pair;
class DemoTest implements NonThreadSafeTest {

6
core/src/test/java/com/github/weisj/darklaf/core/test/NativeLibraryTest.java

@ -21,17 +21,17 @@
*/
package com.github.weisj.darklaf.core.test;
import com.github.weisj.darklaf.nativeutil.NativeUtil;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import com.github.weisj.darklaf.nativeutil.NativeUtil;
import com.github.weisj.darklaf.platform.macos.MacOSLibrary;
import com.github.weisj.darklaf.platform.windows.WindowsLibrary;
import java.util.List;
/**
* Note: These test aren't located in their respective subprojects to ensure they are run using the
* packaged jar and not the resource path on disc.

2
core/src/test/java/com/github/weisj/darklaf/core/test/TestUtils.java

@ -28,12 +28,12 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.swing.SwingUtilities;
import com.github.weisj.darklaf.util.Lambdas;
import org.junit.jupiter.api.Assertions;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.theme.IntelliJTheme;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.util.Lambdas;
final class TestUtils {

4
core/src/test/java/com/github/weisj/darklaf/core/theme/ThemeEditor.java

@ -72,10 +72,8 @@ import com.github.weisj.darklaf.theme.info.AccentColorRule;
import com.github.weisj.darklaf.theme.info.ColorToneRule;
import com.github.weisj.darklaf.theme.info.ContrastRule;
import com.github.weisj.darklaf.theme.info.FontSizeRule;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutionSpec;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.button.ButtonConstants;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.table.TableConstants;
import com.github.weisj.darklaf.ui.togglebutton.ToggleButtonConstants;
import com.github.weisj.darklaf.ui.util.DarkUIUtil;

2
core/src/test/java/com/github/weisj/darklaf/icon/IconDemo.java

@ -32,9 +32,9 @@ import com.github.weisj.darklaf.properties.icons.IconLoader;
import com.github.weisj.darklaf.properties.icons.UIAwareIcon;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.theme.event.ThemeInstalledListener;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.util.DarkUIUtil;
public class IconDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java

@ -28,9 +28,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.iconeditor.IconEditor;
import com.github.weisj.darklaf.core.test.DarklafOnly;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.Pair;
@DarklafOnly

4
core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java

@ -29,10 +29,10 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.properties.icons.DarkSVGIcon;
import com.github.weisj.darklaf.properties.icons.RotatableIcon;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.Alignment;
public class RotatableIconDemo extends BaseComponentDemo {

1
core/src/test/java/com/github/weisj/darklaf/ui/DemoLauncher.java

@ -36,7 +36,6 @@ import com.github.weisj.darklaf.core.test.util.Instantiable;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.ComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.LazyValue;
import com.github.weisj.darklaf.util.Pair;
public class DemoLauncher extends BaseComponentDemo {

1
core/src/test/java/com/github/weisj/darklaf/ui/PreferenceChangeDemo.java

@ -24,7 +24,6 @@ package com.github.weisj.darklaf.ui;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.*;

2
core/src/test/java/com/github/weisj/darklaf/ui/button/GridButtonsDemo.java

@ -26,9 +26,9 @@ import java.util.Optional;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.AlignmentExt;
public class GridButtonsDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/button/GroupedButtonDemo.java

@ -23,9 +23,9 @@ package com.github.weisj.darklaf.ui.button;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.util.DarkUIUtil;
import com.github.weisj.darklaf.util.AlignmentExt;

8
core/src/test/java/com/github/weisj/darklaf/ui/button/HelpButtonDemo.java

@ -21,17 +21,15 @@
*/
package com.github.weisj.darklaf.ui.button;
import java.util.Collections;
import java.util.List;
import javax.swing.*;
import com.github.weisj.darklaf.components.help.HelpButton;
import com.github.weisj.darklaf.components.help.HelpMenuItem;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import java.awt.ComponentOrientation;
import java.util.Collections;
import java.util.List;
public class HelpButtonDemo extends BaseComponentDemo {

5
core/src/test/java/com/github/weisj/darklaf/ui/button/SplitButtonDemo.java

@ -28,11 +28,8 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.button.JSplitButton;
import com.github.weisj.darklaf.core.test.DarklafOnly;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoSpec;
import com.kitfox.svg.A;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
@DarklafOnly
public class SplitButtonDemo extends ButtonDemo {

8
core/src/test/java/com/github/weisj/darklaf/ui/button/ToggleButtonDemo.java

@ -21,16 +21,14 @@
*/
package com.github.weisj.darklaf.ui.button;
import java.util.Arrays;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.togglebutton.ToggleButtonConstants;
import java.util.Arrays;
public class ToggleButtonDemo extends AbstractButtonDemo<JToggleButton> {
public static void main(final String[] args) {

2
core/src/test/java/com/github/weisj/darklaf/ui/checkBox/CheckBoxDemo.java

@ -27,9 +27,9 @@ import java.util.List;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI;
public class CheckBoxDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/checkBox/TriCheckBoxDemo.java

@ -29,9 +29,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.tristate.TristateCheckBox;
import com.github.weisj.darklaf.components.tristate.TristateCheckBoxMenuItem;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI;
public class TriCheckBoxDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/colorChooser/ColorChooserDemo.java

@ -26,8 +26,6 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutionSpec;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public final class ColorChooserDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/comboBox/ComboBoxDemo.java

@ -25,10 +25,10 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.combobox.ComboBoxConstants;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.PropertyKey;
public class ComboBoxDemo extends BaseComponentDemo {

38
core/src/test/java/com/github/weisj/darklaf/ui/demo/BaseComponentDemo.java

@ -1,14 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.LazyValue;
import sun.java2d.loops.CustomComponent;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Component;
import java.awt.Container;
import java.util.ArrayList;
@ -21,6 +33,14 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.LazyValue;
public abstract class BaseComponentDemo implements ComponentDemo, DemoExecutionSpec {
private static final boolean DEBUG = false;

21
core/src/test/java/com/github/weisj/darklaf/ui/demo/BooleanDemoSpec.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import java.util.Arrays;

21
core/src/test/java/com/github/weisj/darklaf/ui/demo/ClientPropertySpecBinding.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import javax.swing.JComponent;

24
core/src/test/java/com/github/weisj/darklaf/ui/demo/ComponentDemo.java

@ -1,9 +1,31 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import javax.swing.JComponent;
import java.util.Collections;
import java.util.List;
import javax.swing.JComponent;
public interface ComponentDemo {
String getName();

21
core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutionSpec.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import java.awt.Dimension;

48
core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutor.java

@ -1,10 +1,32 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.properties.icons.IconLoader;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.theme.info.PreferredThemeStyle;
import org.jetbrains.annotations.NotNull;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Window;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import javax.swing.Icon;
import javax.swing.JDialog;
@ -13,19 +35,20 @@ import javax.swing.JMenuBar;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Window;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import org.jetbrains.annotations.NotNull;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.properties.icons.IconLoader;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.theme.info.PreferredThemeStyle;
public final class DemoExecutor {
public static Theme getPreferredTheme() {
PreferredThemeStyle themeStyle = LafManager.getPreferredThemeStyle();
return LafManager.themeForPreferredStyle(
new PreferredThemeStyle(themeStyle.getContrastRule(), themeStyle.getColorToneRule()));
new PreferredThemeStyle(themeStyle.getContrastRule(), themeStyle.getColorToneRule()));
}
public static void showDemo(final ComponentDemo demo) {
@ -41,7 +64,6 @@ public final class DemoExecutor {
public static AtomicReference<Window> showDemo(final ComponentDemo demo, final boolean asDialog) {
LafManager.enabledPreferenceChangeReporting(false);
LafManager.addThemePreferenceChangeListener(LafManager::installTheme);
LafManager.setDecorationsEnabled(true);
AtomicReference<Window> windowRef = new AtomicReference<>();
DemoExecutionSpec executionSpec = demo.getExecutionSpec();

49
core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoMenuBar.java

@ -1,14 +1,30 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.settings.ThemeSettingsMenuItem;
import com.github.weisj.darklaf.theme.event.ThemeInstalledListener;
import com.github.weisj.darklaf.ui.rootpane.DarkRootPaneUI;
import com.github.weisj.darklaf.util.Lambdas;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.SystemInfo;
import org.jetbrains.annotations.NotNull;
import java.util.Enumeration;
import java.util.Objects;
import java.util.Optional;
import java.util.logging.Level;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
@ -22,10 +38,17 @@ import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
import java.util.Enumeration;
import java.util.Objects;
import java.util.Optional;
import java.util.logging.Level;
import org.jetbrains.annotations.NotNull;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.settings.ThemeSettingsMenuItem;
import com.github.weisj.darklaf.theme.event.ThemeInstalledListener;
import com.github.weisj.darklaf.ui.rootpane.DarkRootPaneUI;
import com.github.weisj.darklaf.util.Lambdas;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.SystemInfo;
public class DemoMenuBar extends JMenuBar {

24
core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoSpec.java

@ -1,8 +1,30 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import javax.swing.JComponent;
import java.util.List;
import javax.swing.JComponent;
public class DemoSpec<T> {
private final String name;
private final List<T> values;

21
core/src/test/java/com/github/weisj/darklaf/ui/demo/EnumDemoSpec.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import java.util.Arrays;

24
core/src/test/java/com/github/weisj/darklaf/ui/demo/SpacerSpec.java

@ -1,8 +1,30 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import javax.swing.JComponent;
import java.util.Collections;
import javax.swing.JComponent;
public final class SpacerSpec extends DemoSpec<Void> {
public SpacerSpec() {

21
core/src/test/java/com/github/weisj/darklaf/ui/demo/SpecBinding.java

@ -1,3 +1,24 @@
/*
* MIT License
*
* Copyright (c) 2021 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.ui.demo;
import javax.swing.JComponent;

1
core/src/test/java/com/github/weisj/darklaf/ui/dialog/DialogDemo.java

@ -30,7 +30,6 @@ import javax.swing.*;
import javax.swing.border.Border;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
/*

1
core/src/test/java/com/github/weisj/darklaf/ui/fileChooser/FileChooserDemo.java

@ -26,7 +26,6 @@ import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.util.DarkUIUtil;

2
core/src/test/java/com/github/weisj/darklaf/ui/font/FallbackFontDemo.java

@ -23,9 +23,9 @@ package com.github.weisj.darklaf.ui.font;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
public class FallbackFontDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/font/KerningDemo.java

@ -26,9 +26,9 @@ import java.util.Collections;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
public class KerningDemo extends BaseComponentDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/internalFrame/InternalFrameDemo.java

@ -27,8 +27,6 @@ import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.beans.PropertyVetoException;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -37,9 +35,9 @@ import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;
import com.github.weisj.darklaf.components.border.DarkBorders;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
public class InternalFrameDemo extends BaseComponentDemo implements ActionListener {

3
core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemo.java

@ -23,9 +23,8 @@ package com.github.weisj.darklaf.ui.label;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class LabelDemo extends LabelDemoBase<JLabel> {

3
core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemoBase.java

@ -25,9 +25,8 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
public abstract class LabelDemoBase<T extends JLabel> extends BaseComponentDemo {

3
core/src/test/java/com/github/weisj/darklaf/ui/label/LoadIndicatorDemo.java

@ -24,10 +24,9 @@ package com.github.weisj.darklaf.ui.label;
import javax.swing.*;
import com.github.weisj.darklaf.components.loading.LoadingIndicator;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class LoadIndicatorDemo extends LabelDemoBase<LoadingIndicator> {

2
core/src/test/java/com/github/weisj/darklaf/ui/list/ListDemo.java

@ -27,9 +27,9 @@ import java.util.Map;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.PropertyUtil;
public final class ListDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/list/ToggleButtonListDemo.java

@ -27,9 +27,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.components.togglebuttonlist.JToggleButtonList;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI;
import com.github.weisj.darklaf.ui.togglebutton.ToggleButtonConstants;

2
core/src/test/java/com/github/weisj/darklaf/ui/popupMenu/PopupMenuDemo.java

@ -27,9 +27,9 @@ import java.util.List;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
public class PopupMenuDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/progressBar/ProgressBarDemo.java

@ -27,9 +27,9 @@ import java.util.Map;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
public class ProgressBarDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/radioButton/RadioButtonDemo.java

@ -27,9 +27,9 @@ import java.util.List;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI;
public class RadioButtonDemo extends BaseComponentDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java

@ -29,10 +29,10 @@ import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rtextarea.RTextScrollPane;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.StringUtil;
public class OverlayRSyntaxScrollPane extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneDemo.java

@ -27,9 +27,9 @@ import java.util.Random;
import javax.swing.*;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
public class OverlayScrollPaneDemo extends BaseComponentDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneTextDemo.java

@ -26,10 +26,10 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.StringUtil;
public class OverlayScrollPaneTextDemo extends BaseComponentDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/ScrollPaneDemo.java

@ -25,11 +25,11 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.SolidColorComponent;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.StringUtil;
/**

2
core/src/test/java/com/github/weisj/darklaf/ui/slider/SliderDemo.java

@ -25,9 +25,9 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
public class SliderDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/spinner/SpinnerDemo.java

@ -25,9 +25,9 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
public class SpinnerDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/splitPane/SplitPaneDemo.java

@ -30,9 +30,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.LafManager;
import com.github.weisj.darklaf.graphics.ThemedColor;
import com.github.weisj.darklaf.theme.event.ThemeInstalledListener;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.splitpane.DividerStyle;
import com.github.weisj.darklaf.ui.splitpane.SplitPaneConstants;

4
core/src/test/java/com/github/weisj/darklaf/ui/tabFrame/TabFrameDemo.java

@ -26,7 +26,6 @@ import java.awt.*;
import javax.swing.*;
import javax.swing.text.BadLocationException;
import com.github.weisj.darklaf.core.test.DarklafOnly;
import org.pbjar.jxlayer.plaf.ext.TransformUI;
import com.github.weisj.darklaf.components.tabframe.JTabFrame;
@ -34,9 +33,10 @@ import com.github.weisj.darklaf.components.tabframe.TabbedPopup;
import com.github.weisj.darklaf.components.text.NonWrappingTextPane;
import com.github.weisj.darklaf.components.text.NumberedTextComponent;
import com.github.weisj.darklaf.components.text.NumberingPane;
import com.github.weisj.darklaf.core.test.DarklafOnly;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.util.DarkUIUtil;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.PropertyValue;

3
core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/AbstractTabbedPaneDemo.java

@ -32,9 +32,8 @@ import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.tabbedpane.DarkTabbedPaneUI;
import com.github.weisj.darklaf.util.StringUtil;

1
core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/ClosableTabbedPaneDemo.java

@ -26,7 +26,6 @@ import java.util.logging.Logger;
import com.github.weisj.darklaf.components.ClosableTabbedPane;
import com.github.weisj.darklaf.components.TabEvent;
import com.github.weisj.darklaf.components.TabListener;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.LogUtil;

1
core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/TabbedPaneDemo.java

@ -23,7 +23,6 @@ package com.github.weisj.darklaf.ui.tabbedPane;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class TabbedPaneDemo extends AbstractTabbedPaneDemo<JTabbedPane> {

2
core/src/test/java/com/github/weisj/darklaf/ui/table/TableDemo.java

@ -31,9 +31,9 @@ import javax.swing.table.TableCellEditor;
import javax.swing.table.TableModel;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.table.renderer.DarkTableCellEditor;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;

1
core/src/test/java/com/github/weisj/darklaf/ui/text/ColoredTextDemo.java

@ -32,7 +32,6 @@ import javax.swing.text.StyledDocument;
import com.github.weisj.darklaf.listener.InsertDocumentListener;
import com.github.weisj.darklaf.properties.color.DarkColorModelHSB;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class ColoredTextDemo extends TextPaneDemo {

3
core/src/test/java/com/github/weisj/darklaf/ui/text/EditorPaneDemo.java

@ -23,9 +23,8 @@ package com.github.weisj.darklaf.ui.text;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.StringUtil;
public class EditorPaneDemo extends TextComponentDemo<JEditorPane> {

1
core/src/test/java/com/github/weisj/darklaf/ui/text/FormattedTextFieldDemo.java

@ -25,7 +25,6 @@ import java.text.NumberFormat;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class FormattedTextFieldDemo extends TextFieldDemo {

3
core/src/test/java/com/github/weisj/darklaf/ui/text/HTMLPaneDemo.java

@ -23,9 +23,8 @@ package com.github.weisj.darklaf.ui.text;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class HTMLPaneDemo extends TextPaneDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/text/PasswordFieldDemo.java

@ -25,9 +25,9 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.PropertyKey;
public class PasswordFieldDemo extends BaseComponentDemo {

1
core/src/test/java/com/github/weisj/darklaf/ui/text/TextAreaDemo.java

@ -25,7 +25,6 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class TextAreaDemo extends TextComponentDemo<JTextArea> {

3
core/src/test/java/com/github/weisj/darklaf/ui/text/TextComponentDemo.java

@ -27,9 +27,8 @@ import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.text.JTextComponent;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.StringUtil;

2
core/src/test/java/com/github/weisj/darklaf/ui/text/TextFieldDemo.java

@ -25,9 +25,9 @@ import java.awt.*;
import javax.swing.*;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;

1
core/src/test/java/com/github/weisj/darklaf/ui/text/TextPaneDemo.java

@ -23,7 +23,6 @@ package com.github.weisj.darklaf.ui.text;
import javax.swing.*;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
public class TextPaneDemo extends TextComponentDemo<JTextPane> {

4
core/src/test/java/com/github/weisj/darklaf/ui/toolTip/ToolTipDemo.java

@ -26,10 +26,10 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.alignment.AlignmentStrategy;
import com.github.weisj.darklaf.components.tooltip.ToolTipContext;
import com.github.weisj.darklaf.components.tooltip.ToolTipStyle;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.DemoResources;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.tooltip.DarkToolTipUI;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.StringUtil;

2
core/src/test/java/com/github/weisj/darklaf/ui/tree/CheckBoxTreeDemo.java

@ -28,9 +28,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.components.tree.TristateTreeNode;
import com.github.weisj.darklaf.components.tristate.TristateState;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.StringUtil;
public class CheckBoxTreeDemo extends BaseComponentDemo {

4
core/src/test/java/com/github/weisj/darklaf/ui/tree/FileTreeDemo.java

@ -30,10 +30,10 @@ import javax.swing.filechooser.FileSystemView;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.components.filetree.FileTree;
import com.github.weisj.darklaf.core.test.DelicateDemo;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.button.ButtonConstants;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
@DelicateDemo(reason = "Deprecated")
public class FileTreeDemo extends BaseComponentDemo {

2
core/src/test/java/com/github/weisj/darklaf/ui/tree/TreeDemo.java

@ -31,9 +31,9 @@ import net.miginfocom.swing.MigLayout;
import com.github.weisj.darklaf.components.OverlayScrollPane;
import com.github.weisj.darklaf.components.SelectableTreeNode;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;

2
core/src/test/java/com/github/weisj/darklaf/ui/treetable/TreeTableDemo.java

@ -30,9 +30,9 @@ import javax.swing.*;
import com.github.weisj.darklaf.components.treetable.JTreeTable;
import com.github.weisj.darklaf.components.treetable.model.*;
import com.github.weisj.darklaf.core.test.DelicateDemo;
import com.github.weisj.darklaf.ui.DemoPanel;
import com.github.weisj.darklaf.ui.demo.BaseComponentDemo;
import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.ui.DemoPanel;
@DelicateDemo
public class TreeTableDemo extends BaseComponentDemo {

8
utils/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java

@ -25,8 +25,6 @@ import java.awt.*;
import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.util.ColorWrapper;
import com.github.weisj.darklaf.util.PropertyUtil;
/** @author Jannis Weis */
public final class ColorUtil {
@ -117,9 +115,9 @@ public final class ColorUtil {
public static int rgbNoAlpha(final Color color) {
return ((0) << 24) |
((color.getRed() & 0xFF) << 16) |
((color.getGreen() & 0xFF) << 8) |
((color.getBlue() & 0xFF));
((color.getRed() & 0xFF) << 16) |
((color.getGreen() & 0xFF) << 8) |
((color.getBlue() & 0xFF));
}
/**

Loading…
Cancel
Save