From 989854c9a44ed963b8f6923c4bf16234448b700d Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Wed, 21 Jul 2021 12:41:58 +0200 Subject: [PATCH] Build: Reenable autostyle --- build.gradle.kts | 2 +- core/build.gradle.kts | 4 +- .../ui/text/dummy/DummyEditorPaneUI.java | 9 ++-- .../weisj/darklaf/core/test/DarklafOnly.java | 21 ++++++++ .../weisj/darklaf/core/test/DemoTest.java | 13 +++-- .../darklaf/core/test/NativeLibraryTest.java | 6 +-- .../weisj/darklaf/core/test/TestUtils.java | 2 +- .../weisj/darklaf/core/theme/ThemeEditor.java | 4 +- .../github/weisj/darklaf/icon/IconDemo.java | 2 +- .../weisj/darklaf/icon/IconEditorDemo.java | 2 +- .../weisj/darklaf/icon/RotatableIconDemo.java | 4 +- .../github/weisj/darklaf/ui/DemoLauncher.java | 1 - .../darklaf/ui/PreferenceChangeDemo.java | 1 - .../darklaf/ui/button/GridButtonsDemo.java | 2 +- .../darklaf/ui/button/GroupedButtonDemo.java | 2 +- .../darklaf/ui/button/HelpButtonDemo.java | 8 ++- .../darklaf/ui/button/SplitButtonDemo.java | 5 +- .../darklaf/ui/button/ToggleButtonDemo.java | 8 ++- .../darklaf/ui/checkBox/CheckBoxDemo.java | 2 +- .../darklaf/ui/checkBox/TriCheckBoxDemo.java | 2 +- .../ui/colorChooser/ColorChooserDemo.java | 2 - .../darklaf/ui/comboBox/ComboBoxDemo.java | 4 +- .../darklaf/ui/demo/BaseComponentDemo.java | 38 ++++++++++---- .../darklaf/ui/demo/BooleanDemoSpec.java | 21 ++++++++ .../ui/demo/ClientPropertySpecBinding.java | 21 ++++++++ .../weisj/darklaf/ui/demo/ComponentDemo.java | 24 ++++++++- .../darklaf/ui/demo/DemoExecutionSpec.java | 21 ++++++++ .../weisj/darklaf/ui/demo/DemoExecutor.java | 48 +++++++++++++----- .../weisj/darklaf/ui/demo/DemoMenuBar.java | 49 ++++++++++++++----- .../weisj/darklaf/ui/demo/DemoSpec.java | 24 ++++++++- .../weisj/darklaf/ui/demo/EnumDemoSpec.java | 21 ++++++++ .../weisj/darklaf/ui/demo/SpacerSpec.java | 24 ++++++++- .../weisj/darklaf/ui/demo/SpecBinding.java | 21 ++++++++ .../weisj/darklaf/ui/dialog/DialogDemo.java | 1 - .../ui/fileChooser/FileChooserDemo.java | 1 - .../darklaf/ui/font/FallbackFontDemo.java | 2 +- .../weisj/darklaf/ui/font/KerningDemo.java | 2 +- .../ui/internalFrame/InternalFrameDemo.java | 4 +- .../weisj/darklaf/ui/label/LabelDemo.java | 3 +- .../weisj/darklaf/ui/label/LabelDemoBase.java | 3 +- .../darklaf/ui/label/LoadIndicatorDemo.java | 3 +- .../weisj/darklaf/ui/list/ListDemo.java | 2 +- .../darklaf/ui/list/ToggleButtonListDemo.java | 2 +- .../darklaf/ui/popupMenu/PopupMenuDemo.java | 2 +- .../ui/progressBar/ProgressBarDemo.java | 2 +- .../ui/radioButton/RadioButtonDemo.java | 2 +- .../scrollPane/OverlayRSyntaxScrollPane.java | 4 +- .../ui/scrollPane/OverlayScrollPaneDemo.java | 2 +- .../scrollPane/OverlayScrollPaneTextDemo.java | 4 +- .../darklaf/ui/scrollPane/ScrollPaneDemo.java | 4 +- .../weisj/darklaf/ui/slider/SliderDemo.java | 2 +- .../weisj/darklaf/ui/spinner/SpinnerDemo.java | 2 +- .../darklaf/ui/splitPane/SplitPaneDemo.java | 2 +- .../darklaf/ui/tabFrame/TabFrameDemo.java | 4 +- .../ui/tabbedPane/AbstractTabbedPaneDemo.java | 3 +- .../ui/tabbedPane/ClosableTabbedPaneDemo.java | 1 - .../darklaf/ui/tabbedPane/TabbedPaneDemo.java | 1 - .../weisj/darklaf/ui/table/TableDemo.java | 2 +- .../darklaf/ui/text/ColoredTextDemo.java | 1 - .../weisj/darklaf/ui/text/EditorPaneDemo.java | 3 +- .../ui/text/FormattedTextFieldDemo.java | 1 - .../weisj/darklaf/ui/text/HTMLPaneDemo.java | 3 +- .../darklaf/ui/text/PasswordFieldDemo.java | 2 +- .../weisj/darklaf/ui/text/TextAreaDemo.java | 1 - .../darklaf/ui/text/TextComponentDemo.java | 3 +- .../weisj/darklaf/ui/text/TextFieldDemo.java | 2 +- .../weisj/darklaf/ui/text/TextPaneDemo.java | 1 - .../weisj/darklaf/ui/toolTip/ToolTipDemo.java | 4 +- .../darklaf/ui/tree/CheckBoxTreeDemo.java | 2 +- .../weisj/darklaf/ui/tree/FileTreeDemo.java | 4 +- .../weisj/darklaf/ui/tree/TreeDemo.java | 2 +- .../darklaf/ui/treetable/TreeTableDemo.java | 2 +- .../github/weisj/darklaf/util/ColorUtil.java | 8 ++- 73 files changed, 371 insertions(+), 146 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9e001c8a..7061932d 100644 --- a/build.gradle.kts +++ b/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("") diff --git a/core/build.gradle.kts b/core/build.gradle.kts index ebb9497a..2b8022ee 100644 --- a/core/build.gradle.kts +++ b/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 = ".") diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/text/dummy/DummyEditorPaneUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/text/dummy/DummyEditorPaneUI.java index f5ba1603..277e4a13 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/text/dummy/DummyEditorPaneUI.java +++ b/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 { + } } diff --git a/core/src/test/java/com/github/weisj/darklaf/core/test/DarklafOnly.java b/core/src/test/java/com/github/weisj/darklaf/core/test/DarklafOnly.java index b8709d44..c0055c45 100644 --- a/core/src/test/java/com/github/weisj/darklaf/core/test/DarklafOnly.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/core/test/DemoTest.java b/core/src/test/java/com/github/weisj/darklaf/core/test/DemoTest.java index 114432c4..f46be776 100644 --- a/core/src/test/java/com/github/weisj/darklaf/core/test/DemoTest.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/core/test/NativeLibraryTest.java b/core/src/test/java/com/github/weisj/darklaf/core/test/NativeLibraryTest.java index 87631c8d..2f5aec47 100644 --- a/core/src/test/java/com/github/weisj/darklaf/core/test/NativeLibraryTest.java +++ b/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. diff --git a/core/src/test/java/com/github/weisj/darklaf/core/test/TestUtils.java b/core/src/test/java/com/github/weisj/darklaf/core/test/TestUtils.java index e0922e06..b86dd4ef 100644 --- a/core/src/test/java/com/github/weisj/darklaf/core/test/TestUtils.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/core/theme/ThemeEditor.java b/core/src/test/java/com/github/weisj/darklaf/core/theme/ThemeEditor.java index 4db0f970..d653f1c9 100644 --- a/core/src/test/java/com/github/weisj/darklaf/core/theme/ThemeEditor.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/icon/IconDemo.java b/core/src/test/java/com/github/weisj/darklaf/icon/IconDemo.java index 44ffb192..0195ba68 100644 --- a/core/src/test/java/com/github/weisj/darklaf/icon/IconDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java b/core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java index 160c702d..ba4c053b 100644 --- a/core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java +++ b/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 diff --git a/core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java b/core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java index 9cb272a9..4493c6bd 100644 --- a/core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/DemoLauncher.java b/core/src/test/java/com/github/weisj/darklaf/ui/DemoLauncher.java index da95729b..d8ced3ba 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/DemoLauncher.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/PreferenceChangeDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/PreferenceChangeDemo.java index 42c8e2f8..941f52bd 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/PreferenceChangeDemo.java +++ b/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.*; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/button/GridButtonsDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/button/GridButtonsDemo.java index b4e727c0..949ce815 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/button/GridButtonsDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/button/GroupedButtonDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/button/GroupedButtonDemo.java index bf4bea0e..820aa3d6 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/button/GroupedButtonDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/button/HelpButtonDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/button/HelpButtonDemo.java index a0f78788..325eedd0 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/button/HelpButtonDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/button/SplitButtonDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/button/SplitButtonDemo.java index 9ea951b7..3759478e 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/button/SplitButtonDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/button/ToggleButtonDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/button/ToggleButtonDemo.java index 34094e5c..eb43dbbd 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/button/ToggleButtonDemo.java +++ b/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 { public static void main(final String[] args) { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/CheckBoxDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/CheckBoxDemo.java index 05905fa0..ff4e4605 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/CheckBoxDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/TriCheckBoxDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/TriCheckBoxDemo.java index bab52666..24221d41 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/checkBox/TriCheckBoxDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/colorChooser/ColorChooserDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/colorChooser/ColorChooserDemo.java index e147677f..5092033a 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/colorChooser/ColorChooserDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/comboBox/ComboBoxDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/comboBox/ComboBoxDemo.java index 858b3aaf..de640524 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/comboBox/ComboBoxDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/BaseComponentDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/BaseComponentDemo.java index c726e871..02277c61 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/BaseComponentDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/BooleanDemoSpec.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/BooleanDemoSpec.java index 4ec66245..d742acb9 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/BooleanDemoSpec.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/ClientPropertySpecBinding.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/ClientPropertySpecBinding.java index 8134c82b..5cc5d479 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/ClientPropertySpecBinding.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/ComponentDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/ComponentDemo.java index 9a354e4e..1d67f5ec 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/ComponentDemo.java +++ b/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(); diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutionSpec.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutionSpec.java index 5f0b87c1..6baeac00 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutionSpec.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutor.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutor.java index 39a1a36a..e81bca4c 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoExecutor.java +++ b/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 showDemo(final ComponentDemo demo, final boolean asDialog) { LafManager.enabledPreferenceChangeReporting(false); LafManager.addThemePreferenceChangeListener(LafManager::installTheme); - LafManager.setDecorationsEnabled(true); AtomicReference windowRef = new AtomicReference<>(); DemoExecutionSpec executionSpec = demo.getExecutionSpec(); diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoMenuBar.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoMenuBar.java index 078a9c44..d9ecabd7 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoMenuBar.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoSpec.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoSpec.java index a2cbc217..1a4e5b95 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/DemoSpec.java +++ b/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 { private final String name; private final List values; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/EnumDemoSpec.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/EnumDemoSpec.java index a7859c1a..4c13f066 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/EnumDemoSpec.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpacerSpec.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpacerSpec.java index 0e545240..9aed9867 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpacerSpec.java +++ b/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 { public SpacerSpec() { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpecBinding.java b/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpecBinding.java index e8ce82c0..ca4ed979 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/demo/SpecBinding.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/dialog/DialogDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/dialog/DialogDemo.java index 4b2c6589..9b948df2 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/dialog/DialogDemo.java +++ b/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; /* diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/fileChooser/FileChooserDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/fileChooser/FileChooserDemo.java index 0b09e160..331c4657 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/fileChooser/FileChooserDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/font/FallbackFontDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/font/FallbackFontDemo.java index b7a678d0..b8f70020 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/font/FallbackFontDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/font/KerningDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/font/KerningDemo.java index 759bf75b..71c2f7d2 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/font/KerningDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/internalFrame/InternalFrameDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/internalFrame/InternalFrameDemo.java index f4dc2bde..188e27e2 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/internalFrame/InternalFrameDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemo.java index 613704c4..38044a23 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemoBase.java b/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemoBase.java index 6ba484c0..31b3df6a 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/label/LabelDemoBase.java +++ b/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 extends BaseComponentDemo { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/label/LoadIndicatorDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/label/LoadIndicatorDemo.java index c8dd432b..c0c832e4 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/label/LoadIndicatorDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/list/ListDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/list/ListDemo.java index d26f9edc..90ebefed 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/list/ListDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/list/ToggleButtonListDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/list/ToggleButtonListDemo.java index f7c08e1e..c6374f7f 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/list/ToggleButtonListDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/popupMenu/PopupMenuDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/popupMenu/PopupMenuDemo.java index 79c80050..a21c2c25 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/popupMenu/PopupMenuDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/progressBar/ProgressBarDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/progressBar/ProgressBarDemo.java index 3f32c33f..726bab3f 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/progressBar/ProgressBarDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/radioButton/RadioButtonDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/radioButton/RadioButtonDemo.java index ab47c36b..63829a5f 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/radioButton/RadioButtonDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java b/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java index 9d576550..3e5809fc 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayRSyntaxScrollPane.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneDemo.java index 9eb525c7..bbb49a01 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneTextDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneTextDemo.java index 10e28310..07a1684e 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/OverlayScrollPaneTextDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/ScrollPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/ScrollPaneDemo.java index 96f44a7b..5d03014f 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/scrollPane/ScrollPaneDemo.java +++ b/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; /** diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/slider/SliderDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/slider/SliderDemo.java index 7fbc83f9..ad01285a 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/slider/SliderDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/spinner/SpinnerDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/spinner/SpinnerDemo.java index da09aa68..9602be23 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/spinner/SpinnerDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/splitPane/SplitPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/splitPane/SplitPaneDemo.java index 27001d79..fe637d45 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/splitPane/SplitPaneDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tabFrame/TabFrameDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tabFrame/TabFrameDemo.java index fcc3e1d6..87899ac1 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tabFrame/TabFrameDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/AbstractTabbedPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/AbstractTabbedPaneDemo.java index 2229da5c..5897cf72 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/AbstractTabbedPaneDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/ClosableTabbedPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/ClosableTabbedPaneDemo.java index 29687c2d..ba746c70 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/ClosableTabbedPaneDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/TabbedPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/TabbedPaneDemo.java index bda56aa4..d7be928f 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tabbedPane/TabbedPaneDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/table/TableDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/table/TableDemo.java index 9aae7869..7e2fa746 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/table/TableDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/ColoredTextDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/ColoredTextDemo.java index 0934b628..2d096ca3 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/ColoredTextDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/EditorPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/EditorPaneDemo.java index 4e8a04d1..9b609a50 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/EditorPaneDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/FormattedTextFieldDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/FormattedTextFieldDemo.java index 98dec7ae..7b7b5ae1 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/FormattedTextFieldDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/HTMLPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/HTMLPaneDemo.java index c6ef9a03..d33dc352 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/HTMLPaneDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/PasswordFieldDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/PasswordFieldDemo.java index 74baea2d..bf62b28e 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/PasswordFieldDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextAreaDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/TextAreaDemo.java index 5608beaf..78f598a3 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextAreaDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextComponentDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/TextComponentDemo.java index e047b019..1d87eb55 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextComponentDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextFieldDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/TextFieldDemo.java index dfb0b563..aff3b411 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextFieldDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextPaneDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/text/TextPaneDemo.java index e1b559ad..723c0adf 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/text/TextPaneDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/toolTip/ToolTipDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/toolTip/ToolTipDemo.java index 5ab2e820..bc461b80 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/toolTip/ToolTipDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tree/CheckBoxTreeDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tree/CheckBoxTreeDemo.java index c01c032e..e988cfbb 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tree/CheckBoxTreeDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tree/FileTreeDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tree/FileTreeDemo.java index 174bfa59..f59dd374 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tree/FileTreeDemo.java +++ b/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 { diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/tree/TreeDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/tree/TreeDemo.java index cb87664f..c6d5f8c1 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/tree/TreeDemo.java +++ b/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; diff --git a/core/src/test/java/com/github/weisj/darklaf/ui/treetable/TreeTableDemo.java b/core/src/test/java/com/github/weisj/darklaf/ui/treetable/TreeTableDemo.java index 01c1c389..210be3cf 100644 --- a/core/src/test/java/com/github/weisj/darklaf/ui/treetable/TreeTableDemo.java +++ b/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 { diff --git a/utils/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java b/utils/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java index d7fd3b40..f7c1a9a4 100644 --- a/utils/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java +++ b/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)); } /**