Browse Source

added Licence notice and authors.

pull/15/head
weisj 5 years ago
parent
commit
fe01861f2b
  1. 202
      licence/INTELLIJ_LICENCE.txt
  2. 0
      licence/LICENSE
  3. 0
      licence/NOTICE.txt
  4. 23
      src/jniplatform/cpp/JNIDecorations.cpp
  5. 23
      src/jniplatform/cpp/JNIDecorations.h
  6. 27
      src/main/java/com/weis/darklaf/DarkLaf.java
  7. 24
      src/main/java/com/weis/darklaf/DarkLafInfo.java
  8. 3
      src/main/java/com/weis/darklaf/DarkMetalTheme.java
  9. 24
      src/main/java/com/weis/darklaf/LafManager.java
  10. 39
      src/main/java/com/weis/darklaf/LightLaf.java
  11. 18
      src/main/java/com/weis/darklaf/LightLafInfo.java
  12. 23
      src/main/java/com/weis/darklaf/LightMetalTheme.java
  13. 26
      src/main/java/com/weis/darklaf/LogFormatter.java
  14. 26
      src/main/java/com/weis/darklaf/color/DarkColorModel.java
  15. 26
      src/main/java/com/weis/darklaf/color/DarkColorModelCMYK.java
  16. 26
      src/main/java/com/weis/darklaf/color/DarkColorModelHSB.java
  17. 26
      src/main/java/com/weis/darklaf/color/DarkColorModelHSL.java
  18. 26
      src/main/java/com/weis/darklaf/components/ArrowButton.java
  19. 3
      src/main/java/com/weis/darklaf/components/ClosableTabComponent.java
  20. 3
      src/main/java/com/weis/darklaf/components/ClosableTabbedPane.java
  21. 24
      src/main/java/com/weis/darklaf/components/ColorPipetteBase.java
  22. 1
      src/main/java/com/weis/darklaf/components/DefaultColorPipette.java
  23. 23
      src/main/java/com/weis/darklaf/components/Disposable.java
  24. 28
      src/main/java/com/weis/darklaf/components/OverlayScrollPane.java
  25. 29
      src/main/java/com/weis/darklaf/components/ScrollPopupMenu.java
  26. 26
      src/main/java/com/weis/darklaf/components/SelectableTreeNode.java
  27. 3
      src/main/java/com/weis/darklaf/components/TabEvent.java
  28. 3
      src/main/java/com/weis/darklaf/components/TabListener.java
  29. 3
      src/main/java/com/weis/darklaf/components/TabPropertyChangeEvent.java
  30. 24
      src/main/java/com/weis/darklaf/components/TextFieldHistory.java
  31. 3
      src/main/java/com/weis/darklaf/components/alignment/Alignment.java
  32. 52
      src/main/java/com/weis/darklaf/components/alignment/AlignmentHelper.java
  33. 1
      src/main/java/com/weis/darklaf/components/border/AdaptiveLineBorder.java
  34. 24
      src/main/java/com/weis/darklaf/components/border/DropShadowBorder.java
  35. 3
      src/main/java/com/weis/darklaf/components/border/MutableLineBorder.java
  36. 172
      src/main/java/com/weis/darklaf/components/border/ShadowPainter.java
  37. 3
      src/main/java/com/weis/darklaf/components/border/TextBubbleBorder.java
  38. 13
      src/main/java/com/weis/darklaf/components/tristate/TristateButtonModel.java
  39. 23
      src/main/java/com/weis/darklaf/decorators/ComponentResizeListener.java
  40. 23
      src/main/java/com/weis/darklaf/decorators/LayoutManagerDelegate.java
  41. 29
      src/main/java/com/weis/darklaf/decorators/MouseClickListener.java
  42. 23
      src/main/java/com/weis/darklaf/decorators/MouseMovementListener.java
  43. 23
      src/main/java/com/weis/darklaf/decorators/MouseResponder.java
  44. 24
      src/main/java/com/weis/darklaf/decorators/PlainAction.java
  45. 27
      src/main/java/com/weis/darklaf/decorators/PopupMenuAdapter.java
  46. 23
      src/main/java/com/weis/darklaf/icons/DarkSVGIcon.java
  47. 23
      src/main/java/com/weis/darklaf/icons/DarkUIAwareIcon.java
  48. 30
      src/main/java/com/weis/darklaf/icons/EmptyIcon.java
  49. 3
      src/main/java/com/weis/darklaf/icons/IconColorMapper.java
  50. 26
      src/main/java/com/weis/darklaf/icons/IconLoader.java
  51. 26
      src/main/java/com/weis/darklaf/icons/LazyIcon.java
  52. 26
      src/main/java/com/weis/darklaf/icons/LazyImageIcon.java
  53. 3
      src/main/java/com/weis/darklaf/icons/ThemedSVGIcon.java
  54. 3
      src/main/java/com/weis/darklaf/icons/UIAwareIcon.java
  55. 3
      src/main/java/com/weis/darklaf/platform/windows/JNIDecorations.java
  56. 3
      src/main/java/com/weis/darklaf/theme/DarculaTheme.java
  57. 3
      src/main/java/com/weis/darklaf/theme/IntelliJTheme.java
  58. 3
      src/main/java/com/weis/darklaf/theme/Theme.java
  59. 25
      src/main/java/com/weis/darklaf/ui/button/DarkButtonBorder.java
  60. 25
      src/main/java/com/weis/darklaf/ui/button/DarkButtonUI.java
  61. 26
      src/main/java/com/weis/darklaf/ui/button/DarkToggleButtonUI.java
  62. 26
      src/main/java/com/weis/darklaf/ui/cell/CellEditorToggleButton.java
  63. 3
      src/main/java/com/weis/darklaf/ui/cell/DarkCellBorder.java
  64. 24
      src/main/java/com/weis/darklaf/ui/cell/DarkCellRendererToggleButton.java
  65. 3
      src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxBorder.java
  66. 2
      src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java
  67. 27
      src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxUI.java
  68. 24
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorListener.java
  69. 36
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorPipette.java
  70. 3
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorPreviewComponent.java
  71. 26
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorValueFormatter.java
  72. 23
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheel.java
  73. 5
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelImageProducer.java
  74. 28
      src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelPanel.java
  75. 32
      src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserPanel.java
  76. 26
      src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserUI.java
  77. 26
      src/main/java/com/weis/darklaf/ui/colorchooser/DarkPreviewPanel.java
  78. 26
      src/main/java/com/weis/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java
  79. 3
      src/main/java/com/weis/darklaf/ui/colorchooser/MainSwatchPanel.java
  80. 3
      src/main/java/com/weis/darklaf/ui/colorchooser/RecentSwatchPanel.java
  81. 25
      src/main/java/com/weis/darklaf/ui/colorchooser/SlideComponent.java
  82. 3
      src/main/java/com/weis/darklaf/ui/colorchooser/SwatchPanel.java
  83. 27
      src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java
  84. 26
      src/main/java/com/weis/darklaf/ui/combobox/DarkComboPopup.java
  85. 23
      src/main/java/com/weis/darklaf/ui/html/DarkHTML.java
  86. 3
      src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconBorder.java
  87. 3
      src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconUI.java
  88. 26
      src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameBorder.java
  89. 3
      src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java
  90. 26
      src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameUI.java
  91. 3
      src/main/java/com/weis/darklaf/ui/label/DarkLabelUI.java
  92. 3
      src/main/java/com/weis/darklaf/ui/list/DarkListCellBorder.java
  93. 3
      src/main/java/com/weis/darklaf/ui/list/DarkListUI.java
  94. 26
      src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarBorder.java
  95. 43
      src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarUI.java
  96. 26
      src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemBorder.java
  97. 25
      src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemUIBase.java
  98. 26
      src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuBorder.java
  99. 26
      src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java
  100. 25
      src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuUI.java
  101. Some files were not shown because too many files have changed in this diff Show More

202
licence/INTELLIJ_LICENCE.txt

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2000-2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

0
LICENSE → licence/LICENSE

0
NOTICE.txt → licence/NOTICE.txt

23
src/jniplatform/cpp/JNIDecorations.cpp

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.
*/
#include "JNIDecorations.h";
#include "com_weis_darklaf_platform_windows_JNIDecorations.h"
#include <dwmapi.h>

23
src/jniplatform/cpp/JNIDecorations.h

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.
*/
#include <stdio.h>
#include <windows.h>
#include <windowsx.h>

27
src/main/java/com/weis/darklaf/DarkLaf.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf;
import com.weis.darklaf.platform.windows.JNIDecorations;
@ -23,7 +46,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
* CustomDarcula Look and Feel to allow for better extension.
* @author Jannis Weis
*/
public class DarkLaf extends BasicLookAndFeel {
@ -121,7 +144,7 @@ public class DarkLaf extends BasicLookAndFeel {
if (SystemInfo.isMac && !"true".equalsIgnoreCase(System.getProperty("apple.laf.useScreenMenuBar",
"false"))) {
//Todo.
defaults.put("MenuBarUI", "com.bulenkov.darcula.ui.DarculaMenuBarUI");
defaults.put("MenuBarUI", "com.weis.darklaf.ui.menu.DarkMenuBarUI");
defaults.put("MenuUI", "javax.swing.plaf.basic.BasicMenuUI");
}
return defaults;

24
src/main/java/com/weis/darklaf/DarkLafInfo.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf;
import javax.swing.*;
@ -6,7 +29,6 @@ import javax.swing.*;
* {@link javax.swing.UIManager.LookAndFeelInfo} for {@link DarkLaf}.
*
* @author Jannis Weis
* @since 2018
*/
public class DarkLafInfo extends UIManager.LookAndFeelInfo {
/**

3
src/main/java/com/weis/darklaf/DarkMetalTheme.java

@ -2,6 +2,9 @@ package com.weis.darklaf;
import javax.swing.plaf.metal.DefaultMetalTheme;
/**
* @author Jannis Weis
*/
public class DarkMetalTheme extends DefaultMetalTheme {
public String getName() {
return "Darcula theme";

24
src/main/java/com/weis/darklaf/LafManager.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf;
import com.weis.darklaf.theme.DarculaTheme;
@ -16,7 +39,6 @@ import java.util.logging.Logger;
* Manager for the Look and Feel.
*
* @author Jannis Weis
* @since 2018
*/
public final class LafManager {

39
src/main/java/com/weis/darklaf/LightLaf.java

@ -1,39 +0,0 @@
package com.weis.darklaf;
import com.weis.darklaf.util.SystemInfo;
import org.jetbrains.annotations.NotNull;
import javax.swing.plaf.metal.MetalLookAndFeel;
/**
* Extension of {@link DarkLaf} to light colours.
*
* @author Jannis Weis
* @since 2018
*/
public class LightLaf extends DarkLaf {
private static final String NAME = "Darklaf-Light";
/**
* Create new light Darcula LaF.
*/
public LightLaf() {
if (SystemInfo.isWindows || SystemInfo.isLinux) {
MetalLookAndFeel.setCurrentTheme(new LightMetalTheme());
}
}
@NotNull
@Override
public String getName() {
return NAME;
}
@NotNull
@Override
public String getDescription() {
return "Light Look and feel based on Darcula-LAF";
}
}

18
src/main/java/com/weis/darklaf/LightLafInfo.java

@ -1,18 +0,0 @@
package com.weis.darklaf;
import javax.swing.*;
/**
* {@link javax.swing.UIManager.LookAndFeelInfo} for {@link LightLaf}.
*
* @author Jannis Weis
* @since 2018
*/
public class LightLafInfo extends UIManager.LookAndFeelInfo {
/**
* Constructs a {@link UIManager}s {@link javax.swing.UIManager.LookAndFeelInfo} object.
*/
public LightLafInfo() {
super("Darklaf-Light", LightLaf.class.getCanonicalName());
}
}

23
src/main/java/com/weis/darklaf/LightMetalTheme.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf;
import org.jetbrains.annotations.NotNull;

26
src/main/java/com/weis/darklaf/LogFormatter.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf;
import org.jetbrains.annotations.NotNull;
@ -8,6 +31,9 @@ import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
/**
* @author Jannis Weis
*/
public class LogFormatter extends Formatter {
public static final String ANSI_RESET = "\u001B[0m";
public static final String ANSI_BLACK = "\u001B[30m";

26
src/main/java/com/weis/darklaf/color/DarkColorModel.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.color;
import org.jetbrains.annotations.Contract;
@ -6,6 +29,9 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkColorModel {
private final String prefix;

26
src/main/java/com/weis/darklaf/color/DarkColorModelCMYK.java

@ -1,9 +1,35 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.color;
import org.jetbrains.annotations.NotNull;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkColorModelCMYK extends DarkColorModel {
private static final int[] cmyk = new int[4];

26
src/main/java/com/weis/darklaf/color/DarkColorModelHSB.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.color;
import org.jetbrains.annotations.Contract;
@ -5,6 +28,9 @@ import org.jetbrains.annotations.NotNull;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkColorModelHSB extends DarkColorModel {
private static final int[] hsb = new int[3];

26
src/main/java/com/weis/darklaf/color/DarkColorModelHSL.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.color;
import org.jetbrains.annotations.Contract;
@ -5,6 +28,9 @@ import org.jetbrains.annotations.NotNull;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkColorModelHSL extends DarkColorModel {
private static final int[] hsl = new int[3];

26
src/main/java/com/weis/darklaf/components/ArrowButton.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
import com.weis.darklaf.icons.UIAwareIcon;
@ -9,6 +32,9 @@ import javax.swing.plaf.DimensionUIResource;
import javax.swing.plaf.basic.BasicArrowButton;
import java.awt.*;
/**
* @author Jannis Weis
*/
public final class ArrowButton implements SwingConstants {
@Contract(pure = true)

3
src/main/java/com/weis/darklaf/components/ClosableTabComponent.java

@ -10,6 +10,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/**
* @author Jannis Weis
*/
public class ClosableTabComponent extends JPanel {
private final JTabbedPane pane;

3
src/main/java/com/weis/darklaf/components/ClosableTabbedPane.java

@ -6,6 +6,9 @@ import javax.swing.*;
import java.awt.*;
import java.beans.PropertyVetoException;
/**
* @author Jannis Weis
*/
public class ClosableTabbedPane extends JTabbedPane {
@Override

24
src/main/java/com/weis/darklaf/components/ColorPipetteBase.java

@ -1,3 +1,27 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;

1
src/main/java/com/weis/darklaf/components/DefaultColorPipette.java

@ -1,3 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.weis.darklaf.components;
import com.weis.darklaf.ui.colorchooser.ColorListener;

23
src/main/java/com/weis/darklaf/components/Disposable.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
public interface Disposable {

28
src/main/java/com/weis/darklaf/components/OverlayScrollPane.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
import com.weis.darklaf.ui.scrollpane.ScrollLayoutManagerDelegate;
@ -9,10 +32,9 @@ import javax.swing.plaf.ScrollPaneUI;
import java.awt.*;
/**
* Scroll pane without border.
* Scroll pane that displays its content beneath the scrollbar.
*
* @author Jannis Weis
* @since 2018
*/
public class OverlayScrollPane extends JLayeredPane {
@ -277,6 +299,4 @@ public class OverlayScrollPane extends JLayeredPane {
}
}

29
src/main/java/com/weis/darklaf/components/ScrollPopupMenu.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
import com.weis.darklaf.util.DarkUIUtil;
@ -9,6 +32,9 @@ import javax.swing.event.MenuKeyEvent;
import javax.swing.event.MenuKeyListener;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class ScrollPopupMenu extends JPopupMenu {
private final JPanel contentPane;
@ -176,9 +202,6 @@ public class ScrollPopupMenu extends JPopupMenu {
}
private boolean isPopupMenu() {
var invoker = getInvoker();
return ((invoker != null) && !(invoker instanceof JMenu));

26
src/main/java/com/weis/darklaf/components/SelectableTreeNode.java

@ -1,7 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
import javax.swing.tree.DefaultMutableTreeNode;
/**
* @author Jannis Weis
*/
public class SelectableTreeNode extends DefaultMutableTreeNode {
private String label;

3
src/main/java/com/weis/darklaf/components/TabEvent.java

@ -2,6 +2,9 @@ package com.weis.darklaf.components;
import java.awt.event.ActionEvent;
/**
* @author Jannis Weis
*/
public class TabEvent extends ActionEvent {
public static final int TAB_OPENED = 0;

3
src/main/java/com/weis/darklaf/components/TabListener.java

@ -2,6 +2,9 @@ package com.weis.darklaf.components;
import java.util.EventListener;
/**
* @author Jannis Weis
*/
public interface TabListener extends EventListener {
void tabOpened(TabEvent e);

3
src/main/java/com/weis/darklaf/components/TabPropertyChangeEvent.java

@ -2,6 +2,9 @@ package com.weis.darklaf.components;
import java.beans.PropertyChangeEvent;
/**
* @author Jannis Weis
*/
public class TabPropertyChangeEvent extends PropertyChangeEvent {
private final int index;

24
src/main/java/com/weis/darklaf/components/TextFieldHistory.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components;
import com.weis.darklaf.decorators.PlainAction;
@ -11,7 +34,6 @@ import java.util.LinkedList;
/**
* @author Jannis Weis
* @since 2019
*/
public class TextFieldHistory extends ScrollPopupMenu implements ActionListener {

3
src/main/java/com/weis/darklaf/components/alignment/Alignment.java

@ -9,10 +9,7 @@ import java.util.function.BiFunction;
import static com.weis.darklaf.components.alignment.AlignmentHelper.*;
/**
* Alignment for GUI elements.
*
* @author Jannis Weis
* @since 2018
*/
public enum Alignment {
NORTH(AlignmentHelper.align(HOR_CENTER_INSIDE, VERT_TOP_INSIDE),

52
src/main/java/com/weis/darklaf/components/alignment/AlignmentHelper.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.components.alignment;
import org.jetbrains.annotations.Contract;
@ -7,29 +30,26 @@ import java.awt.*;
import java.util.function.BiFunction;
/**
* Helper methods for calculating alignments.
*
* @author Jannis Weis
* @since 2018
*/
final class AlignmentHelper {
/**
* Provided relative mapping functions.
*/
/*default*/ static final Mapper HOR_CENTER_INSIDE = (d, r) -> r.x + (r.width - d.width) / 2;
/*default*/ static final Mapper HOR_LEFT_INSIDE = (d, r) -> r.x;
/*default*/ static final Mapper HOR_RIGHT_INSIDE = (d, r) -> r.x + r.width - d.width;
/*default*/ static final Mapper VERT_CENTER_INSIDE = (d, r) -> r.y + (r.height - d.height) / 2;
/*default*/ static final Mapper VERT_TOP_INSIDE = (d, r) -> r.y;
/*default*/ static final Mapper VERT_BOTTOM_INSIDE = (d, r) -> r.y + r.height - d.height;
static final Mapper HOR_CENTER_INSIDE = (d, r) -> r.x + (r.width - d.width) / 2;
static final Mapper HOR_LEFT_INSIDE = (d, r) -> r.x;
static final Mapper HOR_RIGHT_INSIDE = (d, r) -> r.x + r.width - d.width;
static final Mapper VERT_CENTER_INSIDE = (d, r) -> r.y + (r.height - d.height) / 2;
static final Mapper VERT_TOP_INSIDE = (d, r) -> r.y;
static final Mapper VERT_BOTTOM_INSIDE = (d, r) -> r.y + r.height - d.height;
/*default*/ static final Mapper HOR_CENTER_OUTSIDE = HOR_CENTER_INSIDE;
/*default*/ static final Mapper HOR_LEFT_OUTSIDE = (d, r) -> r.x - d.width;
/*default*/ static final Mapper HOR_RIGHT_OUTSIDE = (d, r) -> r.x;
/*default*/ static final Mapper VERT_CENTER_OUTSIDE = VERT_CENTER_INSIDE;
/*default*/ static final Mapper VERT_TOP_OUTSIDE = (d, r) -> r.y - d.height;
/*default*/ static final Mapper VERT_BOTTOM_OUTSIDE = (d, r) -> r.y + r.height;
static final Mapper HOR_CENTER_OUTSIDE = HOR_CENTER_INSIDE;
static final Mapper HOR_LEFT_OUTSIDE = (d, r) -> r.x - d.width;
static final Mapper HOR_RIGHT_OUTSIDE = (d, r) -> r.x;
static final Mapper VERT_CENTER_OUTSIDE = VERT_CENTER_INSIDE;
static final Mapper VERT_TOP_OUTSIDE = (d, r) -> r.y - d.height;
static final Mapper VERT_BOTTOM_OUTSIDE = (d, r) -> r.y + r.height;
/**
* Create mapper from component mapper.
@ -40,7 +60,7 @@ final class AlignmentHelper {
*/
@NotNull
@Contract(pure = true)
/*default*/ static BiFunction<Dimension, Rectangle, Point> align(
static BiFunction<Dimension, Rectangle, Point> align(
@NotNull final Mapper mapperX, @NotNull final Mapper mapperY) {
return (d, p) -> new Point(mapperX.apply(d, p), mapperY.apply(d, p));
}

1
src/main/java/com/weis/darklaf/components/border/AdaptiveLineBorder.java

@ -5,7 +5,6 @@ import java.awt.*;
/**
* @author Jannis Weis
* @since 2019
*/
public class AdaptiveLineBorder extends MutableLineBorder {

24
src/main/java/com/weis/darklaf/components/border/DropShadowBorder.java

@ -32,14 +32,11 @@ import java.util.Map;
* rapidly.</p>
*
* @author rbair
* Adaptions made by
* @author Jannis Weis
*/
public class DropShadowBorder implements Border, Serializable {
/**
*
*/
private static final long serialVersionUID = 715287754750604058L;
private static final Map<Double, Map<Position, BufferedImage>> CACHE
= new HashMap<>();
private static final Map<Integer, Map<Position, BufferedImage>> CACHE = new HashMap<>();
private Color shadowColor;
private int shadowSize;
private float shadowOpacity;
@ -73,6 +70,7 @@ public class DropShadowBorder implements Border, Serializable {
this.showBottomShadow = showBottomShadow;
this.showRightShadow = showRightShadow;
}
@Contract(pure = true)
public DropShadowBorder(final boolean showLeftShadow) {
this(Color.BLACK, 5, .5f, 12, false, showLeftShadow, true, true);
@ -220,7 +218,7 @@ public class DropShadowBorder implements Border, Serializable {
private Map<Position, BufferedImage> getImages(final Graphics2D g2) {
//first, check to see if an image for this size has already been rendered
//if so, use the cache. Else, draw and save
Map<Position, BufferedImage> images = CACHE.get(shadowSize + (shadowColor.hashCode() * .3) + (shadowOpacity * .12));//(TUDU) do a real hash
Map<Position, BufferedImage> images = CACHE.get(getBorderHash(shadowSize, shadowOpacity, shadowColor));
if (images == null) {
images = new HashMap<>();
@ -247,7 +245,6 @@ public class DropShadowBorder implements Border, Serializable {
try {
buffer.setPaint(new Color(shadowColor.getRed(), shadowColor.getGreen(),
shadowColor.getBlue(), (int) (shadowOpacity * 255)));
// buffer.setColor(new Color(0.0f, 0.0f, 0.0f, shadowOpacity));
buffer.translate(shadowSize, shadowSize);
buffer.fill(rect);
} finally {
@ -303,12 +300,18 @@ public class DropShadowBorder implements Border, Serializable {
images.put(Position.TOP, getSubImage(targetImage, x, y, w, h));
image.flush();
CACHE.put(shadowSize + (shadowColor.hashCode() * .3) + (shadowOpacity * .12),
images); //TUDU do a real hash
CACHE.put(getBorderHash(shadowSize, shadowOpacity, shadowColor), images);
}
return images;
}
private static int getBorderHash(final int shadowSize, final float opacity, final Color shadowColor) {
int result = shadowSize;
result = 31 * result + (opacity != +0.0f ? Float.floatToIntBits(opacity) : 0);
result = 31 * result + (shadowColor != null ? shadowColor.hashCode() : 0);
return result;
}
/**
* Returns a new BufferedImage that represents a subregion of the given
* BufferedImage. (Note that this method does not use
@ -415,4 +418,5 @@ public class DropShadowBorder implements Border, Serializable {
TOP, TOP_LEFT, LEFT, BOTTOM_LEFT,
BOTTOM, BOTTOM_RIGHT, RIGHT, TOP_RIGHT
}
}

3
src/main/java/com/weis/darklaf/components/border/MutableLineBorder.java

@ -6,10 +6,7 @@ import javax.swing.border.EmptyBorder;
import java.awt.*;
/**
* Line Border that can change side thickness.
*
* @author Jannis Weis
* @since 2019
*/
public class MutableLineBorder extends EmptyBorder {

172
src/main/java/com/weis/darklaf/components/border/ShadowPainter.java

@ -1,172 +0,0 @@
package com.weis.darklaf.components.border;
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be
// found in the LICENSE file.
import com.weis.darklaf.util.GraphicsUtil;
import com.weis.darklaf.util.ImageUtil;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.Area;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import static com.weis.darklaf.util.GraphicsUtil.SCALE;
/**
* @author Konstantin Bulenkov
*/
public class ShadowPainter {
protected final Icon myTop;
protected final Icon myTopRight;
protected final Icon myRight;
protected final Icon myBottomRight;
protected final Icon myBottom;
protected final Icon myBottomLeft;
protected final Icon myLeft;
protected final Icon myTopLeft;
private Icon myCroppedTop = null;
private Icon myCroppedRight = null;
private Icon myCroppedBottom = null;
private Icon myCroppedLeft = null;
@Nullable
private Color myBorderColor;
@Contract(pure = true)
public ShadowPainter(final Icon top, final Icon topRight, final Icon right,
final Icon bottomRight, final Icon bottom, final Icon bottomLeft,
final Icon left, final Icon topLeft, @Nullable final Color borderColor) {
this(top, topRight, right, bottomRight, bottom, bottomLeft, left, topLeft);
myBorderColor = borderColor;
}
public ShadowPainter(final Icon top, final Icon topRight, final Icon right,
final Icon bottomRight, final Icon bottom, final Icon bottomLeft,
final Icon left, final Icon topLeft) {
myTop = top;
myTopRight = topRight;
myRight = right;
myBottomRight = bottomRight;
myBottom = bottom;
myBottomLeft = bottomLeft;
myLeft = left;
myTopLeft = topLeft;
updateIcons();
}
private void updateIcons() {
myCroppedTop = ImageUtil.cropIcon(myTop, 1, Integer.MAX_VALUE);
myCroppedRight = ImageUtil.cropIcon(myRight, Integer.MAX_VALUE, 1);
myCroppedBottom = ImageUtil.cropIcon(myBottom, 1, Integer.MAX_VALUE);
myCroppedLeft = ImageUtil.cropIcon(myLeft, Integer.MAX_VALUE, 1);
}
public void setBorderColor(@Nullable final Color borderColor) {
myBorderColor = borderColor;
}
public BufferedImage createShadow(@NotNull final JComponent c, final int width, final int height) {
final BufferedImage image = c.getGraphicsConfiguration()
.createCompatibleImage(width, height, Transparency.TRANSLUCENT);
final Graphics2D g = image.createGraphics();
paintShadow(c, g, 0, 0, width, height);
g.dispose();
return image;
}
public void paintShadow(final Component c, final Graphics2D g, final int x, final int y,
final int width, final int height) {
final int leftSize = myCroppedLeft.getIconWidth();
final int rightSize = myCroppedRight.getIconWidth();
final int bottomSize = myCroppedBottom.getIconHeight();
final int topSize = myCroppedTop.getIconHeight();
// updateIcons();
int delta = myTopLeft.getIconHeight() + myBottomLeft.getIconHeight() - height;
if (delta > 0) { // Corner icons are overlapping. Need to handle this
Shape clip = g.getClip();
int topHeight = myTopLeft.getIconHeight() - delta / 2;
Area top = new Area(new Rectangle2D.Float(x, y, width, topHeight));
if (clip != null) {
top.intersect(new Area(clip));
}
g.setClip(top);
myTopLeft.paintIcon(c, g, x, y);
myTopRight.paintIcon(c, g, x + width - myTopRight.getIconWidth(), y);
int bottomHeight = myBottomLeft.getIconHeight() - delta + delta / 2;
Area bottom = new Area(new Rectangle2D.Float(x, y + topHeight, width, bottomHeight));
if (clip != null) {
bottom.intersect(new Area(clip));
}
g.setClip(bottom);
myBottomLeft.paintIcon(c, g, x, y + height - myBottomLeft.getIconHeight());
myBottomRight.paintIcon(c, g, x + width - myBottomRight.getIconWidth(),
y + height - myBottomRight.getIconHeight());
g.setClip(clip);
} else {
myTopLeft.paintIcon(c, g, x, y);
myTopRight.paintIcon(c, g, x + width - myTopRight.getIconWidth(), y);
myBottomLeft.paintIcon(c, g, x, y + height - myBottomLeft.getIconHeight());
myBottomRight.paintIcon(c, g, x + width - myBottomRight.getIconWidth(),
y + height - myBottomRight.getIconHeight());
}
fill(g, myCroppedTop, x, y, myTopLeft.getIconWidth(),
width - myTopRight.getIconWidth(), true);
fill(g, myCroppedBottom, x, y + height - bottomSize, myBottomLeft.getIconWidth(),
width - myBottomRight.getIconWidth(), true);
fill(g, myCroppedLeft, x, y, myTopLeft.getIconHeight(),
height - myBottomLeft.getIconHeight(), false);
fill(g, myCroppedRight, x + width - rightSize, y, myTopRight.getIconHeight(),
height - myBottomRight.getIconHeight(), false);
if (myBorderColor != null) {
g.setColor(myBorderColor);
g.drawRect(x + leftSize - 1, y + topSize - 1, width - leftSize - rightSize + 1,
height - topSize - bottomSize + 1);
}
}
private static void fill(final Graphics g, final Icon pattern, final int x, final int y, final int from,
final int to, final boolean horizontally) {
double scale = SCALE;
if (GraphicsUtil.isHighDpiEnabled() && Math.ceil(scale) > scale) {
// Direct painting for fractional scale
BufferedImage img = ImageUtil.toBufferedImage(ImageUtil.toImage(pattern));
int patternSize = horizontally ? img.getWidth() : img.getHeight();
Graphics2D g2d = (Graphics2D) g.create();
try {
g2d.scale(1 / scale, 1 / scale);
g2d.translate(x * scale, y * scale);
for (int at = (int) Math.floor(from * scale); at < to * scale; at += patternSize) {
if (horizontally) {
g2d.drawImage(img, at, 0, null);
} else {
g2d.drawImage(img, 0, at, null);
}
}
} finally {
g2d.dispose();
}
} else {
for (int at = from; at < to; at++) {
if (horizontally) {
pattern.paintIcon(null, g, x + at, y);
} else {
pattern.paintIcon(null, g, x, y + at);
}
}
}
}
}

3
src/main/java/com/weis/darklaf/components/border/TextBubbleBorder.java

@ -12,10 +12,7 @@ import java.awt.geom.Path2D;
import java.awt.geom.RoundRectangle2D;
/**
* Border that looks like a Text Bubble.
*
* @author Jannis Weis
* @since 2018
*/
public class TextBubbleBorder extends AbstractBorder {

13
src/main/java/com/weis/darklaf/components/tristate/TristateButtonModel.java

@ -38,28 +38,15 @@ public class TristateButtonModel extends JToggleButton.ToggleButtonModel {
return state == TristateState.SELECTED;
}
// Empty overrides of superclass methods
public void setArmed(final boolean b) {
}
public void setPressed(final boolean b) {
}
protected void iterateState() {
setState(state.next());
}
public void setState(final TristateState state) {
//Set internal state
this.state = state;
displayState();
if (state == TristateState.INDETERMINATE && isEnabled()) {
// force the events to fire
// Send ChangeEvent
fireStateChanged();
// Send ItemEvent
int indeterminate = 3;
//noinspection MagicConstant
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED, this, indeterminate));

23
src/main/java/com/weis/darklaf/decorators/ComponentResizeListener.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import java.awt.event.ComponentEvent;

23
src/main/java/com/weis/darklaf/decorators/LayoutManagerDelegate.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import org.jetbrains.annotations.Contract;

29
src/main/java/com/weis/darklaf/decorators/MouseClickListener.java

@ -1,14 +1,31 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/**
* Wrapper interface to shorten code when only mouse clicked is used.
*
* @author Jannis Weis
* @since 2019
*/
public interface MouseClickListener extends MouseListener {
@Override

23
src/main/java/com/weis/darklaf/decorators/MouseMovementListener.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import java.awt.event.MouseEvent;

23
src/main/java/com/weis/darklaf/decorators/MouseResponder.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import org.jetbrains.annotations.Contract;

24
src/main/java/com/weis/darklaf/decorators/PlainAction.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import javax.swing.*;
@ -5,7 +28,6 @@ import java.awt.event.ActionEvent;
/**
* @author Jannis Weis
* @since 2019
*/
public class PlainAction extends AbstractAction {

27
src/main/java/com/weis/darklaf/decorators/PopupMenuAdapter.java

@ -1,12 +1,31 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.decorators;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
/**
* @author Jannis Weis
* @since 2019
*/
public class PopupMenuAdapter implements PopupMenuListener {
@Override
public void popupMenuWillBecomeVisible(final PopupMenuEvent e) {

23
src/main/java/com/weis/darklaf/icons/DarkSVGIcon.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import com.kitfox.svg.app.beans.SVGIcon;

23
src/main/java/com/weis/darklaf/icons/DarkUIAwareIcon.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import com.weis.darklaf.LafManager;

30
src/main/java/com/weis/darklaf/icons/EmptyIcon.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import org.jetbrains.annotations.Contract;
@ -9,6 +32,10 @@ import java.awt.*;
import java.util.HashMap;
import java.util.Map;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
public final class EmptyIcon implements Icon, UIResource {
private static final Map<Integer, Icon> cache = new HashMap<>();
private final int width;
@ -42,14 +69,17 @@ public final class EmptyIcon implements Icon, UIResource {
public void paintIcon(final Component component, final Graphics g, final int i, final int j) {
}
@Contract(pure = true)
public int getIconWidth() {
return this.width;
}
@Contract(pure = true)
public int getIconHeight() {
return this.height;
}
@Contract(pure = true)
public int hashCode() {
int sum = this.width + this.height;
return sum * (sum + 1) / 2 + this.width;

3
src/main/java/com/weis/darklaf/icons/IconColorMapper.java

@ -13,6 +13,9 @@ import java.awt.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Jannis Weis
*/
public final class IconColorMapper {
private static final Logger LOGGER = Logger.getLogger(IconLoader.class.getName());

26
src/main/java/com/weis/darklaf/icons/IconLoader.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import org.jetbrains.annotations.Contract;
@ -12,6 +35,9 @@ import java.util.Objects;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Jannis Weis
*/
public final class IconLoader {
private static final Logger LOGGER = Logger.getLogger(IconLoader.class.getName());
private static final Map<Class<?>, IconLoader> iconLoaderMap = new HashMap<>();

26
src/main/java/com/weis/darklaf/icons/LazyIcon.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import org.jetbrains.annotations.Contract;
@ -6,6 +29,9 @@ import javax.swing.*;
import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* @author Jannis Weis
*/
public abstract class LazyIcon implements Icon, UIResource {
protected final String path;

26
src/main/java/com/weis/darklaf/icons/LazyImageIcon.java

@ -1,7 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.icons;
import javax.swing.*;
/**
* @author Jannis Weis
*/
public class LazyImageIcon extends LazyIcon {
public LazyImageIcon(final String path, final IconLoader.IconKey key, final Class<?> parentClass) {

3
src/main/java/com/weis/darklaf/icons/ThemedSVGIcon.java

@ -7,6 +7,9 @@ import org.jetbrains.annotations.NotNull;
import java.awt.*;
import java.net.URI;
/**
* @author Jannis Weis
*/
public class ThemedSVGIcon extends DarkSVGIcon {
private Theme currentTheme;

3
src/main/java/com/weis/darklaf/icons/UIAwareIcon.java

@ -2,6 +2,9 @@ package com.weis.darklaf.icons;
import javax.swing.*;
/**
* @author Jannis Weis
*/
public interface UIAwareIcon extends Icon {
UIAwareIcon getDual();

3
src/main/java/com/weis/darklaf/platform/windows/JNIDecorations.java

@ -12,6 +12,9 @@ import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Jannis Weis
*/
public class JNIDecorations {
private static final Logger LOGGER = Logger.getLogger(JNIDecorations.class.getName());

3
src/main/java/com/weis/darklaf/theme/DarculaTheme.java

@ -1,5 +1,8 @@
package com.weis.darklaf.theme;
/**
* @author Jannis Weis
*/
public class DarculaTheme extends Theme {
@Override

3
src/main/java/com/weis/darklaf/theme/IntelliJTheme.java

@ -1,5 +1,8 @@
package com.weis.darklaf.theme;
/**
* @author Jannis Weis
*/
public class IntelliJTheme extends Theme {
@Override

3
src/main/java/com/weis/darklaf/theme/Theme.java

@ -18,6 +18,9 @@ import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Jannis Weis
*/
public abstract class Theme {
private static final Logger LOGGER = Logger.getLogger(Theme.class.getName());
private static final String[] UI_PROPERTIES = new String[]{

25
src/main/java/com/weis/darklaf/ui/button/DarkButtonBorder.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.button;
import com.weis.darklaf.util.DarkUIUtil;
@ -14,8 +37,8 @@ import java.awt.geom.Area;
import java.awt.geom.RoundRectangle2D;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
* @since 2019
*/
public class DarkButtonBorder implements Border, UIResource {

25
src/main/java/com/weis/darklaf/ui/button/DarkButtonUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.button;
import com.weis.darklaf.util.GraphicsContext;
@ -18,8 +41,8 @@ import java.awt.*;
import java.awt.geom.RoundRectangle2D;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
* @since 2019
*/
public class DarkButtonUI extends BasicButtonUI {

26
src/main/java/com/weis/darklaf/ui/button/DarkToggleButtonUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.button;
import com.weis.darklaf.util.DarkUIUtil;
@ -14,6 +37,9 @@ import java.awt.geom.Ellipse2D;
import java.awt.geom.RoundRectangle2D;
import java.beans.PropertyChangeListener;
/**
* @author Jannis Weis
*/
public class DarkToggleButtonUI extends DarkButtonUI {
private static final int BSIZE = DarkButtonBorder.BORDER_SIZE;

26
src/main/java/com/weis/darklaf/ui/cell/CellEditorToggleButton.java

@ -1,5 +1,31 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.cell;
/**
* @author Jannis Weis
*/
public interface CellEditorToggleButton {
void setHasFocus(final boolean hasFocus);
}

3
src/main/java/com/weis/darklaf/ui/cell/DarkCellBorder.java

@ -3,6 +3,9 @@ package com.weis.darklaf.ui.cell;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.UIResource;
/**
* @author Jannis Weis
*/
public class DarkCellBorder extends EmptyBorder implements UIResource {
public DarkCellBorder() {

24
src/main/java/com/weis/darklaf/ui/cell/DarkCellRendererToggleButton.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.cell;
import com.weis.darklaf.components.SelectableTreeNode;
@ -13,6 +36,7 @@ import java.awt.*;
/**
* @author vincencopalazzo
* @author atarw
* @author Jannis Weis
*/
public class DarkCellRendererToggleButton<T extends JToggleButton & CellEditorToggleButton>
implements TableCellRenderer, TreeCellRenderer, SwingConstants {

3
src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxBorder.java

@ -10,6 +10,9 @@ import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkCheckBoxBorder implements Border, UIResource {
@Override

2
src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java

@ -13,8 +13,8 @@ import javax.swing.plaf.ComponentUI;
import java.awt.*;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
* @since 2019
*/
public class DarkCheckBoxMenuItemUI extends DarkMenuItemUIBase {

27
src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.checkbox;
import com.weis.darklaf.icons.EmptyIcon;
@ -19,6 +42,10 @@ import java.awt.*;
import java.awt.geom.Path2D;
import java.awt.geom.RoundRectangle2D;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
public class DarkCheckBoxUI extends MetalCheckBoxUI {
private static final int BSIZE = DarkButtonBorder.BORDER_SIZE;

24
src/main/java/com/weis/darklaf/ui/colorchooser/ColorListener.java

@ -1,3 +1,27 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import java.awt.*;

36
src/main/java/com/weis/darklaf/ui/colorchooser/ColorPipette.java

@ -1,20 +1,28 @@
package com.weis.darklaf.ui.colorchooser;
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
/*
* Copyright 2000-2015 JetBrains s.r.o.
* MIT License
*
* Copyright (c) 2019 Jannis Weis
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 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:
*
* http://www.apache.org/licenses/LICENSE-2.0
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* 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.weis.darklaf.ui.colorchooser;
import com.weis.darklaf.components.Disposable;
import org.jetbrains.annotations.Nullable;
@ -22,6 +30,10 @@ import org.jetbrains.annotations.Nullable;
import java.awt.*;
import java.awt.image.ImageObserver;
/**
* @author pegov
* @author Konstantin Bulenkov
*/
public interface ColorPipette extends ImageObserver, Disposable {
void setInitialColor(@Nullable Color initialColor);

3
src/main/java/com/weis/darklaf/ui/colorchooser/ColorPreviewComponent.java

@ -6,6 +6,9 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
/**
* @author Jannis Weis
*/
final class ColorPreviewComponent extends JComponent {
private Color myColor;

26
src/main/java/com/weis/darklaf/ui/colorchooser/ColorValueFormatter.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import com.weis.darklaf.color.DarkColorModel;
@ -16,6 +39,9 @@ import java.text.ParseException;
import static java.util.Locale.ENGLISH;
/**
* @author Jannis Weis
*/
public final class ColorValueFormatter extends JFormattedTextField.AbstractFormatter implements FocusListener {
private final int fieldIndex;

23
src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheel.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;

5
src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelImageProducer.java

@ -1,9 +1,14 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
package com.weis.darklaf.ui.colorchooser;
import java.awt.*;
import java.awt.image.ColorModel;
import java.awt.image.MemoryImageSource;
/**
* @author pegov
* @author Konstantin Bulenkov
*/
public class ColorWheelImageProducer extends MemoryImageSource {
private final int[] myPixels;

28
src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelPanel.java

@ -1,3 +1,27 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import org.jetbrains.annotations.NotNull;
@ -6,6 +30,10 @@ import javax.swing.*;
import javax.swing.colorchooser.AbstractColorChooserPanel;
import java.awt.*;
/**
* @author pegov
* @author Konstantin Bulenkov
*/
public class ColorWheelPanel extends JPanel {
private final ColorWheel myColorWheel;
private final SlideComponent myBrightnessComponent;

32
src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserPanel.java

@ -1,3 +1,27 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import com.weis.darklaf.color.DarkColorModel;
@ -13,6 +37,11 @@ import javax.swing.event.AncestorEvent;
import java.awt.*;
import java.awt.event.KeyEvent;
/**
* @author pegov
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
public class DarkColorChooserPanel extends AbstractColorChooserPanel implements ColorListener {
private final ColorPipette pipette;
@ -354,7 +383,4 @@ public class DarkColorChooserPanel extends AbstractColorChooserPanel implements
}
}

26
src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import com.weis.darklaf.color.DarkColorModel;
@ -16,6 +39,9 @@ import javax.swing.plaf.basic.BasicColorChooserUI;
import java.awt.*;
import java.beans.PropertyChangeListener;
/**
* @author Jannis Weis
*/
public class DarkColorChooserUI extends BasicColorChooserUI {
private final PropertyChangeListener propertyChangeListener = e -> {

26
src/main/java/com/weis/darklaf/ui/colorchooser/DarkPreviewPanel.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import org.jetbrains.annotations.NotNull;
@ -6,6 +29,9 @@ import sun.swing.SwingUtilities2;
import javax.swing.*;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkPreviewPanel extends JPanel {
private static final int SQUARE_SIZE = 28;

26
src/main/java/com/weis/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import javax.accessibility.AccessibleContext;
@ -16,6 +39,9 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.Serializable;
/**
* @author Jannis Weis
*/
public class DarkSwatchesChooserPanel extends AbstractColorChooserPanel {

3
src/main/java/com/weis/darklaf/ui/colorchooser/MainSwatchPanel.java

@ -6,6 +6,9 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.awt.*;
/**
* @author Jannis Weis
*/
class MainSwatchPanel extends SwatchPanel {
protected void initValues() {

3
src/main/java/com/weis/darklaf/ui/colorchooser/RecentSwatchPanel.java

@ -7,6 +7,9 @@ import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.Objects;
/**
* @author Jannis Weis
*/
class RecentSwatchPanel extends SwatchPanel {
private Color defaultRecentColor;

25
src/main/java/com/weis/darklaf/ui/colorchooser/SlideComponent.java

@ -1,3 +1,27 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.colorchooser;
import com.weis.darklaf.components.alignment.Alignment;
@ -18,6 +42,7 @@ import java.util.function.Consumer;
/**
* @author Alexey Pegov
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
class SlideComponent extends JComponent {
private static final int OFFSET = 11;

3
src/main/java/com/weis/darklaf/ui/colorchooser/SwatchPanel.java

@ -16,6 +16,9 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* @author Jannis Weis
*/
abstract class SwatchPanel extends JPanel {
protected Color[] colors;

27
src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.combobox;
import com.weis.darklaf.components.ArrowButton;
@ -25,6 +48,10 @@ import java.awt.event.MouseListener;
import java.awt.geom.Area;
import java.awt.geom.RoundRectangle2D;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
public class DarkComboBoxUI extends BasicComboBoxUI implements Border {
private static final int BUTTON_PAD = 7;

26
src/main/java/com/weis/darklaf/ui/combobox/DarkComboPopup.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.combobox;
import com.weis.darklaf.components.OverlayScrollPane;
@ -8,6 +31,9 @@ import java.awt.*;
import java.awt.event.AdjustmentListener;
import java.awt.event.MouseEvent;
/**
* @author Jannis Weis
*/
public class DarkComboPopup extends BasicComboPopup {
private final AdjustmentListener adjustmentListener = e -> {

23
src/main/java/com/weis/darklaf/ui/html/DarkHTML.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.html;
import javax.swing.plaf.basic.BasicHTML;

3
src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconBorder.java

@ -7,6 +7,9 @@ import javax.swing.*;
import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkDesktopIconBorder extends MutableLineBorder implements UIResource {
public DarkDesktopIconBorder() {

3
src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconUI.java

@ -10,6 +10,9 @@ import java.awt.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
/**
* @author Jannis Weis
*/
public class DarkDesktopIconUI extends BasicDesktopIconUI {
public static ComponentUI createUI(final JComponent c) {

26
src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameBorder.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.internalframe;
import com.weis.darklaf.components.border.DropShadowBorder;
@ -8,6 +31,9 @@ import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkInternalFrameBorder extends DropShadowBorder implements UIResource {
public DarkInternalFrameBorder() {

3
src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java

@ -12,6 +12,9 @@ import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
import java.awt.*;
import java.beans.PropertyChangeListener;
/**
* @author Jannis Weis
*/
public class DarkInternalFrameTitlePane extends BasicInternalFrameTitlePane {
protected static final int PAD = 5;
protected static final int BAR_HEIGHT = (int) (56 / GraphicsUtil.SCALE_Y);

26
src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.internalframe;
import org.jetbrains.annotations.Contract;
@ -8,6 +31,9 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkInternalFrameUI extends BasicInternalFrameUI {
@NotNull

3
src/main/java/com/weis/darklaf/ui/label/DarkLabelUI.java

@ -6,6 +6,9 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicLabelUI;
/**
* @author Jannis Weis
*/
public class DarkLabelUI extends BasicLabelUI {
protected static final DarkLabelUI darkLabelUI = new DarkLabelUI();

3
src/main/java/com/weis/darklaf/ui/list/DarkListCellBorder.java

@ -2,5 +2,8 @@ package com.weis.darklaf.ui.list;
import com.weis.darklaf.ui.cell.DarkCellBorder;
/**
* @author Jannis Weis
*/
public class DarkListCellBorder extends DarkCellBorder {
}

3
src/main/java/com/weis/darklaf/ui/list/DarkListUI.java

@ -7,6 +7,9 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicListUI;
/**
* @author Jannis Weis
*/
public class DarkListUI extends BasicListUI {
@NotNull

26
src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarBorder.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import org.jetbrains.annotations.NotNull;
@ -8,6 +31,9 @@ import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkMenuBarBorder implements Border, UIResource {
@Override

43
src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarUI.java

@ -0,0 +1,43 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import javax.swing.plaf.metal.MetalMenuBarUI;
import java.awt.*;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
*/
public class DarkMenuBarUI extends MetalMenuBarUI {
@Override
public void paint(@NotNull final Graphics g, @NotNull final JComponent c) {
g.setColor(UIManager.getColor("MenuItem.background"));
g.fillRect(0, 0, c.getWidth(), c.getHeight());
}
}

26
src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemBorder.java

@ -1,7 +1,33 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import javax.swing.plaf.BorderUIResource;
/**
* @author Jannis Weis
*/
public class DarkMenuItemBorder extends BorderUIResource.EmptyBorderUIResource {
public DarkMenuItemBorder() {

25
src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemUIBase.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import com.weis.darklaf.util.DarkUIUtil;
@ -27,8 +50,8 @@ import java.beans.PropertyChangeListener;
import java.util.Objects;
/**
* @author Konstantin Bulenkov
* @author Jannis Weis
* @since 2019
*/
public class DarkMenuItemUIBase extends BasicMenuItemUI {

26
src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuBorder.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import com.weis.darklaf.components.border.MutableLineBorder;
@ -9,10 +32,7 @@ import javax.swing.plaf.UIResource;
import java.awt.*;
/**
* Custom border in darcula style for Popup menu.
*
* @author Jannis Weis
* @since 2018
*/
public class DarkPopupMenuBorder extends MutableLineBorder implements UIResource {

26
src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import com.weis.darklaf.ui.separator.DarkSeparatorUI;
@ -8,6 +31,9 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import java.awt.*;
/**
* @author Jannis Weis
*/
public class DarkPopupMenuSeparatorUI extends DarkSeparatorUI {
@NotNull

25
src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuUI.java

@ -1,3 +1,26 @@
/*
* MIT License
*
* Copyright (c) 2019 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.weis.darklaf.ui.menu;
import org.jetbrains.annotations.Contract;
@ -27,6 +50,8 @@ import java.util.List;
* This implementation for PopupMenuUI is almost identical to the one of BasicPopupMenuUI.
* The key difference is that it allows components to specify HIDE_POPUP_KEY and set a property to prevent
* scroll events from closing a popup. This allows for more versatile PopupComponents.
*
* @author Jannis Weis
*/
public class DarkPopupMenuUI extends BasicPopupMenuUI {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save