diff --git a/.gitignore b/.gitignore index 8f468ec3..ea767709 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ venv/ # Windows Thumbs.db /.recommenders/ +/key.gpg diff --git a/build.gradle b/build.gradle index 1d449bfe..3953f81d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ plugins { id 'com.github.johnrengelman.shadow' version '5.1.0' id 'java' id 'maven-publish' + id 'signing' id 'idea' id 'cpp' } @@ -25,26 +26,61 @@ dependencies { testCompile 'org.swinglabs:swingx:1.6.1' } - -group = 'com.weis' -version = '1.3' - task sourceJar(type: Jar, dependsOn: classes) { classifier 'sources' from sourceSets.main.allSource } +artifacts { + archives jar + archives sourceJar +} + +signing { + sign configurations.archives +} publishing { publications { - maven(MavenPublication) { + mavenJava(MavenPublication) { + customizePom(pom) + groupId = 'com.github.weisj' + artifactId 'darklaf' + version = '1.3' + from components.java - artifact tasks.sourceJar + + // create the sign pom artifact + pom.withXml { + def pomFile = file("${project.buildDir}/generated-pom.xml") + writeTo(pomFile) + def pomAscFile = signing.sign(pomFile).signatureFiles[0] + artifact(pomAscFile) { + classifier = null + extension = 'pom.asc' + } + } + + artifact(sourceJar) { + classifier = 'sources' + } + + // create the signed artifacts + project.tasks.signArchives.signatureFiles.each { + artifact(it) { + def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/ + if (matcher.find()) { + classifier = matcher.group(1) + } else { + classifier = null + } + extension = 'jar.asc' + } + } } } repositories { maven { - name 'deploy' url deployRepoUrl credentials { username = deployRepoUsername @@ -54,26 +90,81 @@ publishing { } } -println "Building on OS: " + System.properties['os.name'] -println "Using JDK: " + System.properties['java.home'] +def customizePom(pom) { + pom.withXml { + def root = asNode() -model { - platforms { - x86 { - architecture 'x86' + // eliminate test-scoped dependencies (no need in maven central POMs) + root.dependencies.removeAll { dep -> + dep.scope == "test" } - x64 { - architecture 'x86_64' + + // add all items necessary for maven central publication + root.children().last() + { + resolveStrategy = DELEGATE_FIRST + + description 'A themeable Look and Feel for java swing.' + name 'Darklaf' + url 'https://github.com/mautini/schemaorg-java' + organization { + name 'com.github.weisj' + url 'https://github.com/weisj' + } + issueManagement { + system 'GitHub' + url 'https://github.com/weisJ/darklaf/issues' + } + licenses { + license { + name 'MIT' + url 'https://github.com/weisJ/darklaf/blob/master/licence/LICENSE' + distribution 'repo' + } + } + scm { + url 'https://github.com/weisJ/darklaf' + connection 'scm:git:git://github.com/weisJ/darklaf.git' + developerConnection 'scm:git:ssh://git@github.com:weisj/darklaf.git' + } + developers { + developer { + name 'Jannis Weis' + } + } } } } +model { + tasks.generatePomFileForMavenJavaPublication { + destination = file("$buildDir/generated-pom.xml") + } + tasks.publishMavenJavaPublicationToMavenLocal { + dependsOn project.tasks.signArchives + } + tasks.publishMavenJavaPublicationToMavenRepository { + dependsOn project.tasks.signArchives + } +} + +println "Building on OS: " + System.properties['os.name'] +println "Using JDK: " + System.properties['java.home'] + + compileJava { sourceCompatibility = 11 targetCompatibility = 11 } model { + platforms { + x86 { + architecture 'x86' + } + x64 { + architecture 'x86_64' + } + } components { jniplatform(NativeLibrarySpec) { targetPlatform "x86" diff --git a/darklaf.iml b/darklaf.iml index 036d1459..262850f0 100644 --- a/darklaf.iml +++ b/darklaf.iml @@ -1,5 +1,5 @@ - + diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index f435f9f0..00000000 --- a/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -org.gradle.warning.mode = all -externalVersion = 1.0-SNAPSHOT -deployRepoUrl = https://my-repo.com/maven-snapshots -deployRepoUsername = your-username -deployRepoPassword = your-password \ No newline at end of file diff --git a/src/jniplatform/cpp/JNIDecorations.cpp b/src/jniplatform/cpp/JNIDecorations.cpp index 7dd05e57..aaa4526e 100644 --- a/src/jniplatform/cpp/JNIDecorations.cpp +++ b/src/jniplatform/cpp/JNIDecorations.cpp @@ -22,7 +22,7 @@ * SOFTWARE. */ #include "JNIDecorations.h"; -#include "com_weis_darklaf_platform_windows_JNIDecorations.h" +#include "com_github_weisj_darklaf_platform_windows_JNIDecorations.h" #include #include #include @@ -120,7 +120,7 @@ LRESULT CALLBACK WindowWrapper::WindowProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env, jclass obj, jlong hwnd, jboolean res) +JJava_com_github_weisj_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env, jclass obj, jlong hwnd, jboolean res) { HWND handle = reinterpret_cast(hwnd); auto wrap = wrapper_map[handle]; @@ -131,7 +131,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_setResizable(JNIEnv *env, } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env, jclass obj, jlong hwnd, +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env, jclass obj, jlong hwnd, jint l, jint r, jint h) { HWND handle = reinterpret_cast(hwnd); @@ -145,7 +145,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_updateValues(JNIEnv *env, } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env, jclass obj, jlong hwnd, jint r, jint g, jint b) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env, jclass obj, jlong hwnd, jint r, jint g, jint b) { HWND handle = reinterpret_cast(hwnd); auto wrap = wrapper_map[handle]; @@ -156,7 +156,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_setBackground(JNIEnv *env, } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv *env, jclass obj, jlong hwnd) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv *env, jclass obj, jlong hwnd) { HWND handle = reinterpret_cast(hwnd); @@ -184,7 +184,7 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_installDecorations(JNIEnv } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEnv *env, jclass obj, jlong hwnd) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEnv *env, jclass obj, jlong hwnd) { HWND handle = reinterpret_cast(hwnd); auto wrap = wrapper_map[handle]; @@ -199,21 +199,21 @@ Java_com_weis_darklaf_platform_windows_JNIDecorations_uninstallDecorations(JNIEn //Window functions. JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_minimize(JNIEnv *env, jclass obj, jlong hwnd) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_minimize(JNIEnv *env, jclass obj, jlong hwnd) { HWND handle = reinterpret_cast(hwnd); ShowWindow(handle, SW_MINIMIZE); } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_maximize(JNIEnv *env, jclass obj, jlong hwnd) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_maximize(JNIEnv *env, jclass obj, jlong hwnd) { HWND handle = reinterpret_cast(hwnd); ShowWindow(handle, SW_MAXIMIZE); } JNIEXPORT void JNICALL -Java_com_weis_darklaf_platform_windows_JNIDecorations_restore(JNIEnv *env, jclass obj, jlong hwnd) +Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_restore(JNIEnv *env, jclass obj, jlong hwnd) { HWND handle = reinterpret_cast(hwnd); ShowWindow(handle, SW_RESTORE); diff --git a/src/jniplatform/cpp/com_github_weisj_darklaf_platform_windows_JNIDecorations.h b/src/jniplatform/cpp/com_github_weisj_darklaf_platform_windows_JNIDecorations.h new file mode 100644 index 00000000..9c64201f --- /dev/null +++ b/src/jniplatform/cpp/com_github_weisj_darklaf_platform_windows_JNIDecorations.h @@ -0,0 +1,77 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class com_github_weisj_darklaf_platform_windows_JNIDecorations */ + +#ifndef _Included_com_github_weisj_darklaf_platform_windows_JNIDecorations +#define _Included_com_github_weisj_darklaf_platform_windows_JNIDecorations +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: updateValues + * Signature: (JIII)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_updateValues + (JNIEnv *, jclass, jlong, jint, jint, jint); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: setResizable + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_setResizable + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: setBackground + * Signature: (JIII)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_setBackground + (JNIEnv *, jclass, jlong, jint, jint, jint); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: minimize + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_minimize + (JNIEnv *, jclass, jlong); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: maximize + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_maximize + (JNIEnv *, jclass, jlong); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: restore + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_restore + (JNIEnv *, jclass, jlong); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: installDecorations + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_installDecorations + (JNIEnv *, jclass, jlong); + +/* + * Class: com_github_weisj_darklaf_platform_windows_JNIDecorations + * Method: uninstallDecorations + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_com_github_weisj_darklaf_platform_windows_JNIDecorations_uninstallDecorations + (JNIEnv *, jclass, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/jniplatform/cpp/com_weis_darklaf_platform_windows_JNIDecorations.h b/src/jniplatform/cpp/com_weis_darklaf_platform_windows_JNIDecorations.h deleted file mode 100644 index 5ec6dc86..00000000 --- a/src/jniplatform/cpp/com_weis_darklaf_platform_windows_JNIDecorations.h +++ /dev/null @@ -1,77 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class com_weis_darklaf_platform_windows_JNIDecorations */ - -#ifndef _Included_com_weis_darklaf_platform_windows_JNIDecorations -#define _Included_com_weis_darklaf_platform_windows_JNIDecorations -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: updateValues - * Signature: (JIII)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_updateValues - (JNIEnv *, jclass, jlong, jint, jint, jint); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: setResizable - * Signature: (JZ)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_setResizable - (JNIEnv *, jclass, jlong, jboolean); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: setBackground - * Signature: (JIII)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_setBackground - (JNIEnv *, jclass, jlong, jint, jint, jint); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: minimize - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_minimize - (JNIEnv *, jclass, jlong); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: maximize - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_maximize - (JNIEnv *, jclass, jlong); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: restore - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_restore - (JNIEnv *, jclass, jlong); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: installDecorations - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_installDecorations - (JNIEnv *, jclass, jlong); - -/* - * Class: com_weis_darklaf_platform_windows_JNIDecorations - * Method: uninstallDecorations - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_com_weis_darklaf_platform_windows_JNIDecorations_uninstallDecorations - (JNIEnv *, jclass, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/main/java/com/weis/darklaf/DarkLaf.java b/src/main/java/com/github/weisj/darklaf/DarkLaf.java similarity index 97% rename from src/main/java/com/weis/darklaf/DarkLaf.java rename to src/main/java/com/github/weisj/darklaf/DarkLaf.java index 4ebdd6f2..165a6b6c 100644 --- a/src/main/java/com/weis/darklaf/DarkLaf.java +++ b/src/main/java/com/github/weisj/darklaf/DarkLaf.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf; +package com.github.weisj.darklaf; -import com.weis.darklaf.platform.windows.JNIDecorations; -import com.weis.darklaf.theme.Theme; -import com.weis.darklaf.ui.menu.DarkPopupMenuUI; -import com.weis.darklaf.util.PropertyLoader; -import com.weis.darklaf.util.SystemInfo; +import com.github.weisj.darklaf.platform.windows.JNIDecorations; +import com.github.weisj.darklaf.theme.Theme; +import com.github.weisj.darklaf.ui.menu.DarkPopupMenuUI; +import com.github.weisj.darklaf.util.PropertyLoader; +import com.github.weisj.darklaf.util.SystemInfo; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.awt.AppContext; @@ -94,12 +94,6 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener } } - @NotNull - @Override - public String getName() { - return NAME; - } - @Override public UIDefaults getDefaults() { try { @@ -129,6 +123,12 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener return super.getDefaults(); } + @NotNull + @Override + public String getName() { + return NAME; + } + @SuppressWarnings({"HardCodedStringLiteral"}) private static void initInputMapDefaults(@NotNull final UIDefaults defaults) { // Make ENTER work in JTrees @@ -167,12 +167,6 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener } } - @NotNull - @Override - public String getID() { - return getName(); - } - private void loadThemeDefaults(@NotNull final UIDefaults defaults) { var uiProps = new Properties(); final Theme currentTheme = LafManager.getTheme(); @@ -188,82 +182,6 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener setDecorationsEnabled(currentTheme.useCustomDecorations()); } - private static void patchComboBox(@NotNull final UIDefaults metalDefaults, @NotNull final UIDefaults defaults) { - defaults.remove("ComboBox.ancestorInputMap"); - defaults.remove("ComboBox.actionMap"); - defaults.put("ComboBox.ancestorInputMap", metalDefaults.get("ComboBox.ancestorInputMap")); - defaults.put("ComboBox.actionMap", metalDefaults.get("ComboBox.actionMap")); - } - - @NotNull - @Override - public String getDescription() { - return "Dark Look and feel based on Darcula-LAF"; - } - - private static void installCutCopyPasteShortcuts(@NotNull final InputMap inputMap, - final boolean useSimpleActionKeys) { - final String copyActionKey = useSimpleActionKeys ? "copy" : DefaultEditorKit.copyAction; - final String pasteActionKey = useSimpleActionKeys ? "paste" : DefaultEditorKit.pasteAction; - final String cutActionKey = useSimpleActionKeys ? "cut" : DefaultEditorKit.cutAction; - // Ctrl+Ins, Shift+Ins, Shift+Del - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.CTRL_DOWN_MASK), copyActionKey); - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.SHIFT_DOWN_MASK), pasteActionKey); - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.SHIFT_DOWN_MASK), cutActionKey); - // Ctrl+C, Ctrl+V, Ctrl+X - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK), copyActionKey); - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK), pasteActionKey); - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction); - } - - private void installGlobals(@NotNull final Properties uiProps, final UIDefaults defaults) { - final HashMap globalSettings = new HashMap<>(); - final String prefix = "global."; - for (final Object key : uiProps.keySet()) { - if (key instanceof String && ((String) key).startsWith(prefix)) { - globalSettings.put(((String) key).substring(prefix.length()), uiProps.get(key)); - } - } - - for (final Object key : defaults.keySet()) { - if (key instanceof String && ((String) key).contains(".")) { - final String s = (String) key; - final String globalKey = s.substring(s.lastIndexOf('.') + 1); - if (globalSettings.containsKey(globalKey)) { - defaults.put(key, globalSettings.get(globalKey)); - } - } - } - } - - @Override - public boolean isNativeLookAndFeel() { - return true; - } - - @Override - public void initialize() { - call("initialize"); - PropertyLoader.reset(); - UIManager.addPropertyChangeListener(this); - } - @Override - public void uninitialize() { - call("uninitialize"); - AppContext context = AppContext.getAppContext(); - synchronized (DarkPopupMenuUI.MOUSE_GRABBER_KEY) { - Object grabber = context.get(DarkPopupMenuUI.MOUSE_GRABBER_KEY); - if (grabber != null) { - ((DarkPopupMenuUI.MouseGrabber) grabber).uninstall(); - } - } - } - - @Override - public boolean isSupportedLookAndFeel() { - return true; - } - @SuppressWarnings({"HardCodedStringLiteral"}) private void initIdeaDefaults(@NotNull final UIDefaults defaults) { defaults.put("Table.ancestorInputMap", new UIDefaults.LazyInputMap( @@ -320,43 +238,93 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener })); } + @NotNull @Override - protected void initClassDefaults(final UIDefaults defaults) { - callInit("initClassDefaults", defaults); + public String getID() { + return getName(); } - @Override - protected void initSystemColorDefaults(final UIDefaults defaults) { - callInit("initSystemColorDefaults", defaults); + private static void patchComboBox(@NotNull final UIDefaults metalDefaults, @NotNull final UIDefaults defaults) { + defaults.remove("ComboBox.ancestorInputMap"); + defaults.remove("ComboBox.actionMap"); + defaults.put("ComboBox.ancestorInputMap", metalDefaults.get("ComboBox.ancestorInputMap")); + defaults.put("ComboBox.actionMap", metalDefaults.get("ComboBox.actionMap")); } - public void initComponentDefaults(final UIDefaults defaults) { - callInit("initComponentDefaults", defaults); + private static void installCutCopyPasteShortcuts(@NotNull final InputMap inputMap, + final boolean useSimpleActionKeys) { + final String copyActionKey = useSimpleActionKeys ? "copy" : DefaultEditorKit.copyAction; + final String pasteActionKey = useSimpleActionKeys ? "paste" : DefaultEditorKit.pasteAction; + final String cutActionKey = useSimpleActionKeys ? "cut" : DefaultEditorKit.cutAction; + // Ctrl+Ins, Shift+Ins, Shift+Del + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.CTRL_DOWN_MASK), copyActionKey); + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, InputEvent.SHIFT_DOWN_MASK), pasteActionKey); + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.SHIFT_DOWN_MASK), cutActionKey); + // Ctrl+C, Ctrl+V, Ctrl+X + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK), copyActionKey); + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK), pasteActionKey); + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK), DefaultEditorKit.cutAction); } - @Override - public boolean getSupportsWindowDecorations() { - return LafManager.getTheme().useCustomDecorations() - && JNIDecorations.isCustomDecorationSupported(); - } + private void installGlobals(@NotNull final Properties uiProps, final UIDefaults defaults) { + final HashMap globalSettings = new HashMap<>(); + final String prefix = "global."; + for (final Object key : uiProps.keySet()) { + if (key instanceof String && ((String) key).startsWith(prefix)) { + globalSettings.put(((String) key).substring(prefix.length()), uiProps.get(key)); + } + } - @Override - public void propertyChange(@NotNull final PropertyChangeEvent evt) { - if ("lookAndFeel".equals(evt.getPropertyName())) { - if (UIManager.getLookAndFeel() == this) { - PropertyLoader.finish(); + for (final Object key : defaults.keySet()) { + if (key instanceof String && ((String) key).contains(".")) { + final String s = (String) key; + final String globalKey = s.substring(s.lastIndexOf('.') + 1); + if (globalSettings.containsKey(globalKey)) { + defaults.put(key, globalSettings.get(globalKey)); + } } - UIManager.removePropertyChangeListener(this); } } + @NotNull + @Override + public String getDescription() { + return "Dark Look and feel based on Darcula-LAF"; + } + @Override + public void initialize() { + call("initialize"); + PropertyLoader.reset(); + UIManager.addPropertyChangeListener(this); + } + @Override + public void uninitialize() { + call("uninitialize"); + AppContext context = AppContext.getAppContext(); + synchronized (DarkPopupMenuUI.MOUSE_GRABBER_KEY) { + Object grabber = context.get(DarkPopupMenuUI.MOUSE_GRABBER_KEY); + if (grabber != null) { + ((DarkPopupMenuUI.MouseGrabber) grabber).uninstall(); + } + } + } + @Override + protected void initClassDefaults(final UIDefaults defaults) { + callInit("initClassDefaults", defaults); + } + @Override + public boolean isNativeLookAndFeel() { + return true; + } - - + @Override + protected void initSystemColorDefaults(final UIDefaults defaults) { + callInit("initSystemColorDefaults", defaults); + } @Override protected void loadSystemColors(final UIDefaults defaults, final String[] systemColors, @@ -371,7 +339,14 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener } } + public void initComponentDefaults(final UIDefaults defaults) { + callInit("initComponentDefaults", defaults); + } + @Override + public boolean isSupportedLookAndFeel() { + return true; + } private void callInit(@NotNull final String method, final UIDefaults defaults) { try { @@ -393,5 +368,22 @@ public class DarkLaf extends BasicLookAndFeel implements PropertyChangeListener } } + @Override + public void propertyChange(@NotNull final PropertyChangeEvent evt) { + if ("lookAndFeel".equals(evt.getPropertyName())) { + if (UIManager.getLookAndFeel() == this) { + PropertyLoader.finish(); + } + UIManager.removePropertyChangeListener(this); + } + } + + + @Override + public boolean getSupportsWindowDecorations() { + return LafManager.getTheme().useCustomDecorations() + && JNIDecorations.isCustomDecorationSupported(); + } + } diff --git a/src/main/java/com/weis/darklaf/DarkLafInfo.java b/src/main/java/com/github/weisj/darklaf/DarkLafInfo.java similarity index 97% rename from src/main/java/com/weis/darklaf/DarkLafInfo.java rename to src/main/java/com/github/weisj/darklaf/DarkLafInfo.java index 0c9ba865..ce06a20b 100644 --- a/src/main/java/com/weis/darklaf/DarkLafInfo.java +++ b/src/main/java/com/github/weisj/darklaf/DarkLafInfo.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf; +package com.github.weisj.darklaf; import javax.swing.*; diff --git a/src/main/java/com/github/weisj/darklaf/DarkMetalTheme.java b/src/main/java/com/github/weisj/darklaf/DarkMetalTheme.java new file mode 100644 index 00000000..296c4818 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/DarkMetalTheme.java @@ -0,0 +1,36 @@ +/* + * 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.github.weisj.darklaf; + +import javax.swing.plaf.metal.DefaultMetalTheme; + +/** + * @author Jannis Weis + */ +public class DarkMetalTheme extends DefaultMetalTheme { + public String getName() { + return "Darcula theme"; + } +} + diff --git a/src/main/java/com/weis/darklaf/LafManager.java b/src/main/java/com/github/weisj/darklaf/LafManager.java similarity index 94% rename from src/main/java/com/weis/darklaf/LafManager.java rename to src/main/java/com/github/weisj/darklaf/LafManager.java index e7a45f72..2bf06a60 100644 --- a/src/main/java/com/weis/darklaf/LafManager.java +++ b/src/main/java/com/github/weisj/darklaf/LafManager.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf; +package com.github.weisj.darklaf; -import com.weis.darklaf.theme.DarculaTheme; -import com.weis.darklaf.theme.IntelliJTheme; -import com.weis.darklaf.theme.Theme; +import com.github.weisj.darklaf.theme.DarculaTheme; +import com.github.weisj.darklaf.theme.IntelliJTheme; +import com.github.weisj.darklaf.theme.Theme; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -62,7 +62,7 @@ public final class LafManager { LogManager.getLogManager().reset(); } else { try (InputStream inputStream = DarkLaf.class.getClassLoader() - .getResourceAsStream("com/weis/darklaf/log/logging.properties")) { + .getResourceAsStream("com/github/weisj/darklaf/log/logging.properties")) { if (inputStream != null) { LogManager.getLogManager().readConfiguration(inputStream); } diff --git a/src/main/java/com/weis/darklaf/color/DarkColorModel.java b/src/main/java/com/github/weisj/darklaf/color/DarkColorModel.java similarity index 98% rename from src/main/java/com/weis/darklaf/color/DarkColorModel.java rename to src/main/java/com/github/weisj/darklaf/color/DarkColorModel.java index 31d91d62..4fd7dc23 100644 --- a/src/main/java/com/weis/darklaf/color/DarkColorModel.java +++ b/src/main/java/com/github/weisj/darklaf/color/DarkColorModel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.color; +package com.github.weisj.darklaf.color; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/color/DarkColorModelCMYK.java b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelCMYK.java similarity index 98% rename from src/main/java/com/weis/darklaf/color/DarkColorModelCMYK.java rename to src/main/java/com/github/weisj/darklaf/color/DarkColorModelCMYK.java index 8f7d7ace..0b73243b 100644 --- a/src/main/java/com/weis/darklaf/color/DarkColorModelCMYK.java +++ b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelCMYK.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.color; +package com.github.weisj.darklaf.color; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/color/DarkColorModelHSB.java b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSB.java similarity index 99% rename from src/main/java/com/weis/darklaf/color/DarkColorModelHSB.java rename to src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSB.java index c5165d14..fed83cb1 100644 --- a/src/main/java/com/weis/darklaf/color/DarkColorModelHSB.java +++ b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSB.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.color; +package com.github.weisj.darklaf.color; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/color/DarkColorModelHSL.java b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSL.java similarity index 99% rename from src/main/java/com/weis/darklaf/color/DarkColorModelHSL.java rename to src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSL.java index 043e1bd3..39ecef3a 100644 --- a/src/main/java/com/weis/darklaf/color/DarkColorModelHSL.java +++ b/src/main/java/com/github/weisj/darklaf/color/DarkColorModelHSL.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.color; +package com.github.weisj.darklaf.color; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/ArrowButton.java b/src/main/java/com/github/weisj/darklaf/components/ArrowButton.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/ArrowButton.java rename to src/main/java/com/github/weisj/darklaf/components/ArrowButton.java index f4ee8f53..4444f995 100644 --- a/src/main/java/com/weis/darklaf/components/ArrowButton.java +++ b/src/main/java/com/github/weisj/darklaf/components/ArrowButton.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; -import com.weis.darklaf.icons.UIAwareIcon; +import com.github.weisj.darklaf.icons.UIAwareIcon; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/ClosableTabComponent.java b/src/main/java/com/github/weisj/darklaf/components/ClosableTabComponent.java similarity index 69% rename from src/main/java/com/weis/darklaf/components/ClosableTabComponent.java rename to src/main/java/com/github/weisj/darklaf/components/ClosableTabComponent.java index daee8f2d..8638762b 100644 --- a/src/main/java/com/weis/darklaf/components/ClosableTabComponent.java +++ b/src/main/java/com/github/weisj/darklaf/components/ClosableTabComponent.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.components; +/* + * 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.github.weisj.darklaf.components; -import com.weis.darklaf.ui.tabbedpane.DarkTabbedPaneUI; +import com.github.weisj.darklaf.ui.tabbedpane.DarkTabbedPaneUI; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/ClosableTabbedPane.java b/src/main/java/com/github/weisj/darklaf/components/ClosableTabbedPane.java similarity index 71% rename from src/main/java/com/weis/darklaf/components/ClosableTabbedPane.java rename to src/main/java/com/github/weisj/darklaf/components/ClosableTabbedPane.java index 73aa5b11..30942cbb 100644 --- a/src/main/java/com/weis/darklaf/components/ClosableTabbedPane.java +++ b/src/main/java/com/github/weisj/darklaf/components/ClosableTabbedPane.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.components; +/* + * 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.github.weisj.darklaf.components; import org.jetbrains.annotations.NotNull; @@ -23,14 +46,6 @@ public class ClosableTabbedPane extends JTabbedPane { notifyTabListeners(new TabEvent(this, TabEvent.TAB_OPENED, "tabOpened", index)); } - @Override - public void setTabComponentAt(final int index, final Component component) { - if (component instanceof ClosableTabComponent) { - ((ClosableTabComponent) component).setTabbedPane(this); - } - super.setTabComponentAt(index, component); - } - @Override public void removeTabAt(final int index) { checkIndex(index); @@ -42,6 +57,14 @@ public class ClosableTabbedPane extends JTabbedPane { super.removeTabAt(index); } + @Override + public void setTabComponentAt(final int index, final Component component) { + if (component instanceof ClosableTabComponent) { + ((ClosableTabComponent) component).setTabbedPane(this); + } + super.setTabComponentAt(index, component); + } + private void checkIndex(final int index) { int tabCount = getTabCount(); if (index < 0 || index >= tabCount) { diff --git a/src/main/java/com/weis/darklaf/components/ColorPipetteBase.java b/src/main/java/com/github/weisj/darklaf/components/ColorPipetteBase.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/ColorPipetteBase.java rename to src/main/java/com/github/weisj/darklaf/components/ColorPipetteBase.java index 6b81756f..b3afd540 100644 --- a/src/main/java/com/weis/darklaf/components/ColorPipetteBase.java +++ b/src/main/java/com/github/weisj/darklaf/components/ColorPipetteBase.java @@ -1,4 +1,3 @@ -// 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 * @@ -22,12 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; -import com.weis.darklaf.ui.colorchooser.ColorListener; -import com.weis.darklaf.ui.colorchooser.ColorPipette; -import com.weis.darklaf.util.DarkUIUtil; + +import com.github.weisj.darklaf.ui.colorchooser.ColorListener; +import com.github.weisj.darklaf.ui.colorchooser.ColorPipette; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/components/DefaultColorPipette.java b/src/main/java/com/github/weisj/darklaf/components/DefaultColorPipette.java similarity index 84% rename from src/main/java/com/weis/darklaf/components/DefaultColorPipette.java rename to src/main/java/com/github/weisj/darklaf/components/DefaultColorPipette.java index b11c49a8..4c1974f4 100644 --- a/src/main/java/com/weis/darklaf/components/DefaultColorPipette.java +++ b/src/main/java/com/github/weisj/darklaf/components/DefaultColorPipette.java @@ -1,9 +1,31 @@ -// 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; -import com.weis.darklaf.util.GraphicsUtil; -import com.weis.darklaf.util.TimerUtil; +/* + * 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.github.weisj.darklaf.components; + +import com.github.weisj.darklaf.ui.colorchooser.ColorListener; +import com.github.weisj.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.util.TimerUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/components/Disposable.java b/src/main/java/com/github/weisj/darklaf/components/Disposable.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/Disposable.java rename to src/main/java/com/github/weisj/darklaf/components/Disposable.java index b850cafd..6cced25a 100644 --- a/src/main/java/com/weis/darklaf/components/Disposable.java +++ b/src/main/java/com/github/weisj/darklaf/components/Disposable.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; public interface Disposable { diff --git a/src/main/java/com/weis/darklaf/components/JXPopupMenu.java b/src/main/java/com/github/weisj/darklaf/components/JXPopupMenu.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/JXPopupMenu.java rename to src/main/java/com/github/weisj/darklaf/components/JXPopupMenu.java index b3c28454..93b1ee60 100644 --- a/src/main/java/com/weis/darklaf/components/JXPopupMenu.java +++ b/src/main/java/com/github/weisj/darklaf/components/JXPopupMenu.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jdesktop.jxlayer.JXLayer; import org.pbjar.jxlayer.plaf.ext.TransformUI; diff --git a/src/main/java/com/weis/darklaf/components/SelectableTreeNode.java b/src/main/java/com/github/weisj/darklaf/components/SelectableTreeNode.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/SelectableTreeNode.java rename to src/main/java/com/github/weisj/darklaf/components/SelectableTreeNode.java index cfe9e746..42d54764 100644 --- a/src/main/java/com/weis/darklaf/components/SelectableTreeNode.java +++ b/src/main/java/com/github/weisj/darklaf/components/SelectableTreeNode.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/main/java/com/weis/darklaf/components/ShadowButton.java b/src/main/java/com/github/weisj/darklaf/components/ShadowButton.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/ShadowButton.java rename to src/main/java/com/github/weisj/darklaf/components/ShadowButton.java index 2084e249..4835eaef 100644 --- a/src/main/java/com/weis/darklaf/components/ShadowButton.java +++ b/src/main/java/com/github/weisj/darklaf/components/ShadowButton.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components; +package com.github.weisj.darklaf.components; import javax.swing.*; diff --git a/src/main/java/com/github/weisj/darklaf/components/TabEvent.java b/src/main/java/com/github/weisj/darklaf/components/TabEvent.java new file mode 100644 index 00000000..1de29c5b --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/components/TabEvent.java @@ -0,0 +1,45 @@ +/* + * 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.github.weisj.darklaf.components; + +import java.awt.event.ActionEvent; + +/** + * @author Jannis Weis + */ +public class TabEvent extends ActionEvent { + + public static final int TAB_OPENED = 0; + public static final int TAB_CLOSED = 1; + private final int tabIndex; + + public TabEvent(final Object source, final int id, final String command, final int tabIndex) { + super(source, id, command); + this.tabIndex = tabIndex; + } + + public int getTabIndex() { + return tabIndex; + } +} diff --git a/src/main/java/com/github/weisj/darklaf/components/TabListener.java b/src/main/java/com/github/weisj/darklaf/components/TabListener.java new file mode 100644 index 00000000..d66ad20f --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/components/TabListener.java @@ -0,0 +1,36 @@ +/* + * 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.github.weisj.darklaf.components; + +import java.util.EventListener; + +/** + * @author Jannis Weis + */ +public interface TabListener extends EventListener { + + void tabOpened(TabEvent e); + + void tabClosed(TabEvent e); +} diff --git a/src/main/java/com/github/weisj/darklaf/components/TabPropertyChangeEvent.java b/src/main/java/com/github/weisj/darklaf/components/TabPropertyChangeEvent.java new file mode 100644 index 00000000..849aa14e --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/components/TabPropertyChangeEvent.java @@ -0,0 +1,44 @@ +/* + * 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.github.weisj.darklaf.components; + +import java.beans.PropertyChangeEvent; + +/** + * @author Jannis Weis + */ +public class TabPropertyChangeEvent extends PropertyChangeEvent { + + private final int index; + + public TabPropertyChangeEvent(final Object source, final String propertyName, + final Object oldValue, final Object newValue, final int index) { + super(source, propertyName, oldValue, newValue); + this.index = index; + } + + public int getIndex() { + return index; + } +} diff --git a/src/main/java/com/weis/darklaf/components/alignment/Alignment.java b/src/main/java/com/github/weisj/darklaf/components/alignment/Alignment.java similarity index 87% rename from src/main/java/com/weis/darklaf/components/alignment/Alignment.java rename to src/main/java/com/github/weisj/darklaf/components/alignment/Alignment.java index 5b7be4a1..5a810298 100644 --- a/src/main/java/com/weis/darklaf/components/alignment/Alignment.java +++ b/src/main/java/com/github/weisj/darklaf/components/alignment/Alignment.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.components.alignment; +/* + * 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.github.weisj.darklaf.components.alignment; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -6,7 +29,7 @@ import org.jetbrains.annotations.NotNull; import java.awt.*; import java.util.function.BiFunction; -import static com.weis.darklaf.components.alignment.AlignmentHelper.*; +import static com.github.weisj.darklaf.components.alignment.AlignmentHelper.*; /** * @author Jannis Weis diff --git a/src/main/java/com/weis/darklaf/components/alignment/AlignmentHelper.java b/src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentHelper.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/alignment/AlignmentHelper.java rename to src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentHelper.java index 32ae7726..2116f4e9 100644 --- a/src/main/java/com/weis/darklaf/components/alignment/AlignmentHelper.java +++ b/src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentHelper.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.alignment; +package com.github.weisj.darklaf.components.alignment; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/alignment/AlignmentStrategy.java b/src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentStrategy.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/alignment/AlignmentStrategy.java rename to src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentStrategy.java index dcd9617e..7c0dae13 100644 --- a/src/main/java/com/weis/darklaf/components/alignment/AlignmentStrategy.java +++ b/src/main/java/com/github/weisj/darklaf/components/alignment/AlignmentStrategy.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.alignment; +package com.github.weisj.darklaf.components.alignment; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/border/BubbleBorder.java b/src/main/java/com/github/weisj/darklaf/components/border/BubbleBorder.java similarity index 88% rename from src/main/java/com/weis/darklaf/components/border/BubbleBorder.java rename to src/main/java/com/github/weisj/darklaf/components/border/BubbleBorder.java index 2b3417e1..aa01d4ca 100644 --- a/src/main/java/com/weis/darklaf/components/border/BubbleBorder.java +++ b/src/main/java/com/github/weisj/darklaf/components/border/BubbleBorder.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.components.border; +/* + * 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.github.weisj.darklaf.components.border; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/border/DropShadowBorder.java b/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java similarity index 93% rename from src/main/java/com/weis/darklaf/components/border/DropShadowBorder.java rename to src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java index 2b0e5d86..e011e2fe 100644 --- a/src/main/java/com/weis/darklaf/components/border/DropShadowBorder.java +++ b/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.components.border; +/* + * 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.github.weisj.darklaf.components.border; -import com.weis.darklaf.util.ImageUtil; +import com.github.weisj.darklaf.util.ImageUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/border/MutableLineBorder.java b/src/main/java/com/github/weisj/darklaf/components/border/MutableLineBorder.java similarity index 61% rename from src/main/java/com/weis/darklaf/components/border/MutableLineBorder.java rename to src/main/java/com/github/weisj/darklaf/components/border/MutableLineBorder.java index 48238aef..7e81c20d 100644 --- a/src/main/java/com/weis/darklaf/components/border/MutableLineBorder.java +++ b/src/main/java/com/github/weisj/darklaf/components/border/MutableLineBorder.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.components.border; +/* + * 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.github.weisj.darklaf.components.border; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/JTabFrame.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/JTabFrame.java similarity index 99% rename from src/main/java/com/weis/darklaf/components/tabframe/JTabFrame.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/JTabFrame.java index ca54de08..41cc75c6 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/JTabFrame.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/JTabFrame.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.ui.tabframe.TabFrameTransferHandler; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.ui.tabframe.TabFrameTransferHandler; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -860,6 +860,15 @@ public class JTabFrame extends JComponent { this.transferIndex = index; } + /** + * Get the content pane. + * + * @return the content pane. + */ + public TabFrameContent getContentPane() { + return content; + } + /** * Returns whether the given tab is selected. * @@ -872,15 +881,6 @@ public class JTabFrame extends JComponent { return selectedIndices[a.ordinal()] == index; } - /** - * Get the content pane. - * - * @return the content pane. - */ - public TabFrameContent getContentPane() { - return content; - } - /** * Notify that a transfer has ended. */ diff --git a/src/main/java/com/weis/darklaf/components/tabframe/PanelPopup.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/PanelPopup.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/tabframe/PanelPopup.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/PanelPopup.java index 6af21d80..44083a45 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/PanelPopup.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/PanelPopup.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import org.jetbrains.annotations.Contract; import javax.swing.*; @@ -165,18 +165,6 @@ public class PanelPopup extends JPanel implements TabFramePopup { firePropertyChange("alignment", old, alignment); } - @Override - public int getIndex() { - return index; - } - - @Override - public void setIndex(final int index) { - int old = this.index; - this.index = index; - firePropertyChange("index", old, index); - } - @Override public void open() { if (parent != null && getAlignment() != null && getIndex() >= 0 @@ -212,4 +200,16 @@ public class PanelPopup extends JPanel implements TabFramePopup { this.icon = icon; firePropertyChange("icon", old, icon); } + + @Override + public int getIndex() { + return index; + } + + @Override + public void setIndex(final int index) { + int old = this.index; + this.index = index; + firePropertyChange("index", old, index); + } } diff --git a/src/main/java/com/weis/darklaf/components/tabframe/PopupContainer.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/PopupContainer.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/tabframe/PopupContainer.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/PopupContainer.java index f732dbc0..a8dec481 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/PopupContainer.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/PopupContainer.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; import javax.swing.*; import javax.swing.border.Border; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabArea.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabArea.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/tabframe/TabArea.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabArea.java index 2b1b425e..b2d170d1 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabArea.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabArea.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameContent.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContent.java similarity index 95% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameContent.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContent.java index 070b81ac..ee277d44 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameContent.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContent.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameContentPane.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContentPane.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameContentPane.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContentPane.java index 77c73945..fe718641 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameContentPane.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameContentPane.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.decorators.AncestorAdapter; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.decorators.AncestorAdapter; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -375,17 +375,6 @@ public class TabFrameContentPane extends JPanel implements TabFrameContent { return enabled; } - /** - * Get the popup component at the position. - * - * @param a the position. - * @return the popup component at position. - */ - @NotNull - public Component getPopupComponent(@NotNull final Alignment a) { - return getContainer(a).getPopup(); - } - @Override public PopupContainer getContainer(@NotNull final Alignment alignment) { PopupContainer popupComponent; @@ -420,6 +409,17 @@ public class TabFrameContentPane extends JPanel implements TabFrameContent { return popupComponent; } + /** + * Get the popup component at the position. + * + * @param a the position. + * @return the popup component at position. + */ + @NotNull + public Component getPopupComponent(@NotNull final Alignment a) { + return getContainer(a).getPopup(); + } + protected static class LayoutProportions { protected final double splitRestore; protected final double splitterPeerDisable; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFramePopup.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFramePopup.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFramePopup.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFramePopup.java index 89123c48..161e1710 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFramePopup.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFramePopup.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTab.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTab.java similarity index 95% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameTab.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTab.java index f90c9d18..d32fde2e 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTab.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTab.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabContainer.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabContainer.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabContainer.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabContainer.java index 55cb921b..708a04b2 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabContainer.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabContainer.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabLabel.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabLabel.java similarity index 95% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabLabel.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabLabel.java index d24e4d34..b422ec79 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameTabLabel.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameTabLabel.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.ui.tabframe.DarkTabFrameTabLabelUI; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.ui.tabframe.DarkTabFrameTabLabelUI; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameUI.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameUI.java similarity index 94% rename from src/main/java/com/weis/darklaf/components/tabframe/TabFrameUI.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameUI.java index ae6c06a4..d8b810d8 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabFrameUI.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabFrameUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import javax.swing.plaf.ComponentUI; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tabframe/TabbedPopup.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabbedPopup.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/tabframe/TabbedPopup.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/TabbedPopup.java index 82b3f28b..7ce712b9 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/TabbedPopup.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/TabbedPopup.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; import javax.swing.*; import java.awt.*; @@ -103,6 +103,11 @@ public class TabbedPopup extends PanelPopup { return tabbedPane; } + @Override + public String getUIClassID() { + return "TabFrameTabbedPopupUI"; + } + /** * Gets the currently selected component from the TabbedPane. {@see {@link #getTabbedPane()}}. * @@ -112,11 +117,6 @@ public class TabbedPopup extends PanelPopup { return tabbedPane.getSelectedComponent(); } - @Override - public String getUIClassID() { - return "TabFrameTabbedPopupUI"; - } - /** * Adds the component to the tabbed pane if it isn't already added. This method exists to conform the interface * methods. It is preferred to directly add to the TabbedPane obtained by {@link #getTabbedPane()}. diff --git a/src/main/java/com/weis/darklaf/components/tabframe/ToggleSplitPane.java b/src/main/java/com/github/weisj/darklaf/components/tabframe/ToggleSplitPane.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/tabframe/ToggleSplitPane.java rename to src/main/java/com/github/weisj/darklaf/components/tabframe/ToggleSplitPane.java index d4a5da07..0e5653e4 100644 --- a/src/main/java/com/weis/darklaf/components/tabframe/ToggleSplitPane.java +++ b/src/main/java/com/github/weisj/darklaf/components/tabframe/ToggleSplitPane.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tabframe; +package com.github.weisj.darklaf.components.tabframe; import javax.swing.*; import javax.swing.plaf.basic.BasicSplitPaneUI; @@ -110,18 +110,18 @@ public class ToggleSplitPane extends JSplitPane { } @Override - public int getDividerLocation() { + public int getLastDividerLocation() { if (resizable) { - return super.getDividerLocation(); + return super.getLastDividerLocation(); } else { return disabledMax == disabledPos ? getMaximumDividerLocation() : disabledPos; } } @Override - public int getLastDividerLocation() { + public int getDividerLocation() { if (resizable) { - return super.getLastDividerLocation(); + return super.getDividerLocation(); } else { return disabledMax == disabledPos ? getMaximumDividerLocation() : disabledPos; } diff --git a/src/main/java/com/weis/darklaf/components/text/SearchEvent.java b/src/main/java/com/github/weisj/darklaf/components/text/SearchEvent.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/text/SearchEvent.java rename to src/main/java/com/github/weisj/darklaf/components/text/SearchEvent.java index 11076cdf..b1f72e14 100644 --- a/src/main/java/com/weis/darklaf/components/text/SearchEvent.java +++ b/src/main/java/com/github/weisj/darklaf/components/text/SearchEvent.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.text; +package com.github.weisj.darklaf.components.text; import java.awt.event.ActionEvent; diff --git a/src/main/java/com/weis/darklaf/components/text/SearchListener.java b/src/main/java/com/github/weisj/darklaf/components/text/SearchListener.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/text/SearchListener.java rename to src/main/java/com/github/weisj/darklaf/components/text/SearchListener.java index 20b5ac46..998a0c2d 100644 --- a/src/main/java/com/weis/darklaf/components/text/SearchListener.java +++ b/src/main/java/com/github/weisj/darklaf/components/text/SearchListener.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.text; +package com.github.weisj.darklaf.components.text; import java.util.EventListener; diff --git a/src/main/java/com/weis/darklaf/components/text/SearchTextField.java b/src/main/java/com/github/weisj/darklaf/components/text/SearchTextField.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/text/SearchTextField.java rename to src/main/java/com/github/weisj/darklaf/components/text/SearchTextField.java index 2aa22b72..046d4b84 100644 --- a/src/main/java/com/weis/darklaf/components/text/SearchTextField.java +++ b/src/main/java/com/github/weisj/darklaf/components/text/SearchTextField.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.text; +package com.github.weisj.darklaf.components.text; import javax.swing.*; import javax.swing.text.Document; diff --git a/src/main/java/com/weis/darklaf/components/text/SearchTextFieldWithHistory.java b/src/main/java/com/github/weisj/darklaf/components/text/SearchTextFieldWithHistory.java similarity index 99% rename from src/main/java/com/weis/darklaf/components/text/SearchTextFieldWithHistory.java rename to src/main/java/com/github/weisj/darklaf/components/text/SearchTextFieldWithHistory.java index 3bbf67d7..9cf24b36 100644 --- a/src/main/java/com/weis/darklaf/components/text/SearchTextFieldWithHistory.java +++ b/src/main/java/com/github/weisj/darklaf/components/text/SearchTextFieldWithHistory.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.text; +package com.github.weisj.darklaf.components.text; import javax.swing.text.Document; import java.util.List; diff --git a/src/main/java/com/weis/darklaf/components/tooltip/DarkToolTip.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/DarkToolTip.java similarity index 94% rename from src/main/java/com/weis/darklaf/components/tooltip/DarkToolTip.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/DarkToolTip.java index 573edc4d..ef3aea96 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/DarkToolTip.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/DarkToolTip.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.decorators.AncestorAdapter; -import com.weis.darklaf.ui.tooltip.DarkTooltipBorder; -import com.weis.darklaf.util.Animator; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.decorators.AncestorAdapter; +import com.github.weisj.darklaf.ui.tooltip.DarkTooltipBorder; +import com.github.weisj.darklaf.util.Animator; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -110,12 +110,20 @@ public class DarkToolTip extends JToolTip implements PropertyChangeListener { super.paint(g); config.restore(); } + @Override public void setBorder(final Border border) { if (!(border instanceof DarkTooltipBorder)) return; super.setBorder(border); } + @Override + public void removeNotify() { + super.removeNotify(); + notifyToolTipListeners(ToolTipEvent.HIDDEN); + lastHidden = System.currentTimeMillis(); + } + @Override public String getTipText() { var text = super.getTipText(); @@ -126,10 +134,17 @@ public class DarkToolTip extends JToolTip implements PropertyChangeListener { } @Override - public void removeNotify() { - super.removeNotify(); - notifyToolTipListeners(ToolTipEvent.HIDDEN); - lastHidden = System.currentTimeMillis(); + public void propertyChange(@NotNull final PropertyChangeEvent evt) { + if ("tiptext".equals(evt.getPropertyName())) { + setPreferredSize(getUI().getPreferredSize(this)); + if (!Objects.equals(evt.getNewValue(), evt.getOldValue())) { + notifyToolTipListeners(ToolTipEvent.TEXT); + } + } + } + + public void setStyle(final ToolTipStyle style) { + putClientProperty("JToolTip.style", style); } private enum ToolTipEvent { @@ -175,19 +190,5 @@ public class DarkToolTip extends JToolTip implements PropertyChangeListener { } } - @Override - public void propertyChange(@NotNull final PropertyChangeEvent evt) { - if ("tiptext".equals(evt.getPropertyName())) { - setPreferredSize(getUI().getPreferredSize(this)); - if (!Objects.equals(evt.getNewValue(), evt.getOldValue())) { - notifyToolTipListeners(ToolTipEvent.TEXT); - } - } - } - - public void setStyle(final ToolTipStyle style) { - putClientProperty("JToolTip.style", style); - } - } diff --git a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipContext.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipContext.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/tooltip/ToolTipContext.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipContext.java index aa7c9d4f..26fe1baf 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipContext.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipContext.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.alignment.AlignmentStrategy; -import com.weis.darklaf.ui.tooltip.DarkTooltipBorder; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.AlignmentStrategy; +import com.github.weisj.darklaf.ui.tooltip.DarkTooltipBorder; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -125,95 +125,6 @@ public class ToolTipContext implements ToolTipListener { setToolTipRectSupplier(toolTipRectSupplier); } - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - */ - @Contract("null, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment) { - this(c, alignment, null, null, true, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param centerAlignment {@link #setCenterAlignment(Alignment)} - */ - @Contract("null, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment) { - this(c, alignment, centerAlignment, null, true, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param alignInside {@link #setAlignInside(boolean)} - */ - @Contract("null, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final boolean alignInside) { - this(c, alignment, null, null, alignInside, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param centerAlignment {@link #setCenterAlignment(Alignment)} - * @param alignInside {@link #setAlignInside(boolean)} - */ - @Contract("null, _, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment, - final boolean alignInside) { - this(c, alignment, centerAlignment, null, alignInside, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} - */ - @Contract("null, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final AlignmentStrategy alignmentStrategy) { - this(c, alignment, null, alignmentStrategy, true, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param centerAlignment {@link #setCenterAlignment(Alignment)} - * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} - */ - @Contract("null, _, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment, - final AlignmentStrategy alignmentStrategy) { - this(c, alignment, centerAlignment, alignmentStrategy, true, null); - } - - /** - * Create a new tooltip context to ease the creation of custom tooltips. - * - * @param c the component which the tooltip belongs to. - * @param alignment {@link #setAlignment(Alignment)} - * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} - * @param alignInside {@link #setAlignInside(boolean)} - */ - @Contract("null, _, _, _ -> fail") - public ToolTipContext(final JComponent c, final Alignment alignment, final AlignmentStrategy alignmentStrategy, - final boolean alignInside) { - this(c, alignment, null, alignmentStrategy, alignInside, null); - } - /** * Set the style of the tooltip. * @@ -230,16 +141,6 @@ public class ToolTipContext implements ToolTipListener { return this; } - private void updateToolTip() { - if (toolTip != null) { - toolTip.setAlignment(alignment == Alignment.CENTER - ? centerAlignment.opposite() - : alignInside ? alignment : alignment.opposite()); - toolTip.setInsets(insets); - toolTip.setStyle(style); - } - } - /** * Sets whether the position should be recalculated each time after the popup has been shown. This may be useful if * the tooltip should follow the mouse. @@ -254,6 +155,24 @@ public class ToolTipContext implements ToolTipListener { return this; } + /** + * Sets whether the tooltip should be closed if the mouse has left the area set by {@link #setInsideArea(Area).} + *

+ * Default is false. + * + * @param hideOnExit true if tooltip should hide. + * @return this. + */ + public ToolTipContext setHideOnExit(final boolean hideOnExit) { + this.hideOnExit = hideOnExit; + if (hideOnExit) { + c.addMouseListener(mouseListener); + } else { + c.removeMouseListener(mouseListener); + } + return this; + } + /** * Sets whether the component should be aligned inside or outside the supplied rectangle if the curent alignment is * not {@link Alignment#CENTER}. @@ -338,6 +257,105 @@ public class ToolTipContext implements ToolTipListener { return this; } + private void updateToolTip() { + if (toolTip != null) { + toolTip.setAlignment(alignment == Alignment.CENTER + ? centerAlignment.opposite() + : alignInside ? alignment : alignment.opposite()); + toolTip.setInsets(insets); + toolTip.setStyle(style); + } + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + */ + @Contract("null, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment) { + this(c, alignment, null, null, true, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param centerAlignment {@link #setCenterAlignment(Alignment)} + */ + @Contract("null, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment) { + this(c, alignment, centerAlignment, null, true, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param alignInside {@link #setAlignInside(boolean)} + */ + @Contract("null, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final boolean alignInside) { + this(c, alignment, null, null, alignInside, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param centerAlignment {@link #setCenterAlignment(Alignment)} + * @param alignInside {@link #setAlignInside(boolean)} + */ + @Contract("null, _, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment, + final boolean alignInside) { + this(c, alignment, centerAlignment, null, alignInside, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} + */ + @Contract("null, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final AlignmentStrategy alignmentStrategy) { + this(c, alignment, null, alignmentStrategy, true, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param centerAlignment {@link #setCenterAlignment(Alignment)} + * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} + */ + @Contract("null, _, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final Alignment centerAlignment, + final AlignmentStrategy alignmentStrategy) { + this(c, alignment, centerAlignment, alignmentStrategy, true, null); + } + + /** + * Create a new tooltip context to ease the creation of custom tooltips. + * + * @param c the component which the tooltip belongs to. + * @param alignment {@link #setAlignment(Alignment)} + * @param alignmentStrategy {@link #setAlignmentStrategy(AlignmentStrategy)} + * @param alignInside {@link #setAlignInside(boolean)} + */ + @Contract("null, _, _, _ -> fail") + public ToolTipContext(final JComponent c, final Alignment alignment, final AlignmentStrategy alignmentStrategy, + final boolean alignInside) { + this(c, alignment, null, alignmentStrategy, alignInside, null); + } + /** * Set the area to check if the tooltip should hide. If the mouse is outside of the area the the tooltip hides if * {@link #setHideOnExit(boolean)} is true. @@ -451,11 +469,6 @@ public class ToolTipContext implements ToolTipListener { return dim; } - private Point alignInside(final Dimension dim, final Rectangle rect) { - Point p = alignment.alignInside(dim, rect); - return adjustPoint(p, alignment, dim, false); - } - @Nullable private Point alignCenter(final Dimension dim, @NotNull final Rectangle rect) { rect.x += rect.width / 2; @@ -467,15 +480,16 @@ public class ToolTipContext implements ToolTipListener { return p; } + private Point alignInside(final Dimension dim, final Rectangle rect) { + Point p = alignment.alignInside(dim, rect); + return adjustPoint(p, alignment, dim, false); + } + private Point alignOutside(final Dimension dim, final Rectangle rect) { Point p = alignment.alignOutside(dim, rect); return adjustPoint(p, alignment, dim, true); } - public void removeToolTip() { - setHideOnExit(false); - } - @Contract("_, _, _, _ -> param1") private Point adjustPoint(final Point p, final Alignment align, final Dimension dim, final boolean outside) { int factor = outside ? 1 : -1; @@ -487,22 +501,8 @@ public class ToolTipContext implements ToolTipListener { return p; } - /** - * Sets whether the tooltip should be closed if the mouse has left the area set by {@link #setInsideArea(Area).} - *

- * Default is false. - * - * @param hideOnExit true if tooltip should hide. - * @return this. - */ - public ToolTipContext setHideOnExit(final boolean hideOnExit) { - this.hideOnExit = hideOnExit; - if (hideOnExit) { - c.addMouseListener(mouseListener); - } else { - c.removeMouseListener(mouseListener); - } - return this; + public void removeToolTip() { + setHideOnExit(false); } @Override diff --git a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipListener.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipListener.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/tooltip/ToolTipListener.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipListener.java index a36054b9..b6dc9d6d 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipListener.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipListener.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; import javax.swing.*; import java.util.EventListener; diff --git a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipStyle.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java similarity index 95% rename from src/main/java/com/weis/darklaf/components/tooltip/ToolTipStyle.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java index d3db4270..5e5a87e1 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/ToolTipStyle.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; public enum ToolTipStyle { BALLOON, diff --git a/src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareButton.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareButton.java similarity index 94% rename from src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareButton.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareButton.java index f57c27e0..8e7c51c1 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareButton.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareButton.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareToggleButton.java b/src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareToggleButton.java similarity index 94% rename from src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareToggleButton.java rename to src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareToggleButton.java index da8ed6af..ea76fd7f 100644 --- a/src/main/java/com/weis/darklaf/components/tooltip/TooltipAwareToggleButton.java +++ b/src/main/java/com/github/weisj/darklaf/components/tooltip/TooltipAwareToggleButton.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.tooltip; +package com.github.weisj.darklaf.components.tooltip; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/components/tristate/TristateButtonModel.java b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateButtonModel.java similarity index 57% rename from src/main/java/com/weis/darklaf/components/tristate/TristateButtonModel.java rename to src/main/java/com/github/weisj/darklaf/components/tristate/TristateButtonModel.java index 7de152f4..2fd4a983 100644 --- a/src/main/java/com/weis/darklaf/components/tristate/TristateButtonModel.java +++ b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateButtonModel.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.components.tristate; +/* + * 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.github.weisj.darklaf.components.tristate; import javax.swing.*; import java.awt.event.ItemEvent; diff --git a/src/main/java/com/weis/darklaf/components/tristate/TristateCheckBox.java b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java similarity index 69% rename from src/main/java/com/weis/darklaf/components/tristate/TristateCheckBox.java rename to src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java index 7bbaa116..6dadfe0c 100644 --- a/src/main/java/com/weis/darklaf/components/tristate/TristateCheckBox.java +++ b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.components.tristate; - -import com.weis.darklaf.DarkLaf; +/* + * 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.github.weisj.darklaf.components.tristate; + +import com.github.weisj.darklaf.DarkLaf; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/github/weisj/darklaf/components/tristate/TristateState.java b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateState.java new file mode 100644 index 00000000..8ddbfcf5 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/components/tristate/TristateState.java @@ -0,0 +1,44 @@ +/* + * 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.github.weisj.darklaf.components.tristate; + +public enum TristateState { + SELECTED { + public TristateState next() { + return INDETERMINATE; + } + }, + INDETERMINATE { + public TristateState next() { + return DESELECTED; + } + }, + DESELECTED { + public TristateState next() { + return SELECTED; + } + }; + + public abstract TristateState next(); +} diff --git a/src/main/java/com/weis/darklaf/components/uiresource/Insets2D.java b/src/main/java/com/github/weisj/darklaf/components/uiresource/Insets2D.java similarity index 98% rename from src/main/java/com/weis/darklaf/components/uiresource/Insets2D.java rename to src/main/java/com/github/weisj/darklaf/components/uiresource/Insets2D.java index 6f5377ba..0a0f0a29 100644 --- a/src/main/java/com/weis/darklaf/components/uiresource/Insets2D.java +++ b/src/main/java/com/github/weisj/darklaf/components/uiresource/Insets2D.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.uiresource; +package com.github.weisj.darklaf.components.uiresource; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/components/uiresource/JLabelUIResource.java b/src/main/java/com/github/weisj/darklaf/components/uiresource/JLabelUIResource.java similarity index 97% rename from src/main/java/com/weis/darklaf/components/uiresource/JLabelUIResource.java rename to src/main/java/com/github/weisj/darklaf/components/uiresource/JLabelUIResource.java index f433cc87..ef3ba617 100644 --- a/src/main/java/com/weis/darklaf/components/uiresource/JLabelUIResource.java +++ b/src/main/java/com/github/weisj/darklaf/components/uiresource/JLabelUIResource.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.uiresource; +package com.github.weisj.darklaf.components.uiresource; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/components/uiresource/JPanelUIResource.java b/src/main/java/com/github/weisj/darklaf/components/uiresource/JPanelUIResource.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/uiresource/JPanelUIResource.java rename to src/main/java/com/github/weisj/darklaf/components/uiresource/JPanelUIResource.java index a3e8d4d3..6342732d 100644 --- a/src/main/java/com/weis/darklaf/components/uiresource/JPanelUIResource.java +++ b/src/main/java/com/github/weisj/darklaf/components/uiresource/JPanelUIResource.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.uiresource; +package com.github.weisj.darklaf.components.uiresource; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/components/uiresource/UIResourceWrapper.java b/src/main/java/com/github/weisj/darklaf/components/uiresource/UIResourceWrapper.java similarity index 96% rename from src/main/java/com/weis/darklaf/components/uiresource/UIResourceWrapper.java rename to src/main/java/com/github/weisj/darklaf/components/uiresource/UIResourceWrapper.java index d5ce62fb..706da450 100644 --- a/src/main/java/com/weis/darklaf/components/uiresource/UIResourceWrapper.java +++ b/src/main/java/com/github/weisj/darklaf/components/uiresource/UIResourceWrapper.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.components.uiresource; +package com.github.weisj.darklaf.components.uiresource; import javax.swing.border.Border; import java.awt.*; diff --git a/src/main/java/com/github/weisj/darklaf/decorators/AncestorAdapter.java b/src/main/java/com/github/weisj/darklaf/decorators/AncestorAdapter.java new file mode 100644 index 00000000..25a6386e --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/decorators/AncestorAdapter.java @@ -0,0 +1,41 @@ +/* + * 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.github.weisj.darklaf.decorators; + +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; + +public class AncestorAdapter implements AncestorListener { + @Override + public void ancestorAdded(final AncestorEvent event) { + } + + @Override + public void ancestorRemoved(final AncestorEvent event) { + } + + @Override + public void ancestorMoved(final AncestorEvent event) { + } +} diff --git a/src/main/java/com/github/weisj/darklaf/decorators/CellRenderer.java b/src/main/java/com/github/weisj/darklaf/decorators/CellRenderer.java new file mode 100644 index 00000000..b04328cb --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/decorators/CellRenderer.java @@ -0,0 +1,27 @@ +/* + * 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.github.weisj.darklaf.decorators; + +public interface CellRenderer { +} diff --git a/src/main/java/com/weis/darklaf/decorators/HoverListener.java b/src/main/java/com/github/weisj/darklaf/decorators/HoverListener.java similarity index 98% rename from src/main/java/com/weis/darklaf/decorators/HoverListener.java rename to src/main/java/com/github/weisj/darklaf/decorators/HoverListener.java index b34ac9f7..8146e6fb 100644 --- a/src/main/java/com/weis/darklaf/decorators/HoverListener.java +++ b/src/main/java/com/github/weisj/darklaf/decorators/HoverListener.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.decorators; +package com.github.weisj.darklaf.decorators; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/decorators/MouseResponder.java b/src/main/java/com/github/weisj/darklaf/decorators/MouseResponder.java similarity index 98% rename from src/main/java/com/weis/darklaf/decorators/MouseResponder.java rename to src/main/java/com/github/weisj/darklaf/decorators/MouseResponder.java index 38fad6c1..67bd462a 100644 --- a/src/main/java/com/weis/darklaf/decorators/MouseResponder.java +++ b/src/main/java/com/github/weisj/darklaf/decorators/MouseResponder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.decorators; +package com.github.weisj.darklaf.decorators; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/decorators/PlainAction.java b/src/main/java/com/github/weisj/darklaf/decorators/PlainAction.java similarity index 97% rename from src/main/java/com/weis/darklaf/decorators/PlainAction.java rename to src/main/java/com/github/weisj/darklaf/decorators/PlainAction.java index 45bf2f7f..47195482 100644 --- a/src/main/java/com/weis/darklaf/decorators/PlainAction.java +++ b/src/main/java/com/github/weisj/darklaf/decorators/PlainAction.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.decorators; +package com.github.weisj.darklaf.decorators; import javax.swing.*; import java.awt.event.ActionEvent; diff --git a/src/main/java/com/weis/darklaf/decorators/PopupMenuAdapter.java b/src/main/java/com/github/weisj/darklaf/decorators/PopupMenuAdapter.java similarity index 97% rename from src/main/java/com/weis/darklaf/decorators/PopupMenuAdapter.java rename to src/main/java/com/github/weisj/darklaf/decorators/PopupMenuAdapter.java index b0196e49..83d6e07e 100644 --- a/src/main/java/com/weis/darklaf/decorators/PopupMenuAdapter.java +++ b/src/main/java/com/github/weisj/darklaf/decorators/PopupMenuAdapter.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.decorators; +package com.github.weisj.darklaf.decorators; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; diff --git a/src/main/java/com/weis/darklaf/icons/DarkSVGIcon.java b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java similarity index 99% rename from src/main/java/com/weis/darklaf/icons/DarkSVGIcon.java rename to src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java index cfab37fc..21df8a66 100644 --- a/src/main/java/com/weis/darklaf/icons/DarkSVGIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/DarkSVGIcon.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; import com.kitfox.svg.app.beans.SVGIcon; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/icons/EmptyIcon.java b/src/main/java/com/github/weisj/darklaf/icons/EmptyIcon.java similarity index 98% rename from src/main/java/com/weis/darklaf/icons/EmptyIcon.java rename to src/main/java/com/github/weisj/darklaf/icons/EmptyIcon.java index 71d816b9..b5c8fc83 100644 --- a/src/main/java/com/weis/darklaf/icons/EmptyIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/EmptyIcon.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/icons/IconColorMapper.java b/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java similarity index 65% rename from src/main/java/com/weis/darklaf/icons/IconColorMapper.java rename to src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java index fb1b3a46..061badd5 100644 --- a/src/main/java/com/weis/darklaf/icons/IconColorMapper.java +++ b/src/main/java/com/github/weisj/darklaf/icons/IconColorMapper.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.icons; +/* + * 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.github.weisj.darklaf.icons; import com.kitfox.svg.Defs; import com.kitfox.svg.LinearGradient; diff --git a/src/main/java/com/weis/darklaf/icons/IconLoader.java b/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java similarity index 99% rename from src/main/java/com/weis/darklaf/icons/IconLoader.java rename to src/main/java/com/github/weisj/darklaf/icons/IconLoader.java index 3a7c97f0..aad7299c 100644 --- a/src/main/java/com/weis/darklaf/icons/IconLoader.java +++ b/src/main/java/com/github/weisj/darklaf/icons/IconLoader.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/icons/LazyIcon.java b/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java similarity index 98% rename from src/main/java/com/weis/darklaf/icons/LazyIcon.java rename to src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java index ea5c07eb..e9e256e0 100644 --- a/src/main/java/com/weis/darklaf/icons/LazyIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/LazyIcon.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/icons/LazyImageIcon.java b/src/main/java/com/github/weisj/darklaf/icons/LazyImageIcon.java similarity index 97% rename from src/main/java/com/weis/darklaf/icons/LazyImageIcon.java rename to src/main/java/com/github/weisj/darklaf/icons/LazyImageIcon.java index 91d945cc..2c96071b 100644 --- a/src/main/java/com/weis/darklaf/icons/LazyImageIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/LazyImageIcon.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/icons/RotatableIcon.java b/src/main/java/com/github/weisj/darklaf/icons/RotatableIcon.java similarity index 97% rename from src/main/java/com/weis/darklaf/icons/RotatableIcon.java rename to src/main/java/com/github/weisj/darklaf/icons/RotatableIcon.java index 9b5ce5b8..01d2c3a7 100644 --- a/src/main/java/com/weis/darklaf/icons/RotatableIcon.java +++ b/src/main/java/com/github/weisj/darklaf/icons/RotatableIcon.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.icons; +package com.github.weisj.darklaf.icons; -import com.weis.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.alignment.Alignment; import org.jetbrains.annotations.Contract; import javax.swing.*; diff --git a/src/main/java/com/github/weisj/darklaf/icons/ThemedSVGIcon.java b/src/main/java/com/github/weisj/darklaf/icons/ThemedSVGIcon.java new file mode 100644 index 00000000..0ea76016 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/icons/ThemedSVGIcon.java @@ -0,0 +1,57 @@ +/* + * 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.github.weisj.darklaf.icons; + +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.theme.Theme; +import org.jetbrains.annotations.NotNull; + +import java.awt.*; +import java.net.URI; + +/** + * @author Jannis Weis + */ +public class ThemedSVGIcon extends DarkSVGIcon { + + private Theme currentTheme; + + public ThemedSVGIcon(@NotNull final URI uri, final int displayWidth, final int displayHeight) { + super(uri, displayWidth, displayHeight); + } + + @Override + public void paintIcon(final Component c, final Graphics g, final int x, final int y) { + ensureTheme(); + super.paintIcon(c, g, x, y); + } + + private void ensureTheme() { + var theme = LafManager.getTheme(); + if (currentTheme != theme) { + IconColorMapper.patchColors(getSVGIcon()); + currentTheme = theme; + } + } +} diff --git a/src/main/java/com/github/weisj/darklaf/icons/UIAwareIcon.java b/src/main/java/com/github/weisj/darklaf/icons/UIAwareIcon.java new file mode 100644 index 00000000..32a012cd --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/icons/UIAwareIcon.java @@ -0,0 +1,34 @@ +/* + * 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.github.weisj.darklaf.icons; + +import javax.swing.*; + +/** + * @author Jannis Weis + */ +public interface UIAwareIcon extends Icon { + + UIAwareIcon getDual(); +} diff --git a/src/main/java/com/weis/darklaf/log/LogFormatter.java b/src/main/java/com/github/weisj/darklaf/log/LogFormatter.java similarity index 99% rename from src/main/java/com/weis/darklaf/log/LogFormatter.java rename to src/main/java/com/github/weisj/darklaf/log/LogFormatter.java index c009a4a9..90a0e3f1 100644 --- a/src/main/java/com/weis/darklaf/log/LogFormatter.java +++ b/src/main/java/com/github/weisj/darklaf/log/LogFormatter.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.log; +package com.github.weisj.darklaf.log; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/platform/NativeUtil.java b/src/main/java/com/github/weisj/darklaf/platform/NativeUtil.java similarity index 80% rename from src/main/java/com/weis/darklaf/platform/NativeUtil.java rename to src/main/java/com/github/weisj/darklaf/platform/NativeUtil.java index a026134c..a82eb264 100644 --- a/src/main/java/com/weis/darklaf/platform/NativeUtil.java +++ b/src/main/java/com/github/weisj/darklaf/platform/NativeUtil.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.platform; +/* + * 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.github.weisj.darklaf.platform; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/platform/windows/JNIDecorations.java b/src/main/java/com/github/weisj/darklaf/platform/windows/JNIDecorations.java similarity index 67% rename from src/main/java/com/weis/darklaf/platform/windows/JNIDecorations.java rename to src/main/java/com/github/weisj/darklaf/platform/windows/JNIDecorations.java index 5aa286b4..996fef8c 100644 --- a/src/main/java/com/weis/darklaf/platform/windows/JNIDecorations.java +++ b/src/main/java/com/github/weisj/darklaf/platform/windows/JNIDecorations.java @@ -1,10 +1,33 @@ -package com.weis.darklaf.platform.windows; +/* + * 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.github.weisj.darklaf.platform.windows; +import com.github.weisj.darklaf.DarkLaf; +import com.github.weisj.darklaf.platform.NativeUtil; +import com.github.weisj.darklaf.util.SystemInfo; import com.sun.jna.Native; import com.sun.jna.Pointer; -import com.weis.darklaf.DarkLaf; -import com.weis.darklaf.platform.NativeUtil; -import com.weis.darklaf.util.SystemInfo; import org.jetbrains.annotations.Contract; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/decorators/MouseMovementListener.java b/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java similarity index 78% rename from src/main/java/com/weis/darklaf/decorators/MouseMovementListener.java rename to src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java index e25a72dd..90b88d87 100644 --- a/src/main/java/com/weis/darklaf/decorators/MouseMovementListener.java +++ b/src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java @@ -21,17 +21,27 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.decorators; +package com.github.weisj.darklaf.theme; -import java.awt.event.MouseEvent; -import java.awt.event.MouseMotionListener; +/** + * @author Jannis Weis + */ +public class DarculaTheme extends Theme { -public interface MouseMovementListener extends MouseMotionListener { + @Override + protected String getResourcePath() { + return "darcula/"; + } @Override - default void mouseDragged(final MouseEvent e) { + public String getName() { + return "darcula"; } @Override - void mouseMoved(MouseEvent e); + public boolean isDark() { + return true; + } + + } diff --git a/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java b/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java new file mode 100644 index 00000000..d0367e27 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/theme/IntelliJTheme.java @@ -0,0 +1,67 @@ +/* + * 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.github.weisj.darklaf.theme; + +import com.github.weisj.darklaf.util.PropertyLoader; +import com.github.weisj.darklaf.util.SystemInfo; + +import javax.swing.*; +import java.util.Properties; + +/** + * @author Jannis Weis + */ +public class IntelliJTheme extends Theme { + + @Override + public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) { + super.loadPlatformProperties(properties, currentDefaults); + if (SystemInfo.isMac) { + var name = getResourcePath() + getName() + "_mac.properties"; + PropertyLoader.putProperties(load(name), properties, currentDefaults); + } + } + + @Override + protected String getResourcePath() { + return "intellij/"; + } + + @Override + public boolean isDark() { + return false; + } + + @Override + public String getName() { + return "intellij"; + } + + @Override + public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) { + super.loadUIProperties(properties, currentDefaults); + var name = getResourcePath() + getName() + "_ui.properties"; + PropertyLoader.putProperties(load(name), properties, currentDefaults); + } +} diff --git a/src/main/java/com/weis/darklaf/theme/SolarizedDarkTheme.java b/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java similarity index 95% rename from src/main/java/com/weis/darklaf/theme/SolarizedDarkTheme.java rename to src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java index 6d10f451..03b9dfe4 100644 --- a/src/main/java/com/weis/darklaf/theme/SolarizedDarkTheme.java +++ b/src/main/java/com/github/weisj/darklaf/theme/SolarizedDarkTheme.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.theme; +package com.github.weisj.darklaf.theme; -import com.weis.darklaf.util.PropertyLoader; +import com.github.weisj.darklaf.util.PropertyLoader; import javax.swing.*; import java.util.Properties; diff --git a/src/main/java/com/weis/darklaf/theme/SolarizedLightTheme.java b/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java similarity index 95% rename from src/main/java/com/weis/darklaf/theme/SolarizedLightTheme.java rename to src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java index b0352e60..290096de 100644 --- a/src/main/java/com/weis/darklaf/theme/SolarizedLightTheme.java +++ b/src/main/java/com/github/weisj/darklaf/theme/SolarizedLightTheme.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.theme; +package com.github.weisj.darklaf.theme; -import com.weis.darklaf.util.PropertyLoader; +import com.github.weisj.darklaf.util.PropertyLoader; import javax.swing.*; import java.util.Properties; diff --git a/src/main/java/com/weis/darklaf/theme/Theme.java b/src/main/java/com/github/weisj/darklaf/theme/Theme.java similarity index 77% rename from src/main/java/com/weis/darklaf/theme/Theme.java rename to src/main/java/com/github/weisj/darklaf/theme/Theme.java index ccaffb56..fcd1fa79 100644 --- a/src/main/java/com/weis/darklaf/theme/Theme.java +++ b/src/main/java/com/github/weisj/darklaf/theme/Theme.java @@ -1,9 +1,32 @@ -package com.weis.darklaf.theme; +/* + * 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.github.weisj.darklaf.theme; -import com.weis.darklaf.DarkLaf; -import com.weis.darklaf.DarkMetalTheme; -import com.weis.darklaf.util.PropertyLoader; -import com.weis.darklaf.util.SystemInfo; +import com.github.weisj.darklaf.DarkLaf; +import com.github.weisj.darklaf.DarkMetalTheme; +import com.github.weisj.darklaf.util.PropertyLoader; +import com.github.weisj.darklaf.util.SystemInfo; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/theme/UnsupportedThemeException.java b/src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java similarity index 97% rename from src/main/java/com/weis/darklaf/theme/UnsupportedThemeException.java rename to src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java index 16bc46bc..102fcb51 100644 --- a/src/main/java/com/weis/darklaf/theme/UnsupportedThemeException.java +++ b/src/main/java/com/github/weisj/darklaf/theme/UnsupportedThemeException.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.theme; +package com.github.weisj.darklaf.theme; public class UnsupportedThemeException extends RuntimeException { diff --git a/src/main/java/com/weis/darklaf/ui/button/DarkButtonBorder.java b/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/button/DarkButtonBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java index 4ca13a20..0cfb3d20 100644 --- a/src/main/java/com/weis/darklaf/ui/button/DarkButtonBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.button; +package com.github.weisj.darklaf.ui.button; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/button/DarkButtonUI.java b/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/button/DarkButtonUI.java rename to src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java index e8922787..c4eb61df 100644 --- a/src/main/java/com/weis/darklaf/ui/button/DarkButtonUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.button; +package com.github.weisj.darklaf.ui.button; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; -import com.weis.darklaf.util.SystemInfo; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.util.SystemInfo; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; @@ -100,10 +100,18 @@ public class DarkButtonUI extends BasicButtonUI { squareArc = UIManager.getInt("Button.squareArc"); } - @Contract("null -> false") - public static boolean isNoArc(final Component c) { - return c instanceof JButton - && Boolean.TRUE.equals(((JButton) c).getClientProperty("JButton.noArc")); + @Override + public void paint(final Graphics g, final JComponent c) { + GraphicsContext config = new GraphicsContext(g); + AbstractButton b = (AbstractButton) c; + paintButton(g, c); + + String text = layout(b, c, SwingUtilities2.getFontMetrics(b, g), + b.getWidth(), b.getHeight()); + + paintIcon(g, b, c); + paintText(g, b, c, text); + config.restore(); } @Override @@ -195,18 +203,20 @@ public class DarkButtonUI extends BasicButtonUI { } } - @Override - public void paint(final Graphics g, final JComponent c) { - GraphicsContext config = new GraphicsContext(g); - AbstractButton b = (AbstractButton) c; - paintButton(g, c); - - String text = layout(b, c, SwingUtilities2.getFontMetrics(b, g), - b.getWidth(), b.getHeight()); - - paintIcon(g, b, c); - paintText(g, b, c, text); - config.restore(); + protected void paintText(final Graphics g, final AbstractButton b, final JComponent c, final String text) { + var context = GraphicsUtil.setupAntialiasing(g); + if (isDefaultButton(b)) { + g.setFont(g.getFont().deriveFont(Font.BOLD)); + } + if (text != null && !text.equals("")) { + View v = (View) c.getClientProperty(BasicHTML.propertyKey); + if (v != null) { + v.paint(g, textRect); + } else { + paintText(g, b, textRect, text); + } + } + context.restore(); } private boolean shouldDrawBackground(@NotNull final JComponent c) { @@ -243,39 +253,6 @@ public class DarkButtonUI extends BasicButtonUI { && "fullShadow".equals(((JButton) c).getClientProperty("JButton.variant")); } - protected void paintText(final Graphics g, final AbstractButton b, final JComponent c, final String text) { - var context = GraphicsUtil.setupAntialiasing(g); - if (isDefaultButton(b)) { - g.setFont(g.getFont().deriveFont(Font.BOLD)); - } - if (text != null && !text.equals("")) { - View v = (View) c.getClientProperty(BasicHTML.propertyKey); - if (v != null) { - v.paint(g, textRect); - } else { - paintText(g, b, textRect, text); - } - } - context.restore(); - } - - @Contract("null -> false") - public static boolean isSquare(final Component c) { - return c instanceof JButton && "square".equals(((JButton) c).getClientProperty("JButton.buttonType")); - } - - @Contract("null -> false") - public static boolean chooseAlternativeArc(final Component c) { - return c instanceof JButton - && Boolean.TRUE.equals(((JButton) c).getClientProperty("JButton.alternativeArc")); - } - - @Contract("null -> false") - public static boolean isLabelButton(final Component c) { - return c instanceof JButton - && "onlyLabel".equals(((JButton) c).getClientProperty("JButton.variant")); - } - protected Color getBackgroundColor(@NotNull final JComponent c) { var defaultButton = isDefaultButton(c); var rollOver = (c instanceof JButton && (((JButton) c).isRolloverEnabled() @@ -304,6 +281,29 @@ public class DarkButtonUI extends BasicButtonUI { } } + @Contract("null -> false") + public static boolean isSquare(final Component c) { + return c instanceof JButton && "square".equals(((JButton) c).getClientProperty("JButton.buttonType")); + } + + @Contract("null -> false") + public static boolean chooseAlternativeArc(final Component c) { + return c instanceof JButton + && Boolean.TRUE.equals(((JButton) c).getClientProperty("JButton.alternativeArc")); + } + + @Contract("null -> false") + public static boolean isLabelButton(final Component c) { + return c instanceof JButton + && "onlyLabel".equals(((JButton) c).getClientProperty("JButton.variant")); + } + + @Contract("null -> false") + public static boolean isNoArc(final Component c) { + return c instanceof JButton + && Boolean.TRUE.equals(((JButton) c).getClientProperty("JButton.noArc")); + } + @Override public void update(final Graphics g, final JComponent c) { super.update(g, c); diff --git a/src/main/java/com/weis/darklaf/ui/button/DarkToggleButtonUI.java b/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/button/DarkToggleButtonUI.java rename to src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java index 2f4198e0..cb20b9ef 100644 --- a/src/main/java/com/weis/darklaf/ui/button/DarkToggleButtonUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/button/DarkToggleButtonUI.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.button; +package com.github.weisj.darklaf.ui.button; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; @@ -152,15 +152,10 @@ public class DarkToggleButtonUI extends DarkButtonUI { bounds.height, bounds.height).contains(x, y); } - @NotNull - private Rectangle getSliderBounds(@NotNull final JComponent c) { - int x = borderSize; - int y = (c.getHeight() - sliderSize.height) / 2; - rect.x = x; - rect.y = y; - rect.width = sliderSize.width; - rect.height = sliderSize.height; - return rect; + @Contract("null -> false") + private static boolean isSlider(final JComponent c) { + return c instanceof JToggleButton + && "slider".equals(c.getClientProperty("ToggleButton.variant")); } private void paintSlider(@NotNull final Graphics2D g, final AbstractButton c) { @@ -196,10 +191,15 @@ public class DarkToggleButtonUI extends DarkButtonUI { config.restore(); } - @Contract("null -> false") - private static boolean isSlider(final JComponent c) { - return c instanceof JToggleButton - && "slider".equals(c.getClientProperty("ToggleButton.variant")); + @NotNull + private Rectangle getSliderBounds(@NotNull final JComponent c) { + int x = borderSize; + int y = (c.getHeight() - sliderSize.height) / 2; + rect.x = x; + rect.y = y; + rect.width = sliderSize.width; + rect.height = sliderSize.height; + return rect; } protected Color getToggleBorderColor(@NotNull final AbstractButton b) { diff --git a/src/main/java/com/weis/darklaf/ui/cell/CellEditorToggleButton.java b/src/main/java/com/github/weisj/darklaf/ui/cell/CellEditorToggleButton.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/cell/CellEditorToggleButton.java rename to src/main/java/com/github/weisj/darklaf/ui/cell/CellEditorToggleButton.java index 2ae10fea..74866962 100644 --- a/src/main/java/com/weis/darklaf/ui/cell/CellEditorToggleButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/cell/CellEditorToggleButton.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.cell; +package com.github.weisj.darklaf.ui.cell; /** * @author Jannis Weis diff --git a/src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellBorder.java b/src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellBorder.java new file mode 100644 index 00000000..dd533249 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellBorder.java @@ -0,0 +1,37 @@ +/* + * 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.github.weisj.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() { + super(2, 5, 2, 5); + } +} diff --git a/src/main/java/com/weis/darklaf/ui/cell/DarkCellRendererToggleButton.java b/src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellRendererToggleButton.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/cell/DarkCellRendererToggleButton.java rename to src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellRendererToggleButton.java index 42120836..f26c953b 100644 --- a/src/main/java/com/weis/darklaf/ui/cell/DarkCellRendererToggleButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/cell/DarkCellRendererToggleButton.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.cell; +package com.github.weisj.darklaf.ui.cell; -import com.weis.darklaf.components.SelectableTreeNode; -import com.weis.darklaf.decorators.CellRenderer; -import com.weis.darklaf.ui.tree.DarkTreeCellRenderer; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.SelectableTreeNode; +import com.github.weisj.darklaf.decorators.CellRenderer; +import com.github.weisj.darklaf.ui.tree.DarkTreeCellRenderer; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxBorder.java b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxBorder.java new file mode 100644 index 00000000..a31dec1e --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxBorder.java @@ -0,0 +1,73 @@ +/* + * 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.github.weisj.darklaf.ui.checkbox; + + +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.SystemInfo; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.plaf.InsetsUIResource; +import javax.swing.plaf.UIResource; +import java.awt.*; + +/** + * @author Jannis Weis + */ +public class DarkCheckBoxBorder implements Border, UIResource { + + @Override + public void paintBorder(final Component c, final Graphics g, final int x, final int y, + final int width, final int height) { + } + + @Override + public Insets getBorderInsets(final Component c) { + if (isInCell(c)) { + return new Insets(0, 0, 0, 0); + } + final int a = SystemInfo.isMac ? 2 : 4; + return new InsetsUIResource(a, a, a, a); + } + + protected boolean isInCell(final Component c) { + return isTreeCellEditor(c) || isTableCellEditor(c) || DarkUIUtil.isInCell(c); + } + + protected boolean isTreeCellEditor(final Component c) { + return c instanceof JComponent + && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); + } + + protected boolean isTableCellEditor(final Component c) { + return c instanceof JComponent + && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); + } + + @Override + public boolean isBorderOpaque() { + return false; + } +} diff --git a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java similarity index 69% rename from src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java rename to src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java index 0fdd825c..adc8df85 100644 --- a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxMenuItemUI.java @@ -1,9 +1,32 @@ -package com.weis.darklaf.ui.checkbox; +/* + * 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.github.weisj.darklaf.ui.checkbox; -import com.weis.darklaf.decorators.MouseClickListener; -import com.weis.darklaf.ui.menu.DarkMenuItemUIBase; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.decorators.MouseClickListener; +import com.github.weisj.darklaf.ui.menu.DarkMenuItemUIBase; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.MenuItemLayoutHelper; diff --git a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxUI.java b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxUI.java rename to src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxUI.java index e47b50d3..1b8f9270 100644 --- a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/checkbox/DarkCheckBoxUI.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.checkbox; +package com.github.weisj.darklaf.ui.checkbox; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorPipette.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPipette.java similarity index 89% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorPipette.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPipette.java index 7b0e056c..0c329ec2 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorPipette.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPipette.java @@ -1,4 +1,3 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license /* * MIT License * @@ -22,9 +21,10 @@ * 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; +package com.github.weisj.darklaf.ui.colorchooser; + +import com.github.weisj.darklaf.components.Disposable; import org.jetbrains.annotations.Nullable; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorPreviewComponent.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPreviewComponent.java similarity index 54% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorPreviewComponent.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPreviewComponent.java index a9e0adc7..6b870a1f 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorPreviewComponent.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorPreviewComponent.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.colorchooser; +/* + * 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.github.weisj.darklaf.ui.colorchooser; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorValueFormatter.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorValueFormatter.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorValueFormatter.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorValueFormatter.java index d4ff952d..064a4e11 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorValueFormatter.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorValueFormatter.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; +package com.github.weisj.darklaf.ui.colorchooser; -import com.weis.darklaf.color.DarkColorModel; +import com.github.weisj.darklaf.color.DarkColorModel; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheel.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheel.java index 8d72ef5d..d56203d1 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheel.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; +package com.github.weisj.darklaf.ui.colorchooser; -import com.weis.darklaf.util.ColorUtil; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.ColorUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelImageProducer.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelImageProducer.java similarity index 70% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelImageProducer.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelImageProducer.java index c39d4454..3c90c1f5 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelImageProducer.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelImageProducer.java @@ -1,5 +1,27 @@ -// 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; +/* + * 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.github.weisj.darklaf.ui.colorchooser; import java.awt.*; import java.awt.image.ColorModel; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelPanel.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelPanel.java index dccfb4b2..66961910 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorWheelPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorWheelPanel.java @@ -1,4 +1,3 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license /* * MIT License * @@ -22,7 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; + +package com.github.weisj.darklaf.ui.colorchooser; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserPanel.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserPanel.java index e0e36089..5ef51086 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserPanel.java @@ -1,4 +1,3 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license /* * MIT License * @@ -22,12 +21,13 @@ * 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; -import com.weis.darklaf.components.DefaultColorPipette; -import com.weis.darklaf.decorators.AncestorAdapter; -import com.weis.darklaf.util.ColorUtil; +package com.github.weisj.darklaf.ui.colorchooser; + +import com.github.weisj.darklaf.color.DarkColorModel; +import com.github.weisj.darklaf.components.DefaultColorPipette; +import com.github.weisj.darklaf.decorators.AncestorAdapter; +import com.github.weisj.darklaf.util.ColorUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -332,9 +332,6 @@ public class DarkColorChooserPanel extends AbstractColorChooserPanel implements @Override public int getDisplayedMnemonicIndex() { return 6; - } @Override - public boolean isColorTransparencySelectionEnabled() { - return colorWheelPanel.isColorTransparencySelectionEnabled(); } @Override @@ -342,26 +339,14 @@ public class DarkColorChooserPanel extends AbstractColorChooserPanel implements return null; } + @Override + public boolean isColorTransparencySelectionEnabled() { + return colorWheelPanel.isColorTransparencySelectionEnabled(); + } + @Override public Icon getLargeDisplayIcon() { return null; - } @Override - public void setColorTransparencySelectionEnabled(final boolean b) { - boolean oldValue = isColorTransparencySelectionEnabled(); - if (b != oldValue) { - var color = getColorFromModel(); - color = new Color(color.getRed(), color.getBlue(), color.getGreen()); - var model = getColorSelectionModel(); - if (model != null) { - model.setSelectedColor(color); - } - currentColor = color; - hexFormatter.setTransparencyEnabled(b); - colorWheelPanel.setColorTransparencySelectionEnabled(b); - applyColorToHEX(getColorFromModel()); - firePropertyChange(TRANSPARENCY_ENABLED_PROPERTY, - oldValue, b); - } } @Override @@ -392,6 +377,25 @@ public class DarkColorChooserPanel extends AbstractColorChooserPanel implements isChanging = false; } + @Override + public void setColorTransparencySelectionEnabled(final boolean b) { + boolean oldValue = isColorTransparencySelectionEnabled(); + if (b != oldValue) { + var color = getColorFromModel(); + color = new Color(color.getRed(), color.getBlue(), color.getGreen()); + var model = getColorSelectionModel(); + if (model != null) { + model.setSelectedColor(color); + } + currentColor = color; + hexFormatter.setTransparencyEnabled(b); + colorWheelPanel.setColorTransparencySelectionEnabled(b); + applyColorToHEX(getColorFromModel()); + firePropertyChange(TRANSPARENCY_ENABLED_PROPERTY, + oldValue, b); + } + } + private void applyColorToHEX(@NotNull final Color c) { boolean changingOld = isChanging; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserUI.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserUI.java similarity index 93% rename from src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserUI.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserUI.java index 87f5b49c..f1e6f232 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkColorChooserUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkColorChooserUI.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; +package com.github.weisj.darklaf.ui.colorchooser; -import com.weis.darklaf.color.DarkColorModel; -import com.weis.darklaf.color.DarkColorModelCMYK; -import com.weis.darklaf.color.DarkColorModelHSL; -import com.weis.darklaf.decorators.AncestorAdapter; +import com.github.weisj.darklaf.color.DarkColorModel; +import com.github.weisj.darklaf.color.DarkColorModelCMYK; +import com.github.weisj.darklaf.color.DarkColorModelHSL; +import com.github.weisj.darklaf.decorators.AncestorAdapter; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkPreviewPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkPreviewPanel.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/colorchooser/DarkPreviewPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkPreviewPanel.java index 2853a3f6..06763449 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkPreviewPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkPreviewPanel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; +package com.github.weisj.darklaf.ui.colorchooser; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java index d6acd82a..bd156ace 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkSwatchesChooserPanel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.colorchooser; +package com.github.weisj.darklaf.ui.colorchooser; import javax.accessibility.AccessibleContext; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/MainSwatchPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/MainSwatchPanel.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/colorchooser/MainSwatchPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/MainSwatchPanel.java index 0809d113..1d9ecd9a 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/MainSwatchPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/MainSwatchPanel.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.colorchooser; +/* + * 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.github.weisj.darklaf.ui.colorchooser; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/RecentSwatchPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/RecentSwatchPanel.java similarity index 53% rename from src/main/java/com/weis/darklaf/ui/colorchooser/RecentSwatchPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/RecentSwatchPanel.java index 916e8727..e226549c 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/RecentSwatchPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/RecentSwatchPanel.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.colorchooser; +/* + * 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.github.weisj.darklaf.ui.colorchooser; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/SlideComponent.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SlideComponent.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/colorchooser/SlideComponent.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/SlideComponent.java index a0ee3088..9d6cda2f 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/SlideComponent.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SlideComponent.java @@ -1,4 +1,3 @@ -// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license /* * MIT License * @@ -22,12 +21,13 @@ * 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; -import com.weis.darklaf.components.tooltip.ToolTipContext; -import com.weis.darklaf.util.ColorUtil; -import com.weis.darklaf.util.DarkUIUtil; +package com.github.weisj.darklaf.ui.colorchooser; + +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tooltip.ToolTipContext; +import com.github.weisj.darklaf.util.ColorUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/SwatchPanel.java b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SwatchPanel.java similarity index 84% rename from src/main/java/com/weis/darklaf/ui/colorchooser/SwatchPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/colorchooser/SwatchPanel.java index d7359468..7b18e9b5 100644 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/SwatchPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SwatchPanel.java @@ -1,9 +1,32 @@ -package com.weis.darklaf.ui.colorchooser; +/* + * 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.github.weisj.darklaf.ui.colorchooser; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tooltip.ToolTipContext; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tooltip.ToolTipContext; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java b/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java rename to src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java index 17648f0f..87c5ca2e 100644 --- a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboBoxUI.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.combobox; +package com.github.weisj.darklaf.ui.combobox; -import com.weis.darklaf.components.ArrowButton; -import com.weis.darklaf.ui.list.DarkListCellRenderer; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.components.ArrowButton; +import com.github.weisj.darklaf.ui.list.DarkListCellRenderer; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -184,6 +184,32 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements Border { paintCurrentValue(g, r, hasFocus); } + private void paintBackground(final Graphics g, @NotNull final JComponent c, final int width, final int height) { + final Container parent = c.getParent(); + if (parent != null && parent.isOpaque()) { + g.setColor(parent.getBackground()); + g.fillRect(0, 0, c.getWidth(), c.getHeight()); + } + if (comboBox.isEditable() && comboBox.getEditor() != null) { + g.setColor(comboBox.getEditor().getEditorComponent().getBackground()); + } else { + g.setColor(getBackground(comboBox)); + } + if (!isTableCellEditor(c) && !isTreeCellEditor(c)) { + DarkUIUtil.fillRoundRect((Graphics2D) g, borderSize, borderSize, + width - 2 * borderSize, height - 2 * borderSize, + arcSize); + } else { + g.fillRect(0, 0, width, height); + } + } + + protected Color getBackground(final JComboBox c) { + if (!c.isEnabled()) return inactiveBackground; + if (c.isEditable()) return editBackground; + return background; + } + protected static boolean isTableCellEditor(@NotNull final Component c) { return c instanceof JComponent && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JComboBox.isTableCellEditor")); @@ -194,6 +220,38 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements Border { && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JComboBox.isTreeCellEditor")); } + private Color getForeground() { + return comboBox.isEnabled() ? comboBox.getForeground() : inactiveForeground; + } + + @Override + public Dimension getPreferredSize(final JComponent c) { + return getMinimumSize(c); + } + + @Override + public Dimension getMinimumSize(final JComponent c) { + if (!isMinimumSizeDirty) { + return new Dimension(cachedMinimumSize); + } + Dimension size = getDisplaySize(); + Insets insets = getInsets(); + //calculate the width and height of the button + int buttonHeight = size.height; + int buttonWidth = squareButton + ? buttonHeight + : arrowButton.getPreferredSize().width + + arrowButton.getInsets().left + arrowButton.getInsets().right; + //adjust the size based on the button width + size.height += insets.top + insets.bottom; + size.width += insets.left + insets.right + buttonWidth; + + cachedMinimumSize.setSize(size.width, size.height); + isMinimumSizeDirty = false; + + return new Dimension(size); + } + @Override protected Rectangle rectangleForCurrentValue() { var rect = super.rectangleForCurrentValue(); @@ -250,64 +308,6 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements Border { } } - private void paintBackground(final Graphics g, @NotNull final JComponent c, final int width, final int height) { - final Container parent = c.getParent(); - if (parent != null && parent.isOpaque()) { - g.setColor(parent.getBackground()); - g.fillRect(0, 0, c.getWidth(), c.getHeight()); - } - if (comboBox.isEditable() && comboBox.getEditor() != null) { - g.setColor(comboBox.getEditor().getEditorComponent().getBackground()); - } else { - g.setColor(getBackground(comboBox)); - } - if (!isTableCellEditor(c) && !isTreeCellEditor(c)) { - DarkUIUtil.fillRoundRect((Graphics2D) g, borderSize, borderSize, - width - 2 * borderSize, height - 2 * borderSize, - arcSize); - } else { - g.fillRect(0, 0, width, height); - } - } - - protected Color getBackground(final JComboBox c) { - if (!c.isEnabled()) return inactiveBackground; - if (c.isEditable()) return editBackground; - return background; - } - - @Override - public Dimension getPreferredSize(final JComponent c) { - return getMinimumSize(c); - } - - @Override - public Dimension getMinimumSize(final JComponent c) { - if (!isMinimumSizeDirty) { - return new Dimension(cachedMinimumSize); - } - Dimension size = getDisplaySize(); - Insets insets = getInsets(); - //calculate the width and height of the button - int buttonHeight = size.height; - int buttonWidth = squareButton - ? buttonHeight - : arrowButton.getPreferredSize().width - + arrowButton.getInsets().left + arrowButton.getInsets().right; - //adjust the size based on the button width - size.height += insets.top + insets.bottom; - size.width += insets.left + insets.right + buttonWidth; - - cachedMinimumSize.setSize(size.width, size.height); - isMinimumSizeDirty = false; - - return new Dimension(size); - } - - private Color getForeground() { - return comboBox.isEnabled() ? comboBox.getForeground() : inactiveForeground; - } - @Override public void paintBorder(final Component c, final Graphics g2, final int x, final int y, final int width, final int height) { diff --git a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboPopup.java b/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboPopup.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/combobox/DarkComboPopup.java rename to src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboPopup.java index 55b7b5b1..786bc9c7 100644 --- a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboPopup.java +++ b/src/main/java/com/github/weisj/darklaf/ui/combobox/DarkComboPopup.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.combobox; +package com.github.weisj.darklaf.ui.combobox; -import com.weis.darklaf.components.OverlayScrollPane; +import com.github.weisj.darklaf.components.OverlayScrollPane; import javax.swing.*; import javax.swing.plaf.basic.BasicComboPopup; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java index 292685ce..86cddede 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserListViewBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUI.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUI.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java index 18453ac7..3700bde4 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUI.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; -import com.weis.darklaf.components.tooltip.TooltipAwareButton; -import com.weis.darklaf.components.tooltip.TooltipAwareToggleButton; +import com.github.weisj.darklaf.components.tooltip.TooltipAwareButton; +import com.github.weisj.darklaf.components.tooltip.TooltipAwareToggleButton; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.FilePane; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUIBridge.java index 839bf72b..16f45a40 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFileChooserUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFileChooserUIBridge.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; import sun.awt.shell.ShellFolder; import sun.swing.FilePane; @@ -1226,15 +1226,15 @@ public class DarkFileChooserUIBridge extends BasicFileChooserUI { return directories.size(); } + public Object getElementAt(final int index) { + return directories.elementAt(index); + } + public void setSelectedItem(final Object selectedDirectory) { this.selectedDirectory = (File) selectedDirectory; fireContentsChanged(this, -1, -1); } - public Object getElementAt(final int index) { - return directories.elementAt(index); - } - public Object getSelectedItem() { return selectedDirectory; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePane.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePane.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePane.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePane.java index dfdccfbb..14edcd58 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePane.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePane.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; -import com.weis.darklaf.components.OverlayScrollPane; -import com.weis.darklaf.ui.table.TextFieldTableCellEditorBorder; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.OverlayScrollPane; +import com.github.weisj.darklaf.ui.table.TextFieldTableCellEditorBorder; +import com.github.weisj.darklaf.util.DarkUIUtil; import sun.awt.AWTAccessor; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePaneUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePaneUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePaneUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePaneUIBridge.java index 87db2079..b2de67c7 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/DarkFilePaneUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/DarkFilePaneUIBridge.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; -import com.weis.darklaf.ui.list.DarkListCellRenderer; -import com.weis.darklaf.ui.table.DarkTableCellEditor; -import com.weis.darklaf.ui.table.DarkTableCellRenderer; -import com.weis.darklaf.ui.table.TextFieldTableCellEditorBorder; +import com.github.weisj.darklaf.ui.list.DarkListCellRenderer; +import com.github.weisj.darklaf.ui.table.DarkTableCellEditor; +import com.github.weisj.darklaf.ui.table.DarkTableCellRenderer; +import com.github.weisj.darklaf.ui.table.TextFieldTableCellEditorBorder; import org.jetbrains.annotations.NotNull; import sun.awt.AWTAccessor; import sun.awt.shell.ShellFolder; diff --git a/src/main/java/com/weis/darklaf/ui/filechooser/FileTextField.java b/src/main/java/com/github/weisj/darklaf/ui/filechooser/FileTextField.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/filechooser/FileTextField.java rename to src/main/java/com/github/weisj/darklaf/ui/filechooser/FileTextField.java index 7a43e36f..2520ecec 100644 --- a/src/main/java/com/weis/darklaf/ui/filechooser/FileTextField.java +++ b/src/main/java/com/github/weisj/darklaf/ui/filechooser/FileTextField.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.filechooser; +package com.github.weisj.darklaf.ui.filechooser; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/html/DarkHTML.java b/src/main/java/com/github/weisj/darklaf/ui/html/DarkHTML.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/html/DarkHTML.java rename to src/main/java/com/github/weisj/darklaf/ui/html/DarkHTML.java index 99a802b6..dd3d6b14 100644 --- a/src/main/java/com/weis/darklaf/ui/html/DarkHTML.java +++ b/src/main/java/com/github/weisj/darklaf/ui/html/DarkHTML.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.html; +package com.github.weisj.darklaf.ui.html; import javax.swing.plaf.basic.BasicHTML; import javax.swing.text.AttributeSet; diff --git a/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconBorder.java b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconBorder.java new file mode 100644 index 00000000..0fb246cb --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconBorder.java @@ -0,0 +1,40 @@ +/* + * 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.github.weisj.darklaf.ui.internalframe; + +import com.github.weisj.darklaf.components.border.MutableLineBorder; + +import javax.swing.*; +import javax.swing.plaf.UIResource; + +/** + * @author Jannis Weis + */ +public class DarkDesktopIconBorder extends MutableLineBorder implements UIResource { + + public DarkDesktopIconBorder() { + super(1, 1, 1, 1, null); + setColor(UIManager.getColor("DesktopIcon.borderColor")); + } +} diff --git a/src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconUI.java b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconUI.java similarity index 74% rename from src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconUI.java rename to src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconUI.java index 36b43f75..04d4525b 100644 --- a/src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkDesktopIconUI.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.internalframe; +/* + * 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.github.weisj.darklaf.ui.internalframe; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameBorder.java b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameBorder.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameBorder.java index c3c29182..87f2de41 100644 --- a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.internalframe; +package com.github.weisj.darklaf.ui.internalframe; -import com.weis.darklaf.components.border.DropShadowBorder; +import com.github.weisj.darklaf.components.border.DropShadowBorder; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java rename to src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java index 6d345dd2..e735cd7f 100644 --- a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java +++ b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameTitlePane.java @@ -1,8 +1,31 @@ -package com.weis.darklaf.ui.internalframe; +/* + * 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.github.weisj.darklaf.ui.internalframe; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.ui.rootpane.TitlePaneIcon; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.ui.rootpane.TitlePaneIcon; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; @@ -43,19 +66,26 @@ public class DarkInternalFrameTitlePane extends BasicInternalFrameTitlePane { super(f); } - private static int getButtonMnemonic(final String button) { - try { - return Integer.parseInt(UIManager.getString("InternalFrameTitlePane." + button + "Button.mnemonic")); - } catch (NumberFormatException e) { - return -1; - } - } - @Override protected void installTitlePane() { super.installTitlePane(); } + @Override + protected void addSubComponents() { + super.addSubComponents(); + label = new JLabel(); + label.setOpaque(false); + if (menu != null) { + menu = frame.getJMenuBar(); + frame.getRootPane().setJMenuBar(null); + } + if (menu != null) { + add(menu); + } + add(label); + } + @Override protected void installListeners() { super.installListeners(); @@ -146,19 +176,12 @@ public class DarkInternalFrameTitlePane extends BasicInternalFrameTitlePane { mi.setIcon(closeIcon); } - @Override - protected void addSubComponents() { - super.addSubComponents(); - label = new JLabel(); - label.setOpaque(false); - if (menu != null) { - menu = frame.getJMenuBar(); - frame.getRootPane().setJMenuBar(null); - } - if (menu != null) { - add(menu); + private static int getButtonMnemonic(final String button) { + try { + return Integer.parseInt(UIManager.getString("InternalFrameTitlePane." + button + "Button.mnemonic")); + } catch (NumberFormatException e) { + return -1; } - add(label); } @Override diff --git a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameUI.java b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameUI.java rename to src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameUI.java index 0b6c7829..4c8f614a 100644 --- a/src/main/java/com/weis/darklaf/ui/internalframe/DarkInternalFrameUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/internalframe/DarkInternalFrameUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.internalframe; +package com.github.weisj.darklaf.ui.internalframe; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/github/weisj/darklaf/ui/label/DarkLabelUI.java b/src/main/java/com/github/weisj/darklaf/ui/label/DarkLabelUI.java new file mode 100644 index 00000000..cd2b164c --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/label/DarkLabelUI.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.github.weisj.darklaf.ui.label; + +import org.jetbrains.annotations.Contract; + +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(); + + @Contract(pure = true) + public static ComponentUI createUI(final JComponent c) { + return darkLabelUI; + } +} diff --git a/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellBorder.java b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellBorder.java new file mode 100644 index 00000000..00e76fc2 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellBorder.java @@ -0,0 +1,32 @@ +/* + * 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.github.weisj.darklaf.ui.list; + +import com.github.weisj.darklaf.ui.cell.DarkCellBorder; + +/** + * @author Jannis Weis + */ +public class DarkListCellBorder extends DarkCellBorder { +} diff --git a/src/main/java/com/weis/darklaf/ui/list/DarkListCellFocusBorder.java b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellFocusBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/list/DarkListCellFocusBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellFocusBorder.java index 7c5966db..cd353337 100644 --- a/src/main/java/com/weis/darklaf/ui/list/DarkListCellFocusBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellFocusBorder.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.list; +package com.github.weisj.darklaf.ui.list; -import com.weis.darklaf.ui.cell.DarkCellBorder; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.ui.cell.DarkCellBorder; +import com.github.weisj.darklaf.util.DarkUIUtil; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/list/DarkListCellRenderer.java b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellRenderer.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/list/DarkListCellRenderer.java rename to src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellRenderer.java index 36bb2a2f..89e61322 100644 --- a/src/main/java/com/weis/darklaf/ui/list/DarkListCellRenderer.java +++ b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListCellRenderer.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.list; +package com.github.weisj.darklaf.ui.list; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/list/DarkListUI.java b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListUI.java similarity index 87% rename from src/main/java/com/weis/darklaf/ui/list/DarkListUI.java rename to src/main/java/com/github/weisj/darklaf/ui/list/DarkListUI.java index 5b8837dc..b585f81a 100644 --- a/src/main/java/com/weis/darklaf/ui/list/DarkListUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListUI.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.list; +/* + * 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.github.weisj.darklaf.ui.list; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/list/DarkListUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListUIBridge.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/list/DarkListUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/list/DarkListUIBridge.java index 918a89c1..b0d676d9 100644 --- a/src/main/java/com/weis/darklaf/ui/list/DarkListUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/list/DarkListUIBridge.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.list; +/* + * 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.github.weisj.darklaf.ui.list; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.LazyActionMap; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.LazyActionMap; import org.jdesktop.swingx.plaf.basic.core.BasicTransferable; import org.jdesktop.swingx.plaf.basic.core.DragRecognitionSupport; import sun.swing.DefaultLookup; @@ -1002,6 +1025,19 @@ public class DarkListUIBridge extends BasicListUI { return getHandler(); } + /** + * Returns the closest location to the model index of the passed in location. + */ + protected int convertLocationToModel(final int x, final int y) { + int row = convertLocationToRow(x, y, true); + int column = convertLocationToColumn(x, y); + + if (row >= 0 && column >= 0) { + return getModelIndex(column, row); + } + return -1; + } + /** * Returns the row at location x/y. * @@ -1047,19 +1083,6 @@ public class DarkListUIBridge extends BasicListUI { } } - /** - * Returns the closest location to the model index of the passed in location. - */ - protected int convertLocationToModel(final int x, final int y) { - int row = convertLocationToRow(x, y, true); - int column = convertLocationToColumn(x, y); - - if (row >= 0 && column >= 0) { - return getModelIndex(column, row); - } - return -1; - } - /** * Returns the closest column to the passed in location. */ @@ -1102,6 +1125,84 @@ public class DarkListUIBridge extends BasicListUI { } } + /** + * Invoked when the list is layed out horizontally to determine how many columns to create. + *

+ * This updates the rowsPerColumn, columnCount, + * preferredHeight and potentially cellHeight + * instance variables. + */ + protected void updateHorizontalLayoutState(final int fixedCellWidth, + final int fixedCellHeight) { + int visRows = list.getVisibleRowCount(); + int dataModelSize = list.getModel().getSize(); + Insets insets = list.getInsets(); + + listHeight = list.getHeight(); + listWidth = list.getWidth(); + + if (dataModelSize == 0) { + rowsPerColumn = columnCount = 0; + preferredHeight = insets.top + insets.bottom; + return; + } + + int height; + + if (fixedCellHeight != -1) { + height = fixedCellHeight; + } else { + // Determine the max of the renderer heights. + int maxHeight = 0; + if (cellHeights.length > 0) { + maxHeight = cellHeights[cellHeights.length - 1]; + for (int counter = cellHeights.length - 2; + counter >= 0; counter--) { + maxHeight = Math.max(maxHeight, cellHeights[counter]); + } + } + height = cellHeight = maxHeight; + cellHeights = null; + } + // The number of rows is either determined by the visible row + // count, or by the height of the list. + rowsPerColumn = dataModelSize; + if (visRows > 0) { + rowsPerColumn = visRows; + columnCount = Math.max(1, dataModelSize / rowsPerColumn); + if (dataModelSize > 0 && dataModelSize > rowsPerColumn && + dataModelSize % rowsPerColumn != 0) { + columnCount++; + } + if (layoutOrientation == JList.HORIZONTAL_WRAP) { + // Because HORIZONTAL_WRAP flows differently, the + // rowsPerColumn needs to be adjusted. + rowsPerColumn = (dataModelSize / columnCount); + if (dataModelSize % columnCount > 0) { + rowsPerColumn++; + } + } + } else if (layoutOrientation == JList.VERTICAL_WRAP && height != 0) { + rowsPerColumn = Math.max(1, (listHeight - insets.top - + insets.bottom) / height); + columnCount = Math.max(1, dataModelSize / rowsPerColumn); + if (dataModelSize > 0 && dataModelSize > rowsPerColumn && + dataModelSize % rowsPerColumn != 0) { + columnCount++; + } + } else if (layoutOrientation == JList.HORIZONTAL_WRAP && cellWidth > 0 && + listWidth > 0) { + columnCount = Math.max(1, (listWidth - insets.left - + insets.right) / cellWidth); + rowsPerColumn = dataModelSize / columnCount; + if (dataModelSize % columnCount > 0) { + rowsPerColumn++; + } + } + preferredHeight = rowsPerColumn * cellHeight + insets.top + + insets.bottom; + } + /** * Gets the bounds of the specified model index, returning the resulting bounds, or null if index is * not valid. @@ -1457,84 +1558,6 @@ public class DarkListUIBridge extends BasicListUI { return rowsPerColumn; } - /** - * Invoked when the list is layed out horizontally to determine how many columns to create. - *

- * This updates the rowsPerColumn, columnCount, - * preferredHeight and potentially cellHeight - * instance variables. - */ - protected void updateHorizontalLayoutState(final int fixedCellWidth, - final int fixedCellHeight) { - int visRows = list.getVisibleRowCount(); - int dataModelSize = list.getModel().getSize(); - Insets insets = list.getInsets(); - - listHeight = list.getHeight(); - listWidth = list.getWidth(); - - if (dataModelSize == 0) { - rowsPerColumn = columnCount = 0; - preferredHeight = insets.top + insets.bottom; - return; - } - - int height; - - if (fixedCellHeight != -1) { - height = fixedCellHeight; - } else { - // Determine the max of the renderer heights. - int maxHeight = 0; - if (cellHeights.length > 0) { - maxHeight = cellHeights[cellHeights.length - 1]; - for (int counter = cellHeights.length - 2; - counter >= 0; counter--) { - maxHeight = Math.max(maxHeight, cellHeights[counter]); - } - } - height = cellHeight = maxHeight; - cellHeights = null; - } - // The number of rows is either determined by the visible row - // count, or by the height of the list. - rowsPerColumn = dataModelSize; - if (visRows > 0) { - rowsPerColumn = visRows; - columnCount = Math.max(1, dataModelSize / rowsPerColumn); - if (dataModelSize > 0 && dataModelSize > rowsPerColumn && - dataModelSize % rowsPerColumn != 0) { - columnCount++; - } - if (layoutOrientation == JList.HORIZONTAL_WRAP) { - // Because HORIZONTAL_WRAP flows differently, the - // rowsPerColumn needs to be adjusted. - rowsPerColumn = (dataModelSize / columnCount); - if (dataModelSize % columnCount > 0) { - rowsPerColumn++; - } - } - } else if (layoutOrientation == JList.VERTICAL_WRAP && height != 0) { - rowsPerColumn = Math.max(1, (listHeight - insets.top - - insets.bottom) / height); - columnCount = Math.max(1, dataModelSize / rowsPerColumn); - if (dataModelSize > 0 && dataModelSize > rowsPerColumn && - dataModelSize % rowsPerColumn != 0) { - columnCount++; - } - } else if (layoutOrientation == JList.HORIZONTAL_WRAP && cellWidth > 0 && - listWidth > 0) { - columnCount = Math.max(1, (listWidth - insets.left - - insets.right) / cellWidth); - rowsPerColumn = dataModelSize / columnCount; - if (dataModelSize % columnCount > 0) { - rowsPerColumn++; - } - } - preferredHeight = rowsPerColumn * cellHeight + insets.top + - insets.bottom; - } - /** * Returns the closest row that starts at the specified y-location in the passed in column. */ diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarBorder.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarBorder.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarBorder.java index b51e660e..21ef8f0a 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarUI.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarUI.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarUI.java index 9cebf862..e38a04c7 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuBarUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuBarUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemBorder.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemBorder.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemBorder.java index b35d8178..33d9d927 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; import javax.swing.plaf.BorderUIResource; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemUIBase.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemUIBase.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java index 7b36b560..211f83a1 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuItemUIBase.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.LazyActionMap; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.LazyActionMap; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.MenuItemLayoutHelper; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuUI.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/menu/DarkMenuUI.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java index 99f5f4f8..38429886 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkMenuUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import sun.swing.MenuItemLayoutHelper; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuBorder.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuBorder.java similarity index 94% rename from src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuBorder.java index 8a03c68e..77e6b656 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java similarity index 94% rename from src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java index 1433453e..5fcef83a 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuSeparatorUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; -import com.weis.darklaf.ui.separator.DarkSeparatorUI; +import com.github.weisj.darklaf.ui.separator.DarkSeparatorUI; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuUI.java b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuUI.java rename to src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuUI.java index 85ae3b73..946e7c53 100644 --- a/src/main/java/com/weis/darklaf/ui/menu/DarkPopupMenuUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/menu/DarkPopupMenuUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.menu; +package com.github.weisj.darklaf.ui.menu; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/optionpane/DarkOptionPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/optionpane/DarkOptionPaneUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/optionpane/DarkOptionPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/optionpane/DarkOptionPaneUI.java index 1a5e278d..7262e496 100644 --- a/src/main/java/com/weis/darklaf/ui/optionpane/DarkOptionPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/optionpane/DarkOptionPaneUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.optionpane; +package com.github.weisj.darklaf.ui.optionpane; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/panel/DarkPanelUI.java b/src/main/java/com/github/weisj/darklaf/ui/panel/DarkPanelUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/panel/DarkPanelUI.java rename to src/main/java/com/github/weisj/darklaf/ui/panel/DarkPanelUI.java index cfc20201..99516d23 100644 --- a/src/main/java/com/weis/darklaf/ui/panel/DarkPanelUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/panel/DarkPanelUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.panel; +package com.github.weisj.darklaf.ui.panel; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarBorder.java b/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarBorder.java new file mode 100644 index 00000000..625a4d09 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarBorder.java @@ -0,0 +1,36 @@ +/* + * 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.github.weisj.darklaf.ui.progressbar; + +import javax.swing.plaf.BorderUIResource; + +/** + * @author Konstantin Bulenkov + * @author Jannis Weis + */ +public class DarkProgressBarBorder extends BorderUIResource.EmptyBorderUIResource { + public DarkProgressBarBorder() { + super(0, 0, 0, 0); + } +} diff --git a/src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarUI.java b/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarUI.java rename to src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java index 1f3200b1..bda25a70 100644 --- a/src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.progressbar; +/* + * 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.github.weisj.darklaf.ui.progressbar; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -55,8 +78,9 @@ public class DarkProgressBarUI extends BasicProgressBarUI { passedEndColor = UIManager.getColor("ProgressBar.passedEndColor"); } - protected static boolean hasFailed(@NotNull final JComponent c) { - return Boolean.TRUE.equals(c.getClientProperty("JProgressBar.failed")); + @Override + protected int getBoxLength(final int availableLength, final int otherDimension) { + return availableLength; } @Override @@ -144,6 +168,58 @@ public class DarkProgressBarUI extends BasicProgressBarUI { } } + protected static boolean hasFailed(@NotNull final JComponent c) { + return Boolean.TRUE.equals(c.getClientProperty("JProgressBar.failed")); + } + + protected static boolean hasPassed(@NotNull final JComponent c) { + return Boolean.TRUE.equals(c.getClientProperty("JProgressBar.passed")); + } + + protected Color getStartColor() { + return indeterminateStartColor; + } + + protected Color getEndColor() { + return indeterminateEndColor; + } + + @NotNull + @Contract("_, _, _, _, _ -> new") + private Shape getShapedRect(final float x, final float y, final float w, final float h, final float ar) { + return new RoundRectangle2D.Float(x, y, w, h, ar, ar); + } + + private void paintString(@NotNull final Graphics2D g, final int x, final int y, + final int w, final int h, final int fillStart, final int amountFull) { + String progressString = progressBar.getString(); + g.setFont(progressBar.getFont()); + Point renderLocation = getStringPlacement(g, progressString, x, y, w, h); + + var config = GraphicsUtil.setupAAPainting(g); + if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) { + g.setColor(getSelectionBackground()); + g.drawString(progressString, renderLocation.x, renderLocation.y); + + g.setColor(getSelectionForeground()); + g.clipRect(fillStart, y, amountFull, h); + g.drawString(progressString, renderLocation.x, renderLocation.y); + + } else { // VERTICAL + g.setColor(getSelectionBackground()); + AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2); + g.setFont(progressBar.getFont().deriveFont(rotate)); + renderLocation = getStringPlacement(g, progressString, x, y, w, h); + g.drawString(progressString, renderLocation.x, renderLocation.y); + + g.setColor(getSelectionForeground()); + g.clipRect(x, fillStart, w, amountFull); + + g.drawString(progressString, renderLocation.x, renderLocation.y); + } + config.restore(); + } + @Override protected void paintDeterminate(@NotNull final Graphics g, final JComponent c) { Graphics2D g2 = (Graphics2D) g.create(); @@ -235,59 +311,6 @@ public class DarkProgressBarUI extends BasicProgressBarUI { } } - protected static boolean hasPassed(@NotNull final JComponent c) { - return Boolean.TRUE.equals(c.getClientProperty("JProgressBar.passed")); - } - - @Override - protected int getBoxLength(final int availableLength, final int otherDimension) { - return availableLength; - } - - protected Color getStartColor() { - return indeterminateStartColor; - } - - protected Color getEndColor() { - return indeterminateEndColor; - } - - @NotNull - @Contract("_, _, _, _, _ -> new") - private Shape getShapedRect(final float x, final float y, final float w, final float h, final float ar) { - return new RoundRectangle2D.Float(x, y, w, h, ar, ar); - } - - private void paintString(@NotNull final Graphics2D g, final int x, final int y, - final int w, final int h, final int fillStart, final int amountFull) { - String progressString = progressBar.getString(); - g.setFont(progressBar.getFont()); - Point renderLocation = getStringPlacement(g, progressString, x, y, w, h); - - var config = GraphicsUtil.setupAAPainting(g); - if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) { - g.setColor(getSelectionBackground()); - g.drawString(progressString, renderLocation.x, renderLocation.y); - - g.setColor(getSelectionForeground()); - g.clipRect(fillStart, y, amountFull, h); - g.drawString(progressString, renderLocation.x, renderLocation.y); - - } else { // VERTICAL - g.setColor(getSelectionBackground()); - AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2); - g.setFont(progressBar.getFont().deriveFont(rotate)); - renderLocation = getStringPlacement(g, progressString, x, y, w, h); - g.drawString(progressString, renderLocation.x, renderLocation.y); - - g.setColor(getSelectionForeground()); - g.clipRect(x, fillStart, w, amountFull); - - g.drawString(progressString, renderLocation.x, renderLocation.y); - } - config.restore(); - } - @Contract(pure = true) private static boolean isSimplified() { return UIManager.getBoolean("ProgressBar.isSimplified"); diff --git a/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonBorder.java b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonBorder.java new file mode 100644 index 00000000..c51d21b6 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonBorder.java @@ -0,0 +1,74 @@ +/* + * 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.github.weisj.darklaf.ui.radiobutton; + + +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.SystemInfo; + +import javax.swing.*; +import javax.swing.border.Border; +import javax.swing.plaf.InsetsUIResource; +import javax.swing.plaf.UIResource; +import java.awt.*; + +/** + * @author Konstantin Bulenkov + * @author Jannis Weis + */ +public class DarkRadioButtonBorder implements Border, UIResource { + + @Override + public void paintBorder(final Component c, final Graphics g, final int x, final int y, + final int width, final int height) { + } + + @Override + public Insets getBorderInsets(final Component c) { + if (isInCell(c)) { + return new Insets(0, 0, 0, 0); + } + final int a = SystemInfo.isMac ? 2 : 4; + return new InsetsUIResource(a, a, a, a); + } + + protected boolean isInCell(final Component c) { + return isTreeCellEditor(c) || isTableCellEditor(c) || DarkUIUtil.isInCell(c); + } + + protected boolean isTreeCellEditor(final Component c) { + return c instanceof JComponent + && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); + } + + protected boolean isTableCellEditor(final Component c) { + return c instanceof JComponent + && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); + } + + @Override + public boolean isBorderOpaque() { + return false; + } +} diff --git a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java rename to src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java index 920de403..ceb97be1 100644 --- a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonMenuItemUI.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.radiobutton; +package com.github.weisj.darklaf.ui.radiobutton; -import com.weis.darklaf.decorators.MouseClickListener; -import com.weis.darklaf.ui.menu.DarkMenuItemUIBase; +import com.github.weisj.darklaf.decorators.MouseClickListener; +import com.github.weisj.darklaf.ui.menu.DarkMenuItemUIBase; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.MenuItemLayoutHelper; diff --git a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonUI.java b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonUI.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonUI.java rename to src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonUI.java index bd792e68..049a7072 100644 --- a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/radiobutton/DarkRadioButtonUI.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.radiobutton; +package com.github.weisj.darklaf.ui.radiobutton; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.ui.checkbox.DarkCheckBoxUI; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.ui.checkbox.DarkCheckBoxUI; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/github/weisj/darklaf/ui/rootpane/CloseButtonUI.java b/src/main/java/com/github/weisj/darklaf/ui/rootpane/CloseButtonUI.java new file mode 100644 index 00000000..f9e69cf8 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/rootpane/CloseButtonUI.java @@ -0,0 +1,51 @@ +/* + * 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.github.weisj.darklaf.ui.rootpane; + +import com.github.weisj.darklaf.ui.button.DarkButtonUI; +import org.jetbrains.annotations.NotNull; + +import javax.swing.*; +import java.awt.*; + +/** + * @author Jannis Weis + */ +public class CloseButtonUI extends DarkButtonUI { + + protected Color closeHover; + protected Color closeClick; + + @Override + protected void installDefaults(final AbstractButton b) { + super.installDefaults(b); + closeHover = UIManager.getColor("TitlePane.close.rollOverColor"); + closeClick = UIManager.getColor("TitlePane.close.clickColor"); + } + + @Override + protected Color getShadowColor(@NotNull final AbstractButton c) { + return c.getModel().isArmed() ? closeClick : closeHover; + } +} diff --git a/src/main/java/com/weis/darklaf/ui/rootpane/DarkRootPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/rootpane/DarkRootPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java index 29253842..1caae104 100644 --- a/src/main/java/com/weis/darklaf/ui/rootpane/DarkRootPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java @@ -1,4 +1,3 @@ -// 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 * @@ -22,9 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.rootpane; -import com.weis.darklaf.platform.windows.JNIDecorations; +package com.github.weisj.darklaf.ui.rootpane; + +import com.github.weisj.darklaf.platform.windows.JNIDecorations; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/rootpane/DarkTitlePane.java b/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkTitlePane.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/rootpane/DarkTitlePane.java rename to src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkTitlePane.java index fd893ae3..c2623ced 100644 --- a/src/main/java/com/weis/darklaf/ui/rootpane/DarkTitlePane.java +++ b/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkTitlePane.java @@ -1,4 +1,3 @@ -// 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 * @@ -22,11 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.rootpane; -import com.weis.darklaf.decorators.AncestorAdapter; -import com.weis.darklaf.platform.windows.JNIDecorations; -import com.weis.darklaf.util.GraphicsUtil; +package com.github.weisj.darklaf.ui.rootpane; + +import com.github.weisj.darklaf.decorators.AncestorAdapter; +import com.github.weisj.darklaf.platform.windows.JNIDecorations; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -60,6 +60,21 @@ public class DarkTitlePane extends JComponent { private static final int IMAGE_HEIGHT = 16; private static final int IMAGE_WIDTH = 16; private final JRootPane rootPane; + private final ContainerListener rootPaneContainerListener = new ContainerListener() { + @Override + public void componentAdded(@NotNull final ContainerEvent e) { + if (e.getChild() instanceof JLayeredPane) { + ((JLayeredPane) e.getChild()).addContainerListener(layeredPaneContainerListener); + } + } + + @Override + public void componentRemoved(@NotNull final ContainerEvent e) { + if (e.getChild() instanceof JLayeredPane) { + ((JLayeredPane) e.getChild()).removeContainerListener(layeredPaneContainerListener); + } + } + }; private boolean oldResizable; private PropertyChangeListener propertyChangeListener; private WindowListener windowListener; @@ -113,21 +128,6 @@ public class DarkTitlePane extends JComponent { public void componentRemoved(final ContainerEvent e) { } }; - private final ContainerListener rootPaneContainerListener = new ContainerListener() { - @Override - public void componentAdded(@NotNull final ContainerEvent e) { - if (e.getChild() instanceof JLayeredPane) { - ((JLayeredPane) e.getChild()).addContainerListener(layeredPaneContainerListener); - } - } - - @Override - public void componentRemoved(@NotNull final ContainerEvent e) { - if (e.getChild() instanceof JLayeredPane) { - ((JLayeredPane) e.getChild()).removeContainerListener(layeredPaneContainerListener); - } - } - }; private int state; private Color inactiveBackground; diff --git a/src/main/java/com/weis/darklaf/ui/rootpane/SubstanceRootLayout.java b/src/main/java/com/github/weisj/darklaf/ui/rootpane/SubstanceRootLayout.java similarity index 85% rename from src/main/java/com/weis/darklaf/ui/rootpane/SubstanceRootLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/rootpane/SubstanceRootLayout.java index 526a4e85..722d3c08 100644 --- a/src/main/java/com/weis/darklaf/ui/rootpane/SubstanceRootLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/rootpane/SubstanceRootLayout.java @@ -1,5 +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. -package com.weis.darklaf.ui.rootpane; +/* + * 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.github.weisj.darklaf.ui.rootpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/github/weisj/darklaf/ui/rootpane/TitlePaneIcon.java b/src/main/java/com/github/weisj/darklaf/ui/rootpane/TitlePaneIcon.java new file mode 100644 index 00000000..d33a16d2 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/rootpane/TitlePaneIcon.java @@ -0,0 +1,69 @@ +/* + * 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.github.weisj.darklaf.ui.rootpane; + +import org.jetbrains.annotations.Contract; + +import javax.swing.*; +import java.awt.*; + +/** + * @author Jannis Weis + */ +public class TitlePaneIcon implements Icon { + + private final Icon activeIcon; + private final Icon inactiveIcon; + private boolean active = true; + + @Contract(pure = true) + public TitlePaneIcon(final Icon active, final Icon inactive) { + this.activeIcon = active; + this.inactiveIcon = inactive; + } + + public void setActive(final boolean active) { + this.active = active; + } + + @Override + public void paintIcon(final Component c, final Graphics g, final int x, final int y) { + currentIcon().paintIcon(c, g, x, y); + } + + @Contract(pure = true) + private Icon currentIcon() { + return active ? activeIcon : inactiveIcon; + } + + @Override + public int getIconWidth() { + return currentIcon().getIconWidth(); + } + + @Override + public int getIconHeight() { + return currentIcon().getIconHeight(); + } +} diff --git a/src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollBarUI.java b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollBarUI.java rename to src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java index 42e06aa7..6d69998b 100644 --- a/src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollBarUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.scrollpane; +package com.github.weisj.darklaf.ui.scrollpane; -import com.weis.darklaf.decorators.MouseMovementListener; -import com.weis.darklaf.util.Animator; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.decorators.MouseMovementListener; +import com.github.weisj.darklaf.util.Animator; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollPaneUI.java similarity index 84% rename from src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollPaneUI.java index b12eb935..ba9264f2 100644 --- a/src/main/java/com/weis/darklaf/ui/scrollpane/DarkScrollPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollPaneUI.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.scrollpane; +/* + * 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.github.weisj.darklaf.ui.scrollpane; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java similarity index 68% rename from src/main/java/com/weis/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java rename to src/main/java/com/github/weisj/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java index 3948a441..4b0f8463 100644 --- a/src/main/java/com/weis/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java +++ b/src/main/java/com/github/weisj/darklaf/ui/scrollpane/ScrollLayoutManagerDelegate.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.scrollpane; +/* + * 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.github.weisj.darklaf.ui.scrollpane; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/ui/separator/DarkSeparatorUI.java b/src/main/java/com/github/weisj/darklaf/ui/separator/DarkSeparatorUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/separator/DarkSeparatorUI.java rename to src/main/java/com/github/weisj/darklaf/ui/separator/DarkSeparatorUI.java index 24d20b2d..e95f0903 100644 --- a/src/main/java/com/weis/darklaf/ui/separator/DarkSeparatorUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/separator/DarkSeparatorUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.separator; +package com.github.weisj.darklaf.ui.separator; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/slider/DarkSliderUI.java b/src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java similarity index 94% rename from src/main/java/com/weis/darklaf/ui/slider/DarkSliderUI.java rename to src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java index 2306ee40..a9fa1110 100644 --- a/src/main/java/com/weis/darklaf/ui/slider/DarkSliderUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java @@ -1,9 +1,32 @@ -package com.weis.darklaf.ui.slider; +/* + * 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.github.weisj.darklaf.ui.slider; -import com.weis.darklaf.decorators.MouseClickListener; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.decorators.MouseClickListener; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerBorder.java b/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerBorder.java similarity index 73% rename from src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerBorder.java index d755d545..9308cb2a 100644 --- a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerBorder.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.spinner; +/* + * 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.github.weisj.darklaf.ui.spinner; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java b/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java rename to src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java index 060d0ed2..d44dcd5c 100644 --- a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerUI.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.spinner; +package com.github.weisj.darklaf.ui.spinner; -import com.weis.darklaf.components.ArrowButton; -import com.weis.darklaf.decorators.LayoutManagerDelegate; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.ArrowButton; +import com.github.weisj.darklaf.decorators.LayoutManagerDelegate; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneBorder.java b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneBorder.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneBorder.java index 95e83e32..037c0b72 100644 --- a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.splitpane; +package com.github.weisj.darklaf.ui.splitpane; import javax.swing.plaf.BorderUIResource; diff --git a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDivider.java b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDivider.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDivider.java rename to src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDivider.java index 954b871b..fdf8cc84 100644 --- a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDivider.java +++ b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDivider.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.splitpane; +package com.github.weisj.darklaf.ui.splitpane; -import com.weis.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.icons.EmptyIcon; import org.jetbrains.annotations.Contract; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java index 23d50d9c..3029336b 100644 --- a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneDividerBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.splitpane; +package com.github.weisj.darklaf.ui.splitpane; import javax.swing.border.Border; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneUI.java index 552e7d81..5958a3aa 100644 --- a/src/main/java/com/weis/darklaf/ui/splitpane/DarkSplitPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/splitpane/DarkSplitPaneUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.splitpane; +package com.github.weisj.darklaf.ui.splitpane; -import com.weis.darklaf.decorators.LayoutManagerDelegate; +import com.github.weisj.darklaf.decorators.LayoutManagerDelegate; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/statusbar/DarkStatusBarUI.java b/src/main/java/com/github/weisj/darklaf/ui/statusbar/DarkStatusBarUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/statusbar/DarkStatusBarUI.java rename to src/main/java/com/github/weisj/darklaf/ui/statusbar/DarkStatusBarUI.java index c2041930..fade3a39 100644 --- a/src/main/java/com/weis/darklaf/ui/statusbar/DarkStatusBarUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/statusbar/DarkStatusBarUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.statusbar; +package com.github.weisj.darklaf.ui.statusbar; import org.jdesktop.swingx.JXStatusBar; import org.jdesktop.swingx.plaf.basic.BasicStatusBarUI; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkHandler.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkHandler.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkHandler.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkHandler.java index 3cc2a0a7..45e37029 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkHandler.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkHandler.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; @@ -221,11 +221,20 @@ public class DarkHandler extends TabbedPaneHandler { } } - protected Point getDragMousePos() { - var p = new Point(ui.dragRect.x + ui.dragRect.width / 2, ui.dragRect.y + ui.dragRect.height / 2); - p.x += ui.scrollableTabSupport.viewport.getX(); - p.y += ui.scrollableTabSupport.viewport.getY(); - return p; + @Override + public void componentAdded(@NotNull final ContainerEvent e) { + if (!(e.getChild() instanceof UIResource)) { + e.getChild().addFocusListener(ui.focusListener); + } + super.componentAdded(e); + } + + @Override + public void componentRemoved(@NotNull final ContainerEvent e) { + if (!(e.getChild() instanceof UIResource)) { + e.getChild().removeFocusListener(ui.focusListener); + } + super.componentRemoved(e); } protected void stopDrag(final MouseEvent e, final boolean changeTabs) { @@ -248,19 +257,10 @@ public class DarkHandler extends TabbedPaneHandler { ui.scrollableTabSupport.viewport.repaint(); } - @Override - public void componentAdded(@NotNull final ContainerEvent e) { - if (!(e.getChild() instanceof UIResource)) { - e.getChild().addFocusListener(ui.focusListener); - } - super.componentAdded(e); - } - - @Override - public void componentRemoved(@NotNull final ContainerEvent e) { - if (!(e.getChild() instanceof UIResource)) { - e.getChild().removeFocusListener(ui.focusListener); - } - super.componentRemoved(e); + protected Point getDragMousePos() { + var p = new Point(ui.dragRect.x + ui.dragRect.width / 2, ui.dragRect.y + ui.dragRect.height / 2); + p.x += ui.scrollableTabSupport.viewport.getX(); + p.y += ui.scrollableTabSupport.viewport.getY(); + return p; } } diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollHandler.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollHandler.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollHandler.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollHandler.java index 7e3a0842..1c05ee0e 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollHandler.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollHandler.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java index aca6cbe1..785d41e9 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabPanel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java index 6930082b..64504411 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabSupport.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; -import com.weis.darklaf.components.ScrollPopupMenu; -import com.weis.darklaf.decorators.PopupMenuAdapter; +import com.github.weisj.darklaf.components.ScrollPopupMenu; +import com.github.weisj.darklaf.decorators.PopupMenuAdapter; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java index bc53b7fa..408c664a 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkScrollableTabViewport.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabAreaButton.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabAreaButton.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabAreaButton.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabAreaButton.java index 5c2db386..616772e5 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabAreaButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabAreaButton.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java index a752a67d..9571c644 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneLayout.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java index 5149ece6..477bba88 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneScrollLayout.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java index 8a032ede..b58043c2 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java @@ -1,8 +1,31 @@ -package com.weis.darklaf.ui.tabbedpane; +/* + * 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.github.weisj.darklaf.ui.tabbedpane; -import com.weis.darklaf.components.uiresource.UIResourceWrapper; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.components.uiresource.UIResourceWrapper; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -154,6 +177,73 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { } } + @Override + protected void paintContentBorder(final Graphics g, final int tabPlacement, final int selectedIndex) { + + } + + @Override + protected void paintTabArea(@NotNull final Graphics g, final int tabPlacement, final int selectedIndex) { + paintTabAreaBackground(g, tabPlacement); + paintTabAreaBorder(g, tabPlacement); + super.paintTabArea(g, tabPlacement, selectedIndex); + } + + @Override + protected void paintTabBackground(@NotNull final Graphics g, final int tabPlacement, final int tabIndex, + final int x, + final int y, final int w, final int h, + final boolean isSelected) { + g.setColor(getTabBackgroundColor(tabIndex, isSelected, getRolloverTab() == tabIndex)); + g.fillRect(x, y, w, h); + } + + @Override + protected void paintTabBorder(@NotNull final Graphics g, final int tabPlacement, final int tabIndex, + final int x, final int y, final int w, final int h, + final boolean isSelected) { + g.setColor(getTabBorderColor()); + switch (tabPlacement) { + case TOP: + g.fillRect(x, y + h - 1, w, 1); + break; + case BOTTOM: + g.fillRect(x, y, w, 1); + break; + case LEFT: + g.fillRect(x + w - 1, y, 1, h); + break; + case RIGHT: + g.fillRect(x, y, 1, h); + break; + } + } + + @Override + protected void paintFocusIndicator(final Graphics g, final int tabPlacement, final Rectangle r, + final int tabIndex, final Rectangle iconRect, + final Rectangle textRect, final boolean isSelected) { + if (isSelected) { + if (!drawFocusBar()) return; + g.setColor(getAccentColor()); + int focusSize = UIManager.getInt("TabbedPane.focusBarHeight"); + switch (tabPlacement) { + case LEFT: + g.fillRect(r.x + r.width - focusSize, r.y, focusSize, r.height); + break; + case RIGHT: + g.fillRect(r.x, r.y, focusSize, r.height); + break; + case BOTTOM: + g.fillRect(r.x, r.y + 1, r.width, focusSize); + break; + default: + g.fillRect(r.x, r.y + r.height - focusSize, r.width, focusSize); + break; + } + } + } + @Override protected LayoutManager createLayoutManager() { if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) { @@ -259,84 +349,6 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { return handler; } - @Override - protected void paintContentBorder(final Graphics g, final int tabPlacement, final int selectedIndex) { - - } - - @Override - public void setRolloverTab(final int index) { - if (dragging) return; - int oldRollover = rolloverTabIndex; - super.setRolloverTab(index); - if (oldRollover != getRolloverTab()) { - repaintTab(oldRollover); - repaintTab(getRolloverTab()); - } - } - - @Override - protected void paintTabArea(@NotNull final Graphics g, final int tabPlacement, final int selectedIndex) { - paintTabAreaBackground(g, tabPlacement); - paintTabAreaBorder(g, tabPlacement); - super.paintTabArea(g, tabPlacement, selectedIndex); - } - - @Override - protected void paintTabBackground(@NotNull final Graphics g, final int tabPlacement, final int tabIndex, - final int x, - final int y, final int w, final int h, - final boolean isSelected) { - g.setColor(getTabBackgroundColor(tabIndex, isSelected, getRolloverTab() == tabIndex)); - g.fillRect(x, y, w, h); - } - - @Override - protected void paintTabBorder(@NotNull final Graphics g, final int tabPlacement, final int tabIndex, - final int x, final int y, final int w, final int h, - final boolean isSelected) { - g.setColor(getTabBorderColor()); - switch (tabPlacement) { - case TOP: - g.fillRect(x, y + h - 1, w, 1); - break; - case BOTTOM: - g.fillRect(x, y, w, 1); - break; - case LEFT: - g.fillRect(x + w - 1, y, 1, h); - break; - case RIGHT: - g.fillRect(x, y, 1, h); - break; - } - } - - @Override - protected void paintFocusIndicator(final Graphics g, final int tabPlacement, final Rectangle r, - final int tabIndex, final Rectangle iconRect, - final Rectangle textRect, final boolean isSelected) { - if (isSelected) { - if (!drawFocusBar()) return; - g.setColor(getAccentColor()); - int focusSize = UIManager.getInt("TabbedPane.focusBarHeight"); - switch (tabPlacement) { - case LEFT: - g.fillRect(r.x + r.width - focusSize, r.y, focusSize, r.height); - break; - case RIGHT: - g.fillRect(r.x, r.y, focusSize, r.height); - break; - case BOTTOM: - g.fillRect(r.x, r.y + 1, r.width, focusSize); - break; - default: - g.fillRect(r.x, r.y + r.height - focusSize, r.width, focusSize); - break; - } - } - } - @Override protected int tabForCoordinate(final JTabbedPane pane, final int x, final int y, final boolean validateIfNecessary) { @@ -351,6 +363,17 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { return tab; } + @Override + public void setRolloverTab(final int index) { + if (dragging) return; + int oldRollover = rolloverTabIndex; + super.setRolloverTab(index); + if (oldRollover != getRolloverTab()) { + repaintTab(oldRollover); + repaintTab(getRolloverTab()); + } + } + @Override protected void paintFocusIndicator(final Graphics g, final int tabPlacement, final Rectangle[] rects, final int tabIndex, @@ -388,6 +411,26 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { return super.calculateTabHeight(tabPlacement, tabIndex, fontHeight) - 1; } + @Override + protected int calculateMaxTabHeight(final int tabPlacement) { + return Math.max(super.calculateMaxTabHeight(tabPlacement), getFallBackSize()); + } + + @Override + protected int calculateMaxTabWidth(final int tabPlacement) { + return Math.max(super.calculateMaxTabWidth(tabPlacement), getFallBackSize()); + } + + @Override + protected int calculateTabAreaHeight(final int tabPlacement, final int horizRunCount, final int maxTabHeight) { + return Math.max(super.calculateTabAreaHeight(tabPlacement, horizRunCount, maxTabHeight), getFallBackSize()); + } + + @Override + protected int calculateTabAreaWidth(final int tabPlacement, final int vertRunCount, final int maxTabWidth) { + return Math.max(super.calculateTabAreaWidth(tabPlacement, vertRunCount, maxTabWidth), getFallBackSize()); + } + @Override protected Insets getTabAreaInsets(final int tabPlacement) { Insets insets = super.getTabAreaInsets(tabPlacement); @@ -427,16 +470,19 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { return insets; } - protected Color getTabBorderColor() { - return tabBorderColor; + protected int getFallBackSize() { + int max = 0; + if (scrollableTabLayoutEnabled() && scrollableTabSupport.newTabButton.isVisible()) { + max = Math.max(scrollableTabSupport.newTabButton.getPreferredSize().height, 27); + } + return max; } - public Color getTabBackgroundColor(final int tabIndex, final boolean isSelected, final boolean hover) { - if (isSelected) { - return hover ? selectedHoverBackground : selectedBackground; - } else { - return hover ? hoverBackground : tabPane.getBackgroundAt(tabIndex); + protected DarkScrollHandler getScrollHandler() { + if (scrollHandler == null) { + scrollHandler = new DarkScrollHandler(this); } + return scrollHandler; } protected boolean drawFocusBar() { @@ -452,11 +498,16 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { return focus ? focusAccent : accent; } - protected DarkScrollHandler getScrollHandler() { - if (scrollHandler == null) { - scrollHandler = new DarkScrollHandler(this); + protected Color getTabBorderColor() { + return tabBorderColor; + } + + public Color getTabBackgroundColor(final int tabIndex, final boolean isSelected, final boolean hover) { + if (isSelected) { + return hover ? selectedHoverBackground : selectedBackground; + } else { + return hover ? hoverBackground : tabPane.getBackgroundAt(tabIndex); } - return scrollHandler; } private void paintTabAreaBorder(@NotNull final Graphics g, final int tabPlacement) { @@ -663,34 +714,6 @@ public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge { p.x, p.y, e.getClickCount(), e.isPopupTrigger(), e.getButton()); } - @Override - protected int calculateMaxTabHeight(final int tabPlacement) { - return Math.max(super.calculateMaxTabHeight(tabPlacement), getFallBackSize()); - } - - @Override - protected int calculateMaxTabWidth(final int tabPlacement) { - return Math.max(super.calculateMaxTabWidth(tabPlacement), getFallBackSize()); - } - - @Override - protected int calculateTabAreaHeight(final int tabPlacement, final int horizRunCount, final int maxTabHeight) { - return Math.max(super.calculateTabAreaHeight(tabPlacement, horizRunCount, maxTabHeight), getFallBackSize()); - } - - @Override - protected int calculateTabAreaWidth(final int tabPlacement, final int vertRunCount, final int maxTabWidth) { - return Math.max(super.calculateTabAreaWidth(tabPlacement, vertRunCount, maxTabWidth), getFallBackSize()); - } - - protected int getFallBackSize() { - int max = 0; - if (scrollableTabLayoutEnabled() && scrollableTabSupport.newTabButton.isVisible()) { - max = Math.max(scrollableTabSupport.newTabButton.getPreferredSize().height, 27); - } - return max; - } - protected void layoutTabComponents() { if (tabContainer == null) { return; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java index 20514299..d47db394 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUIBridge.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.LazyActionMap; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.LazyActionMap; import org.jetbrains.annotations.NotNull; import sun.swing.DefaultLookup; import sun.swing.SwingUtilities2; @@ -423,6 +423,20 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi return Component.BaselineResizeBehavior.OTHER; } + protected void ensureCurrentLayout() { + if (!tabPane.isValid()) { + tabPane.validate(); + } + /* If tabPane doesn't have a peer yet, the validate() call will + * silently fail. We handle that by forcing a layout if tabPane + * is still invalid. See bug 4237677. + */ + if (!tabPane.isValid()) { + TabbedPaneLayout layout = (TabbedPaneLayout) tabPane.getLayout(); + layout.calculateLayoutInfo(); + } + } + /** * Paints the content border. * @@ -801,22 +815,6 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi installTabContainer(); } - /** - * Reloads the mnemonics. This should be invoked when a memonic changes, when the title of a mnemonic changes, or - * when tabs are added/removed. - */ - protected void updateMnemonics() { - resetMnemonics(); - for (int counter = tabPane.getTabCount() - 1; counter >= 0; - counter--) { - int mnemonic = tabPane.getMnemonicAt(counter); - - if (mnemonic > 0) { - addMnemonic(counter, mnemonic); - } - } - } - /** * Install the defaults. */ @@ -991,15 +989,19 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi } /** - * Sets the tab the mouse is over by location. This is a cover method for setRolloverTab(tabForCoordinate(x, - * y, false)). + * Reloads the mnemonics. This should be invoked when a memonic changes, when the title of a mnemonic changes, or + * when tabs are added/removed. */ - protected void setRolloverTab(final int x, final int y) { - // NOTE: - // This calls in with false otherwise it could trigger a validate, - // which should NOT happen if the user is only dragging the - // mouse around. - setRolloverTab(tabForCoordinate(tabPane, x, y, false)); + protected void updateMnemonics() { + resetMnemonics(); + for (int counter = tabPane.getTabCount() - 1; counter >= 0; + counter--) { + int mnemonic = tabPane.getMnemonicAt(counter); + + if (mnemonic > 0) { + addMnemonic(counter, mnemonic); + } + } } /** @@ -1042,15 +1044,15 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi } /** - * Returns a point which is translated from the specified point in the JTabbedPane's coordinate space to the - * coordinate space of the ScrollableTabPanel. This is used for SCROLL_TAB_LAYOUT ONLY. + * Sets the tab the mouse is over by location. This is a cover method for setRolloverTab(tabForCoordinate(x, + * y, false)). */ - protected Point translatePointToTabPanel(final int srcx, final int srcy, final Point dest) { - Point vpp = tabScroller.viewport.getLocation(); - Point viewp = tabScroller.viewport.getViewPosition(); - dest.x = srcx - vpp.x + viewp.x; - dest.y = srcy - vpp.y + viewp.y; - return dest; + protected void setRolloverTab(final int x, final int y) { + // NOTE: + // This calls in with false otherwise it could trigger a validate, + // which should NOT happen if the user is only dragging the + // mouse around. + setRolloverTab(tabForCoordinate(tabPane, x, y, false)); } protected int tabForCoordinate(final JTabbedPane pane, final int x, final int y, @@ -1081,6 +1083,18 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi return -1; } + /** + * Returns a point which is translated from the specified point in the JTabbedPane's coordinate space to the + * coordinate space of the ScrollableTabPanel. This is used for SCROLL_TAB_LAYOUT ONLY. + */ + protected Point translatePointToTabPanel(final int srcx, final int srcy, final Point dest) { + Point vpp = tabScroller.viewport.getLocation(); + Point viewp = tabScroller.viewport.getViewPosition(); + dest.x = srcx - vpp.x + viewp.x; + dest.y = srcy - vpp.y + viewp.y; + return dest; + } + /** * Returns the tab the mouse is currently over, or {@code -1} if the mouse is no longer over any tab. * @@ -1178,6 +1192,24 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi return tabForCoordinate(pane, x, y, true); } + +// TabbedPaneUI methods + + /** + * Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate + * space. + */ + public Rectangle getTabBounds(final JTabbedPane pane, final int i) { + ensureCurrentLayout(); + Rectangle tabRect = new Rectangle(); + return getTabBounds(i, tabRect); + } + + public int getTabRunCount(final JTabbedPane pane) { + ensureCurrentLayout(); + return runCount; + } + protected int calculateBaselineIfNecessary() { if (!calculatedBaseline) { calculatedBaseline = true; @@ -1189,9 +1221,6 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi return baseline; } - -// TabbedPaneUI methods - protected void calculateBaseline() { int tabCount = tabPane.getTabCount(); int tabPlacement = tabPane.getTabPlacement(); @@ -1220,76 +1249,13 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi } } +// BasicTabbedPaneUI methods + protected abstract void paintFocusIndicator(final Graphics g, final int tabPlacement, final Rectangle[] rects, final int tabIndex, final Rectangle iconRect, final Rectangle textRect, final boolean isSelected); - /** - * Returns the bounds of the specified tab index. The bounds are with respect to the JTabbedPane's coordinate - * space. - */ - public Rectangle getTabBounds(final JTabbedPane pane, final int i) { - ensureCurrentLayout(); - Rectangle tabRect = new Rectangle(); - return getTabBounds(i, tabRect); - } - - protected void ensureCurrentLayout() { - if (!tabPane.isValid()) { - tabPane.validate(); - } - /* If tabPane doesn't have a peer yet, the validate() call will - * silently fail. We handle that by forcing a layout if tabPane - * is still invalid. See bug 4237677. - */ - if (!tabPane.isValid()) { - TabbedPaneLayout layout = (TabbedPaneLayout) tabPane.getLayout(); - layout.calculateLayoutInfo(); - } - } - -// BasicTabbedPaneUI methods - - public int getTabRunCount(final JTabbedPane pane) { - ensureCurrentLayout(); - return runCount; - } - - /** - * Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component. This is required - * because the tab rects are by default defined in the coordinate space of the component where they are rendered, - * which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT). This method - * should be used whenever the tab rectangle must be relative to the JTabbedPane itself and the result should be - * placed in a designated Rectangle object (rather than instantiating and returning a new Rectangle each time). The - * tab index parameter must be a valid tabbed pane tab index (0 to tab count - 1, inclusive). The destination - * rectangle parameter must be a valid Rectangle instance. The handling of invalid parameters is - * unspecified. - * - * @param tabIndex the index of the tab - * @param dest the rectangle where the result should be placed - * @return the resulting rectangle - * @since 1.4 - */ - protected Rectangle getTabBounds(final int tabIndex, final Rectangle dest) { - dest.width = rects[tabIndex].width; - dest.height = rects[tabIndex].height; - - if (scrollableTabLayoutEnabled()) { // SCROLL_TAB_LAYOUT - // Need to translate coordinates based on viewport location & - // view position - Point vpp = tabScroller.viewport.getLocation(); - Point viewp = tabScroller.viewport.getViewPosition(); - dest.x = rects[tabIndex].x + vpp.x - viewp.x; - dest.y = rects[tabIndex].y + vpp.y - viewp.y; - - } else { // WRAP_TAB_LAYOUT - dest.x = rects[tabIndex].x; - dest.y = rects[tabIndex].y; - } - return dest; - } - /** * Assure the rectangles are created. * @@ -1703,9 +1669,6 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi } } - -// Tab Navigation methods - /** * Select the next tab in the run. * @@ -1721,6 +1684,9 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi navigateTo(tabIndex); } + +// Tab Navigation methods + /** * Select the previous tab in the run. * @@ -1838,6 +1804,40 @@ public abstract class DarkTabbedPaneUIBridge extends TabbedPaneUI implements Swi } } + /** + * Returns the bounds of the specified tab in the coordinate space of the JTabbedPane component. This is required + * because the tab rects are by default defined in the coordinate space of the component where they are rendered, + * which could be the JTabbedPane (for WRAP_TAB_LAYOUT) or a ScrollableTabPanel (SCROLL_TAB_LAYOUT). This method + * should be used whenever the tab rectangle must be relative to the JTabbedPane itself and the result should be + * placed in a designated Rectangle object (rather than instantiating and returning a new Rectangle each time). The + * tab index parameter must be a valid tabbed pane tab index (0 to tab count - 1, inclusive). The destination + * rectangle parameter must be a valid Rectangle instance. The handling of invalid parameters is + * unspecified. + * + * @param tabIndex the index of the tab + * @param dest the rectangle where the result should be placed + * @return the resulting rectangle + * @since 1.4 + */ + protected Rectangle getTabBounds(final int tabIndex, final Rectangle dest) { + dest.width = rects[tabIndex].width; + dest.height = rects[tabIndex].height; + + if (scrollableTabLayoutEnabled()) { // SCROLL_TAB_LAYOUT + // Need to translate coordinates based on viewport location & + // view position + Point vpp = tabScroller.viewport.getLocation(); + Point viewp = tabScroller.viewport.getViewPosition(); + dest.x = rects[tabIndex].x + vpp.x - viewp.x; + dest.y = rects[tabIndex].y + vpp.y - viewp.y; + + } else { // WRAP_TAB_LAYOUT + dest.x = rects[tabIndex].x; + dest.y = rects[tabIndex].y; + } + return dest; + } + /** * Returns the index of the tab closest to the passed in location, note that the returned tab may not contain the * location x,y. diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/MoreTabsButton.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/MoreTabsButton.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java index 7632767b..5350bf68 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/MoreTabsButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/NewTabButton.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/NewTabButton.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/NewTabButton.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/NewTabButton.java index c66485fe..b7fc801f 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/NewTabButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/NewTabButton.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabPanel.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabPanel.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabPanel.java index f75b96f3..5f280ad1 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabPanel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabSupport.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabSupport.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabSupport.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabSupport.java index b88187e3..96740ebd 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabSupport.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabSupport.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabViewport.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabViewport.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabViewport.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabViewport.java index fb5c2371..176bb3e3 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/ScrollableTabViewport.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/ScrollableTabViewport.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneHandler.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneHandler.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneHandler.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneHandler.java index 6579db67..5d94fbf9 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneHandler.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneHandler.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneLayout.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneLayout.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneLayout.java index bca90b94..9a397ca2 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneLayout.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java index 533a36f5..94b9e3e6 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneScrollLayout.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java index f9156fc0..e7abcca2 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneTransferHandler.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabbedpane; +package com.github.weisj.darklaf.ui.tabbedpane; -import com.weis.darklaf.util.ImageUtil; +import com.github.weisj.darklaf.util.ImageUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneUtil.java b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneUtil.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneUtil.java rename to src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneUtil.java index 03ebfa07..04176c06 100644 --- a/src/main/java/com/weis/darklaf/ui/tabbedpane/TabbedPaneUtil.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/TabbedPaneUtil.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.tabbedpane; +/* + * 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.github.weisj.darklaf.ui.tabbedpane; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkPanelPopupUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkPanelPopupUI.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkPanelPopupUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkPanelPopupUI.java index 949f1127..e713ea37 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkPanelPopupUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkPanelPopupUI.java @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; - -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.border.MutableLineBorder; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.PanelPopup; -import com.weis.darklaf.components.tooltip.ToolTipContext; -import com.weis.darklaf.components.uiresource.JLabelUIResource; -import com.weis.darklaf.ui.panel.DarkPanelUI; -import com.weis.darklaf.util.DarkUIUtil; +package com.github.weisj.darklaf.ui.tabframe; + +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.PanelPopup; +import com.github.weisj.darklaf.components.tooltip.ToolTipContext; +import com.github.weisj.darklaf.components.uiresource.JLabelUIResource; +import com.github.weisj.darklaf.ui.panel.DarkPanelUI; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java index 49887e46..4a9be1ce 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameComponentPopupMenu.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; -import com.weis.darklaf.components.JXPopupMenu; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tabframe.TabFrameTab; -import com.weis.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.components.JXPopupMenu; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tabframe.TabFrameTab; +import com.github.weisj.darklaf.icons.EmptyIcon; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java index cc25c240..0ae3ecf4 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFramePopupHeaderBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; import javax.swing.plaf.BorderUIResource; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabBorder.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabBorder.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabBorder.java index 120bca18..f61e1e15 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabBorder.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; import javax.swing.plaf.BorderUIResource; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java index 89d7b77f..7596b422 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabContainerUI.java @@ -21,13 +21,13 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.TabFrameTabContainer; -import com.weis.darklaf.decorators.HoverListener; -import com.weis.darklaf.ui.panel.DarkPanelUI; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.TabFrameTabContainer; +import com.github.weisj.darklaf.decorators.HoverListener; +import com.github.weisj.darklaf.ui.panel.DarkPanelUI; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java index 4e85f4e1..340b0863 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameTabLabelUI.java @@ -21,15 +21,15 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.TabFrameTabLabel; -import com.weis.darklaf.decorators.HoverListener; -import com.weis.darklaf.icons.RotatableIcon; -import com.weis.darklaf.ui.label.DarkLabelUI; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.TabFrameTabLabel; +import com.github.weisj.darklaf.decorators.HoverListener; +import com.github.weisj.darklaf.icons.RotatableIcon; +import com.github.weisj.darklaf.ui.label.DarkLabelUI; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameUI.java index ada43612..c1c12d09 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabFrameUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabFrameUI.java @@ -21,17 +21,17 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; - -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.border.MutableLineBorder; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.PopupContainer; -import com.weis.darklaf.components.tabframe.TabFramePopup; -import com.weis.darklaf.components.tabframe.TabFrameTab; -import com.weis.darklaf.components.tabframe.TabFrameUI; -import com.weis.darklaf.components.uiresource.JPanelUIResource; -import com.weis.darklaf.util.Pair; +package com.github.weisj.darklaf.ui.tabframe; + +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.PopupContainer; +import com.github.weisj.darklaf.components.tabframe.TabFramePopup; +import com.github.weisj.darklaf.components.tabframe.TabFrameTab; +import com.github.weisj.darklaf.components.tabframe.TabFrameUI; +import com.github.weisj.darklaf.components.uiresource.JPanelUIResource; +import com.github.weisj.darklaf.util.Pair; import org.jdesktop.jxlayer.JXLayer; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -310,6 +310,22 @@ public class DarkTabFrameUI extends TabFrameUI implements AWTEventListener { return new Pair<>(new JTabFrame.TabFramePosition(a, -1), pos); } + public JComponent getTopContainer() { + return tabFrame.getTopTabContainer(); + } + + public JComponent getBottomContainer() { + return tabFrame.getBottomTabContainer(); + } + + public JComponent getLeftContainer() { + return rotatePaneLeft; + } + + public JComponent getRightContainer() { + return rotatePaneRight; + } + protected JTabFrame.TabFramePosition maybeRestoreTabContainer(@NotNull final JTabFrame tabFrame, final Point p) { Alignment a = null; int size = tabFrame.getTabSize(); @@ -383,36 +399,6 @@ public class DarkTabFrameUI extends TabFrameUI implements AWTEventListener { } } - protected Component getTabContainer(@NotNull final Alignment a) { - switch (a) { - case NORTH: - case NORTH_EAST: - return getTopContainer(); - case EAST: - case SOUTH_EAST: - return getRightContainer(); - case SOUTH: - case SOUTH_WEST: - return getBottomContainer(); - case WEST: - case NORTH_WEST: - return getLeftContainer(); - } - return null; - } - - public JComponent getTopContainer() { - return tabFrame.getTopTabContainer(); - } - - public JComponent getRightContainer() { - return rotatePaneRight; - } - - public JComponent getBottomContainer() { - return tabFrame.getBottomTabContainer(); - } - @Override public JTabFrame.TabFramePosition getNearestTabIndexAt(final JTabFrame tabFrame, final Point pos) { return getNearestTabIndexAtImpl(tabFrame, pos).getFirst(); @@ -461,8 +447,22 @@ public class DarkTabFrameUI extends TabFrameUI implements AWTEventListener { return res; } - public JComponent getLeftContainer() { - return rotatePaneLeft; + protected Component getTabContainer(@NotNull final Alignment a) { + switch (a) { + case NORTH: + case NORTH_EAST: + return getTopContainer(); + case EAST: + case SOUTH_EAST: + return getRightContainer(); + case SOUTH: + case SOUTH_WEST: + return getBottomContainer(); + case WEST: + case NORTH_WEST: + return getLeftContainer(); + } + return null; } public void setDropSize(final int width, final int height) { diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabbedPopupUI.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabbedPopupUI.java similarity index 94% rename from src/main/java/com/weis/darklaf/ui/tabframe/DarkTabbedPopupUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabbedPopupUI.java index dad901fb..931b7da2 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/DarkTabbedPopupUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/DarkTabbedPopupUI.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; - -import com.weis.darklaf.components.border.MutableLineBorder; -import com.weis.darklaf.components.tabframe.TabbedPopup; -import com.weis.darklaf.components.uiresource.JPanelUIResource; -import com.weis.darklaf.ui.tabbedpane.DarkTabbedPaneUI; -import com.weis.darklaf.ui.tabbedpane.MoreTabsButton; -import com.weis.darklaf.ui.tabbedpane.NewTabButton; +package com.github.weisj.darklaf.ui.tabframe; + +import com.github.weisj.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.tabframe.TabbedPopup; +import com.github.weisj.darklaf.components.uiresource.JPanelUIResource; +import com.github.weisj.darklaf.ui.tabbedpane.DarkTabbedPaneUI; +import com.github.weisj.darklaf.ui.tabbedpane.MoreTabsButton; +import com.github.weisj.darklaf.ui.tabbedpane.NewTabButton; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -157,8 +157,13 @@ public class DarkTabbedPopupUI extends DarkPanelPopupUI { protected class DarkTabFrameTabbedPaneUI extends DarkTabbedPaneUI { @Override - protected Color getTabAreaBackground() { - return hasFocus() ? headerFocusBackground : headerBackground; + protected Color getAccentColor(final boolean focus) { + return super.getAccentColor(focus || hasFocus()); + } + + @Override + protected Color getTabBorderColor() { + return tabBorderColor; } public Color getTabBackgroundColor(final int tabIndex, final boolean isSelected, final boolean hover) { @@ -178,13 +183,8 @@ public class DarkTabbedPopupUI extends DarkPanelPopupUI { } @Override - protected Color getTabBorderColor() { - return tabBorderColor; - } - - @Override - protected Color getAccentColor(final boolean focus) { - return super.getAccentColor(focus || hasFocus()); + protected Color getTabAreaBackground() { + return hasFocus() ? headerFocusBackground : headerBackground; } @Override diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/TabDragListener.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabDragListener.java similarity index 93% rename from src/main/java/com/weis/darklaf/ui/tabframe/TabDragListener.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/TabDragListener.java index c5f82aa6..ddd56222 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/TabDragListener.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabDragListener.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; -import com.weis.darklaf.components.tabframe.TabFrameTab; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.SwingXUtilities; +import com.github.weisj.darklaf.components.tabframe.TabFrameTab; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.SwingXUtilities; import org.jdesktop.jxlayer.JXLayer; import org.jetbrains.annotations.NotNull; @@ -37,13 +37,12 @@ import java.awt.event.MouseEvent; public class TabDragListener extends MouseAdapter { private final TabFrameTab tabComponent; + protected Point origin; public TabDragListener(final TabFrameTab tabComponent) { this.tabComponent = tabComponent; } - protected Point origin; - @Override public void mousePressed(@NotNull final MouseEvent e) { origin = e.getPoint(); diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/TabFrameLayout.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameLayout.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/tabframe/TabFrameLayout.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameLayout.java index b6c743de..86d93967 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/TabFrameLayout.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameLayout.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; +package com.github.weisj.darklaf.ui.tabframe; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tabframe/TabFrameTransferHandler.java b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameTransferHandler.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tabframe/TabFrameTransferHandler.java rename to src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameTransferHandler.java index 7e0f2b22..6b0f6b49 100644 --- a/src/main/java/com/weis/darklaf/ui/tabframe/TabFrameTransferHandler.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tabframe/TabFrameTransferHandler.java @@ -21,14 +21,14 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tabframe; - -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.TabFramePopup; -import com.weis.darklaf.components.tabframe.TabFrameTab; -import com.weis.darklaf.components.tabframe.TabFrameUI; -import com.weis.darklaf.util.ImageUtil; +package com.github.weisj.darklaf.ui.tabframe; + +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.TabFramePopup; +import com.github.weisj.darklaf.components.tabframe.TabFrameTab; +import com.github.weisj.darklaf.components.tabframe.TabFrameUI; +import com.github.weisj.darklaf.util.ImageUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -55,13 +55,12 @@ import java.awt.event.MouseEvent; /** - * @author Robert Futrell * @author Jannis Weis */ public class TabFrameTransferHandler extends TransferHandler implements DropTargetListener, SwingConstants { private static final String MIME_TYPE = DataFlavor.javaJVMLocalObjectMimeType - + ";class=com.weis.darklaf.components.tabframe.JTabFrame"; + + ";class=com.github.weisj.darklaf.components.tabframe.JTabFrame"; private static TabbedPaneDragGestureRecognizer recognizer = null; private final Timer timer; private final Timer startTimer; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkColorTableCellRendererEditor.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkColorTableCellRendererEditor.java similarity index 65% rename from src/main/java/com/weis/darklaf/ui/table/DarkColorTableCellRendererEditor.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkColorTableCellRendererEditor.java index d73dac1b..cb2b483f 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkColorTableCellRendererEditor.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkColorTableCellRendererEditor.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; import javax.swing.*; import javax.swing.table.TableCellEditor; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableBorder.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableBorder.java similarity index 93% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableBorder.java index e97c681e..f6d691da 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellBorder.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableCellBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellBorder.java index 6d5def5b..dc41cbd7 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.ui.cell.DarkCellBorder; +import com.github.weisj.darklaf.ui.cell.DarkCellBorder; /** * @author Jannis Weis diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditor.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditor.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java index 504b4507..fa777868 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditor.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.ui.combobox.DarkComboBoxUI; +import com.github.weisj.darklaf.ui.combobox.DarkComboBoxUI; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditorToggleButton.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditorToggleButton.java similarity index 69% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditorToggleButton.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditorToggleButton.java index 59773a1a..50e04265 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellEditorToggleButton.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditorToggleButton.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.decorators.CellRenderer; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.decorators.CellRenderer; +import com.github.weisj.darklaf.util.DarkUIUtil; import javax.swing.*; import javax.swing.table.TableCellEditor; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellFocusBorder.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellFocusBorder.java similarity index 57% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableCellFocusBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellFocusBorder.java index 1cb502ac..a9362cce 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellFocusBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellFocusBorder.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.ui.cell.DarkCellBorder; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.ui.cell.DarkCellBorder; +import com.github.weisj.darklaf.util.DarkUIUtil; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellRenderer.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellRenderer.java similarity index 76% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableCellRenderer.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellRenderer.java index 08e49304..2ebc1401 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableCellRenderer.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellRenderer.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.ui.cell.DarkCellRendererToggleButton; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.ui.cell.DarkCellRendererToggleButton; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderBorder.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderBorder.java index 18902638..8db1ac70 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderCorner.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderCorner.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderCorner.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderCorner.java index 8a4f338d..cd75bea9 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderCorner.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderCorner.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUI.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUI.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUI.java index a9017782..ca5f5d34 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUIBridge.java index 470acf7b..a04e3dd3 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableHeaderUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableHeaderUIBridge.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; import sun.swing.UIAction; @@ -138,6 +138,7 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { } return selectedColumnIndex; } + /** * Selects the specified column in the table header. Repaints the affected header cells and makes sure the newly * selected one is visible. @@ -146,6 +147,17 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { selectColumn(newColIndex, true); } + void selectColumn(final int newColIndex, final boolean doScroll) { + Rectangle repaintRect = header.getHeaderRect(selectedColumnIndex); + header.repaint(repaintRect); + selectedColumnIndex = newColIndex; + repaintRect = header.getHeaderRect(newColIndex); + header.repaint(repaintRect); + if (doScroll) { + scrollToColumn(newColIndex); + } + } + /** * Creates the mouse listener for the {@code JTableHeader}. * @@ -180,15 +192,58 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { table.scrollRectToVisible(vis); } - void selectColumn(final int newColIndex, final boolean doScroll) { - Rectangle repaintRect = header.getHeaderRect(selectedColumnIndex); - header.repaint(repaintRect); - selectedColumnIndex = newColIndex; - repaintRect = header.getHeaderRect(newColIndex); - header.repaint(repaintRect); - if (doScroll) { - scrollToColumn(newColIndex); + protected int selectPreviousColumn(final boolean doIt) { + int newIndex = getSelectedColumnIndex(); + if (newIndex > 0) { + newIndex--; + if (doIt) { + selectColumn(newIndex); + } + } + return newIndex; + } + + protected int changeColumnWidth(final TableColumn resizingColumn, + final JTableHeader th, + final int oldWidth, final int newWidth) { + resizingColumn.setWidth(newWidth); + + Container container; + JTable table; + + if ((th.getParent() == null) || + ((container = th.getParent().getParent()) == null) || + !(container instanceof JScrollPane) || + ((table = th.getTable()) == null)) { + return 0; + } + + if (!container.getComponentOrientation().isLeftToRight() && + !th.getComponentOrientation().isLeftToRight()) { + JViewport viewport = ((JScrollPane) container).getViewport(); + int viewportWidth = viewport.getWidth(); + int diff = newWidth - oldWidth; + int newHeaderWidth = table.getWidth() + diff; + + /* Resize a table */ + Dimension tableSize = table.getSize(); + tableSize.width += diff; + table.setSize(tableSize); + + /* If this table is in AUTO_RESIZE_OFF mode and + * has a horizontal scrollbar, we need to update + * a view's position. + */ + if ((newHeaderWidth >= viewportWidth) && + (table.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF)) { + Point p = viewport.getViewPosition(); + p.x = Math.max(0, Math.min(newHeaderWidth - viewportWidth, + p.x + diff)); + viewport.setViewPosition(p); + return diff; + } } + return 0; } protected static class Actions extends UIAction { @@ -337,6 +392,7 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { ui.changeColumnWidth(resizingColumn, th, oldWidth, newWidth); } } + /** * This class should be treated as a "protected" inner class. Instantiate it only within subclasses of * {@code DarkTableHeaderUIBridge}. @@ -543,59 +599,6 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { super.installUI(c); } - protected int selectPreviousColumn(final boolean doIt) { - int newIndex = getSelectedColumnIndex(); - if (newIndex > 0) { - newIndex--; - if (doIt) { - selectColumn(newIndex); - } - } - return newIndex; - } - - protected int changeColumnWidth(final TableColumn resizingColumn, - final JTableHeader th, - final int oldWidth, final int newWidth) { - resizingColumn.setWidth(newWidth); - - Container container; - JTable table; - - if ((th.getParent() == null) || - ((container = th.getParent().getParent()) == null) || - !(container instanceof JScrollPane) || - ((table = th.getTable()) == null)) { - return 0; - } - - if (!container.getComponentOrientation().isLeftToRight() && - !th.getComponentOrientation().isLeftToRight()) { - JViewport viewport = ((JScrollPane) container).getViewport(); - int viewportWidth = viewport.getWidth(); - int diff = newWidth - oldWidth; - int newHeaderWidth = table.getWidth() + diff; - - /* Resize a table */ - Dimension tableSize = table.getSize(); - tableSize.width += diff; - table.setSize(tableSize); - - /* If this table is in AUTO_RESIZE_OFF mode and - * has a horizontal scrollbar, we need to update - * a view's position. - */ - if ((newHeaderWidth >= viewportWidth) && - (table.getAutoResizeMode() == JTable.AUTO_RESIZE_OFF)) { - Point p = viewport.getViewPosition(); - p.x = Math.max(0, Math.min(newHeaderWidth - viewportWidth, - p.x + diff)); - viewport.setViewPosition(p); - return diff; - } - } - return 0; - } /** * Initializes JTableHeader properties such as font, foreground, and background. The font, foreground, and @@ -625,9 +628,6 @@ public class DarkTableHeaderUIBridge extends BasicTableHeaderUI { // Uninstall methods - - - public void uninstallUI(final JComponent c) { uninstallDefaults(); uninstallListeners(); diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableUI.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java similarity index 94% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableUI.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java index a45400f5..49f31287 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/table/DarkTableUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/table/DarkTableUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUIBridge.java index 5bf1aace..9e7e0600 100644 --- a/src/main/java/com/weis/darklaf/ui/table/DarkTableUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUIBridge.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/com/weis/darklaf/ui/table/TableUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/table/TableUIBridge.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/table/TableUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/table/TableUIBridge.java index e9d54faa..1d423101 100644 --- a/src/main/java/com/weis/darklaf/ui/table/TableUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/TableUIBridge.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.table; +package com.github.weisj.darklaf.ui.table; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.LazyActionMap; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.LazyActionMap; import org.jdesktop.swingx.plaf.basic.core.BasicTransferable; import org.jdesktop.swingx.plaf.basic.core.DragRecognitionSupport; import sun.swing.DefaultLookup; diff --git a/src/main/java/com/weis/darklaf/ui/table/TextFieldTableCellEditorBorder.java b/src/main/java/com/github/weisj/darklaf/ui/table/TextFieldTableCellEditorBorder.java similarity index 69% rename from src/main/java/com/weis/darklaf/ui/table/TextFieldTableCellEditorBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/table/TextFieldTableCellEditorBorder.java index c7551e05..4e9be375 100644 --- a/src/main/java/com/weis/darklaf/ui/table/TextFieldTableCellEditorBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/table/TextFieldTableCellEditorBorder.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.table; +/* + * 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.github.weisj.darklaf.ui.table; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java b/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java rename to src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java index d9261d63..c28500f9 100644 --- a/src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneContainerUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.taskpane; +package com.github.weisj.darklaf.ui.taskpane; import org.jdesktop.swingx.plaf.basic.BasicTaskPaneContainerUI; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java index 2d85e459..4777fbd7 100644 --- a/src/main/java/com/weis/darklaf/ui/taskpane/DarkTaskPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.taskpane; +package com.github.weisj.darklaf.ui.taskpane; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jdesktop.swingx.JXCollapsiblePane; import org.jdesktop.swingx.JXHyperlink; import org.jdesktop.swingx.JXTaskPane; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkCaret.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/text/DarkCaret.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java index 39ca2909..1074f957 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkCaret.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -56,9 +79,6 @@ public class DarkCaret extends DefaultCaret implements UIResource { public CaretStyle getStyle() { return style; - } @Override - protected void positionCaret(final MouseEvent e) { - super.positionCaret(e); } public void setStyle(final CaretStyle style) { @@ -72,6 +92,11 @@ public class DarkCaret extends DefaultCaret implements UIResource { } } + @Override + protected void positionCaret(final MouseEvent e) { + super.positionCaret(e); + } + public boolean isAlwaysVisible() { return alwaysVisible; } @@ -94,6 +119,15 @@ public class DarkCaret extends DefaultCaret implements UIResource { } } } + + public enum CaretStyle { + VERTICAL_LINE_STYLE, + UNDERLINE_STYLE, + BLOCK_STYLE, + BLOCK_BORDER_STYLE, + THICK_VERTICAL_LINE_STYLE + } + /** * Called when the mouse is clicked. If the click was generated from button1, a double click selects a word, and a * triple click the current line. @@ -202,15 +236,6 @@ public class DarkCaret extends DefaultCaret implements UIResource { } - public enum CaretStyle { - VERTICAL_LINE_STYLE, - UNDERLINE_STYLE, - BLOCK_STYLE, - BLOCK_BORDER_STYLE, - THICK_VERTICAL_LINE_STYLE - } - - @Override public void mousePressed(final MouseEvent e) { super.mousePressed(e); diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkEditorPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkEditorPaneUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/text/DarkEditorPaneUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkEditorPaneUI.java index 949d57f2..0a3232b2 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkEditorPaneUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkEditorPaneUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.text; +package com.github.weisj.darklaf.ui.text; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkFormattedTextFieldUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkFormattedTextFieldUI.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/text/DarkFormattedTextFieldUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkFormattedTextFieldUI.java index 9abd6028..adcc0358 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkFormattedTextFieldUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkFormattedTextFieldUI.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.text; +package com.github.weisj.darklaf.ui.text; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUI.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUI.java index 120d5375..1458b291 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUI.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.text; +package com.github.weisj.darklaf.ui.text; -import com.weis.darklaf.decorators.MouseMovementListener; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.decorators.MouseMovementListener; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -194,10 +194,21 @@ public class DarkPasswordFieldUI extends DarkPasswordFieldUIBridge { && Boolean.TRUE.equals(((JComponent) c).getClientProperty("PasswordField.view")); } + @NotNull + private Point getShowIconCoord() { + Rectangle r = getDrawingRect(getComponent()); + int w = getShowIcon().getIconWidth(); + return new Point(r.x + r.width - w - DarkTextBorder.PADDING, r.y + (r.height - w) / 2); + } + private boolean isOverEye(final Point p) { return showShowIcon() && DarkTextFieldUI.isOver(getShowIconCoord(), getShowIcon(), p); } + protected static Icon getShowIcon() { + return show; + } + private boolean showShowIcon() { var c = (JPasswordField) getComponent(); char[] pw = c.getPassword(); @@ -206,17 +217,6 @@ public class DarkPasswordFieldUI extends DarkPasswordFieldUIBridge { return show; } - @NotNull - private Point getShowIconCoord() { - Rectangle r = getDrawingRect(getComponent()); - int w = getShowIcon().getIconWidth(); - return new Point(r.x + r.width - w - DarkTextBorder.PADDING, r.y + (r.height - w) / 2); - } - - protected static Icon getShowIcon() { - return show; - } - @Override public void installUI(final JComponent c) { super.installUI(c); diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUIBridge.java similarity index 65% rename from src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUIBridge.java index 5beb3c12..7b15e863 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkPasswordFieldUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkPasswordFieldUIBridge.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; import javax.swing.*; import javax.swing.plaf.basic.BasicPasswordFieldUI; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextAreaUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextAreaUI.java similarity index 90% rename from src/main/java/com/weis/darklaf/ui/text/DarkTextAreaUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkTextAreaUI.java index d19e5376..b5355b74 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextAreaUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextAreaUI.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; -import com.weis.darklaf.ui.html.DarkHTML; +import com.github.weisj.darklaf.ui.html.DarkHTML; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextBorder.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextBorder.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/text/DarkTextBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkTextBorder.java index e5d876f0..1242955c 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextBorder.java @@ -21,12 +21,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.text; +package com.github.weisj.darklaf.ui.text; -import com.weis.darklaf.ui.table.TextFieldTableCellEditorBorder; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.ui.table.TextFieldTableCellEditorBorder; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java similarity index 88% rename from src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java index 7e956ce6..264a89ca 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java @@ -1,10 +1,33 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; -import com.weis.darklaf.decorators.MouseClickListener; -import com.weis.darklaf.decorators.MouseMovementListener; -import com.weis.darklaf.decorators.PopupMenuAdapter; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.decorators.MouseClickListener; +import com.github.weisj.darklaf.decorators.MouseMovementListener; +import com.github.weisj.darklaf.decorators.PopupMenuAdapter; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.GraphicsContext; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -151,6 +174,13 @@ public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyCh return new Point(r.x + DarkTextBorder.PADDING, r.y + (r.height - w) / 2); } + @NotNull + @Contract("_ -> new") + public Rectangle getDrawingRect(@NotNull final JTextComponent c) { + int w = borderSize; + return new Rectangle(w, w, c.getWidth() - 2 * w, c.getHeight() - 2 * w); + } + protected static Icon getSearchIcon(final Component c) { return isSearchFieldWithHistoryPopup(c) ? searchWithHistory : search; } @@ -164,13 +194,6 @@ public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyCh return c instanceof JTextField && "search".equals(((JTextField) c).getClientProperty("JTextField.variant")); } - @NotNull - @Contract("_ -> new") - public Rectangle getDrawingRect(@NotNull final JTextComponent c) { - int w = borderSize; - return new Rectangle(w, w, c.getWidth() - 2 * w, c.getHeight() - 2 * w); - } - protected void paintBorderBackground(@NotNull final Graphics2D g, @NotNull final JTextComponent c) { g.setColor(getBackgroundColor(c)); Rectangle r = getDrawingRect(getComponent()); diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUIBridge.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUIBridge.java index d14c1dbd..8391315c 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextFieldUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUIBridge.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; -import com.weis.darklaf.ui.html.DarkHTML; +import com.github.weisj.darklaf.ui.html.DarkHTML; import javax.swing.*; import javax.swing.event.DocumentEvent; diff --git a/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextPaneUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextPaneUI.java new file mode 100644 index 00000000..caabba90 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextPaneUI.java @@ -0,0 +1,70 @@ +/* + * 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.github.weisj.darklaf.ui.text; + +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import javax.swing.*; +import javax.swing.plaf.ComponentUI; +import javax.swing.text.Element; +import javax.swing.text.View; +import java.beans.PropertyChangeEvent; + +/** + * @author Jannis Weis + */ +public class DarkTextPaneUI extends DarkEditorPaneUI { + + + @NotNull + @Contract("_ -> new") + public static ComponentUI createUI(final JComponent c) { + return new DarkTextPaneUI(); + } + + /* + * Implementation of BasicEditorPaneUI + */ + + @Override + public void installUI(final JComponent c) { + super.installUI(c); + } + + @Override + protected void propertyChange(final PropertyChangeEvent evt) { + super.propertyChange(evt); + } + + @Override + protected String getPropertyPrefix() { + return "TextPane"; + } + + @Override + public View create(final Element elem) { + return super.create(elem); + } +} diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextUI.java b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java similarity index 88% rename from src/main/java/com/weis/darklaf/ui/text/DarkTextUI.java rename to src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java index 8b1482c5..14da800a 100644 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; import sun.awt.SunToolkit; import sun.swing.DefaultLookup; @@ -163,14 +186,6 @@ public abstract class DarkTextUI extends BasicTextUI { } } - protected static int getFocusAcceleratorKeyMask() { - Toolkit tk = Toolkit.getDefaultToolkit(); - if (tk instanceof SunToolkit) { - return ((SunToolkit) tk).getFocusAcceleratorKeyMask(); - } - return ActionEvent.ALT_MASK; - } - /** * Create a default action map. This is basically the set of actions found exported by the component. */ @@ -189,6 +204,14 @@ public abstract class DarkTextUI extends BasicTextUI { return map; } + protected static int getFocusAcceleratorKeyMask() { + Toolkit tk = Toolkit.getDefaultToolkit(); + if (tk instanceof SunToolkit) { + return ((SunToolkit) tk).getFocusAcceleratorKeyMask(); + } + return ActionEvent.ALT_MASK; + } + /** * Invoked when editable property is changed. *

diff --git a/src/main/java/com/weis/darklaf/ui/text/SelectLineAction.java b/src/main/java/com/github/weisj/darklaf/ui/text/SelectLineAction.java similarity index 78% rename from src/main/java/com/weis/darklaf/ui/text/SelectLineAction.java rename to src/main/java/com/github/weisj/darklaf/ui/text/SelectLineAction.java index 49277183..98074077 100644 --- a/src/main/java/com/weis/darklaf/ui/text/SelectLineAction.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/SelectLineAction.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.text; +/* + * 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.github.weisj.darklaf.ui.text; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/ui/text/SelectWordAction.java b/src/main/java/com/github/weisj/darklaf/ui/text/SelectWordAction.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/text/SelectWordAction.java rename to src/main/java/com/github/weisj/darklaf/ui/text/SelectWordAction.java index 4475082c..c1cb041c 100644 --- a/src/main/java/com/weis/darklaf/ui/text/SelectWordAction.java +++ b/src/main/java/com/github/weisj/darklaf/ui/text/SelectWordAction.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.text; +package com.github.weisj.darklaf.ui.text; import javax.swing.*; import javax.swing.text.BadLocationException; diff --git a/src/main/java/com/weis/darklaf/ui/titledborder/DarkTitledBorder.java b/src/main/java/com/github/weisj/darklaf/ui/titledborder/DarkTitledBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/titledborder/DarkTitledBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/titledborder/DarkTitledBorder.java index b20eb61c..59dff6da 100644 --- a/src/main/java/com/weis/darklaf/ui/titledborder/DarkTitledBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/titledborder/DarkTitledBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.titledborder; +package com.github.weisj.darklaf.ui.titledborder; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarBorder.java b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarBorder.java similarity index 69% rename from src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarBorder.java index 8d0af32f..80fee823 100644 --- a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarBorder.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.ui.toolbar; +/* + * 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.github.weisj.darklaf.ui.toolbar; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUI.java b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUI.java similarity index 89% rename from src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUI.java rename to src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUI.java index 807cf207..19989169 100644 --- a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUI.java @@ -1,6 +1,29 @@ -package com.weis.darklaf.ui.toolbar; +/* + * 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.github.weisj.darklaf.ui.toolbar; -import com.weis.darklaf.decorators.MouseResponder; +import com.github.weisj.darklaf.decorators.MouseResponder; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUIBridge.java b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUIBridge.java rename to src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java index 2cdbae2f..3d8bb473 100644 --- a/src/main/java/com/weis/darklaf/ui/toolbar/DarkToolBarUIBridge.java +++ b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DarkToolBarUIBridge.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.toolbar; +/* + * 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.github.weisj.darklaf.ui.toolbar; -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.LazyActionMap; +import com.github.weisj.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.LazyActionMap; import sun.swing.DefaultLookup; import sun.swing.UIAction; diff --git a/src/main/java/com/weis/darklaf/ui/toolbar/DropPreviewPanel.java b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DropPreviewPanel.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/toolbar/DropPreviewPanel.java rename to src/main/java/com/github/weisj/darklaf/ui/toolbar/DropPreviewPanel.java index 1bb9557e..9bdded8f 100644 --- a/src/main/java/com/weis/darklaf/ui/toolbar/DropPreviewPanel.java +++ b/src/main/java/com/github/weisj/darklaf/ui/toolbar/DropPreviewPanel.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.toolbar; +package com.github.weisj.darklaf.ui.toolbar; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java similarity index 92% rename from src/main/java/com/weis/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java index 69a4a11f..6b7b2ac2 100644 --- a/src/main/java/com/weis/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkDefaultToolTipBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tooltip; +package com.github.weisj.darklaf.ui.tooltip; -import com.weis.darklaf.components.border.MutableLineBorder; +import com.github.weisj.darklaf.components.border.MutableLineBorder; import javax.swing.*; import javax.swing.plaf.UIResource; diff --git a/src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipBorder.java b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java similarity index 78% rename from src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java index 623ca6b6..fb4b4273 100644 --- a/src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java @@ -1,10 +1,33 @@ -package com.weis.darklaf.ui.tooltip; +/* + * 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.github.weisj.darklaf.ui.tooltip; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.border.BubbleBorder; -import com.weis.darklaf.components.border.DropShadowBorder; -import com.weis.darklaf.components.tooltip.ToolTipStyle; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.border.BubbleBorder; +import com.github.weisj.darklaf.components.border.DropShadowBorder; +import com.github.weisj.darklaf.components.tooltip.ToolTipStyle; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipUI.java b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipUI.java similarity index 87% rename from src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipUI.java index 9762ac22..8077cbf0 100644 --- a/src/main/java/com/weis/darklaf/ui/tooltip/DarkTooltipUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipUI.java @@ -1,7 +1,30 @@ -package com.weis.darklaf.ui.tooltip; +/* + * 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.github.weisj.darklaf.ui.tooltip; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tree/DarkDefaultTreeEditor.java b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkDefaultTreeEditor.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tree/DarkDefaultTreeEditor.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/DarkDefaultTreeEditor.java index 76f84c45..6a9805a9 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/DarkDefaultTreeEditor.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkDefaultTreeEditor.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellBorder.java b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellBorder.java similarity index 95% rename from src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellBorder.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellBorder.java index 19a364bb..3792c01e 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellBorder.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellBorder.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellEditor.java b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellEditor.java similarity index 97% rename from src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellEditor.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellEditor.java index fceccd41..029717a8 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellEditor.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellEditor.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; -import com.weis.darklaf.components.SelectableTreeNode; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.components.SelectableTreeNode; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellRenderer.java b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellRenderer.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellRenderer.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellRenderer.java index 00757ee8..5783f248 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeCellRenderer.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeCellRenderer.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; -import com.weis.darklaf.ui.cell.DarkCellRendererToggleButton; -import com.weis.darklaf.util.DarkUIUtil; +import com.github.weisj.darklaf.ui.cell.DarkCellRendererToggleButton; +import com.github.weisj.darklaf.util.DarkUIUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeUI.java b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeUI.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tree/DarkTreeUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeUI.java index ed64418c..62fbfaf4 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/DarkTreeUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/DarkTreeUI.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; -import com.weis.darklaf.util.SystemInfo; +import com.github.weisj.darklaf.util.SystemInfo; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tree/TreeCellEditorDelegate.java b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeCellEditorDelegate.java similarity index 98% rename from src/main/java/com/weis/darklaf/ui/tree/TreeCellEditorDelegate.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/TreeCellEditorDelegate.java index 7d7b14ce..2f11c0f3 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/TreeCellEditorDelegate.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeCellEditorDelegate.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/ui/tree/TreeRendererComponent.java b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererComponent.java similarity index 99% rename from src/main/java/com/weis/darklaf/ui/tree/TreeRendererComponent.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererComponent.java index bb593d80..b50dc398 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/TreeRendererComponent.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererComponent.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/ui/tree/TreeRendererSupport.java b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererSupport.java similarity index 96% rename from src/main/java/com/weis/darklaf/ui/tree/TreeRendererSupport.java rename to src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererSupport.java index b1039edf..cc423b6b 100644 --- a/src/main/java/com/weis/darklaf/ui/tree/TreeRendererSupport.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tree/TreeRendererSupport.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.ui.tree; +package com.github.weisj.darklaf.ui.tree; import javax.swing.*; import java.awt.*; diff --git a/src/main/java/com/weis/darklaf/ui/tristate/DarkTristateCheckBoxUI.java b/src/main/java/com/github/weisj/darklaf/ui/tristate/DarkTristateCheckBoxUI.java similarity index 52% rename from src/main/java/com/weis/darklaf/ui/tristate/DarkTristateCheckBoxUI.java rename to src/main/java/com/github/weisj/darklaf/ui/tristate/DarkTristateCheckBoxUI.java index 9311a858..1c5a95fa 100644 --- a/src/main/java/com/weis/darklaf/ui/tristate/DarkTristateCheckBoxUI.java +++ b/src/main/java/com/github/weisj/darklaf/ui/tristate/DarkTristateCheckBoxUI.java @@ -1,8 +1,31 @@ -package com.weis.darklaf.ui.tristate; +/* + * 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.github.weisj.darklaf.ui.tristate; -import com.weis.darklaf.components.tristate.TristateCheckBox; -import com.weis.darklaf.components.tristate.TristateState; -import com.weis.darklaf.ui.checkbox.DarkCheckBoxUI; +import com.github.weisj.darklaf.components.tristate.TristateCheckBox; +import com.github.weisj.darklaf.components.tristate.TristateState; +import com.github.weisj.darklaf.ui.checkbox.DarkCheckBoxUI; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/Animator.java b/src/main/java/com/github/weisj/darklaf/util/Animator.java similarity index 81% rename from src/main/java/com/weis/darklaf/util/Animator.java rename to src/main/java/com/github/weisj/darklaf/util/Animator.java index 0c125fe6..631d77b5 100644 --- a/src/main/java/com/weis/darklaf/util/Animator.java +++ b/src/main/java/com/github/weisj/darklaf/util/Animator.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.util; +/* + * 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.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/ColorUtil.java b/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java similarity index 98% rename from src/main/java/com/weis/darklaf/util/ColorUtil.java rename to src/main/java/com/github/weisj/darklaf/util/ColorUtil.java index de6de27b..6e951b30 100644 --- a/src/main/java/com/weis/darklaf/util/ColorUtil.java +++ b/src/main/java/com/github/weisj/darklaf/util/ColorUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/DarkUIUtil.java b/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java similarity index 99% rename from src/main/java/com/weis/darklaf/util/DarkUIUtil.java rename to src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java index d98c9dcc..4b8806a3 100644 --- a/src/main/java/com/weis/darklaf/util/DarkUIUtil.java +++ b/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java @@ -21,10 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; -import com.weis.darklaf.decorators.CellRenderer; -import com.weis.darklaf.ui.menu.DarkPopupMenuUI; +import com.github.weisj.darklaf.decorators.CellRenderer; +import com.github.weisj.darklaf.ui.menu.DarkPopupMenuUI; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/util/GraphicsContext.java b/src/main/java/com/github/weisj/darklaf/util/GraphicsContext.java similarity index 98% rename from src/main/java/com/weis/darklaf/util/GraphicsContext.java rename to src/main/java/com/github/weisj/darklaf/util/GraphicsContext.java index 78386958..46012c8a 100644 --- a/src/main/java/com/weis/darklaf/util/GraphicsContext.java +++ b/src/main/java/com/github/weisj/darklaf/util/GraphicsContext.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import java.awt.*; import java.util.Map; diff --git a/src/main/java/com/weis/darklaf/util/GraphicsUtil.java b/src/main/java/com/github/weisj/darklaf/util/GraphicsUtil.java similarity index 98% rename from src/main/java/com/weis/darklaf/util/GraphicsUtil.java rename to src/main/java/com/github/weisj/darklaf/util/GraphicsUtil.java index eace4cf5..d9de38a0 100644 --- a/src/main/java/com/weis/darklaf/util/GraphicsUtil.java +++ b/src/main/java/com/github/weisj/darklaf/util/GraphicsUtil.java @@ -21,9 +21,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; -import com.weis.darklaf.log.LogFormatter; +import com.github.weisj.darklaf.log.LogFormatter; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/ImageUtil.java b/src/main/java/com/github/weisj/darklaf/util/ImageUtil.java similarity index 95% rename from src/main/java/com/weis/darklaf/util/ImageUtil.java rename to src/main/java/com/github/weisj/darklaf/util/ImageUtil.java index 58ef7448..3abddfd6 100644 --- a/src/main/java/com/weis/darklaf/util/ImageUtil.java +++ b/src/main/java/com/github/weisj/darklaf/util/ImageUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -30,9 +30,6 @@ import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; -import static com.weis.darklaf.util.GraphicsUtil.SCALE_X; -import static com.weis.darklaf.util.GraphicsUtil.SCALE_Y; - /** * @author Jannis Weis */ @@ -51,7 +48,7 @@ public final class ImageUtil { */ @NotNull public static Image scaledImageFromComponent(@NotNull final Component c, @NotNull final Rectangle bounds) { - return scaledImageFromComponent(c, bounds, SCALE_X, SCALE_Y); + return scaledImageFromComponent(c, bounds, GraphicsUtil.SCALE_X, GraphicsUtil.SCALE_Y); } /** @@ -163,11 +160,11 @@ public final class ImageUtil { @NotNull @Contract("_, _, _ -> new") public static BufferedImage createImage(final int width, final int height, final int type) { - return new BufferedImage((int) (width * SCALE_X), (int) (height * SCALE_Y), type) { + return new BufferedImage((int) (width * GraphicsUtil.SCALE_X), (int) (height * GraphicsUtil.SCALE_Y), type) { @Override public Graphics2D createGraphics() { var g = super.createGraphics(); - g.scale(SCALE_X, SCALE_Y); + g.scale(GraphicsUtil.SCALE_X, GraphicsUtil.SCALE_Y); return g; } }; diff --git a/src/main/java/com/weis/darklaf/util/LazyActionMap.java b/src/main/java/com/github/weisj/darklaf/util/LazyActionMap.java similarity index 78% rename from src/main/java/com/weis/darklaf/util/LazyActionMap.java rename to src/main/java/com/github/weisj/darklaf/util/LazyActionMap.java index 78b90c30..42609200 100644 --- a/src/main/java/com/weis/darklaf/util/LazyActionMap.java +++ b/src/main/java/com/github/weisj/darklaf/util/LazyActionMap.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.util; +/* + * 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.github.weisj.darklaf.util; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/Pair.java b/src/main/java/com/github/weisj/darklaf/util/Pair.java similarity index 97% rename from src/main/java/com/weis/darklaf/util/Pair.java rename to src/main/java/com/github/weisj/darklaf/util/Pair.java index dee12395..457d8f64 100644 --- a/src/main/java/com/weis/darklaf/util/Pair.java +++ b/src/main/java/com/github/weisj/darklaf/util/Pair.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/weis/darklaf/util/PropertyLoader.java b/src/main/java/com/github/weisj/darklaf/util/PropertyLoader.java similarity index 98% rename from src/main/java/com/weis/darklaf/util/PropertyLoader.java rename to src/main/java/com/github/weisj/darklaf/util/PropertyLoader.java index b6a3e57e..871e0e3c 100644 --- a/src/main/java/com/weis/darklaf/util/PropertyLoader.java +++ b/src/main/java/com/github/weisj/darklaf/util/PropertyLoader.java @@ -21,11 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; -import com.weis.darklaf.icons.DarkUIAwareIcon; -import com.weis.darklaf.icons.EmptyIcon; -import com.weis.darklaf.icons.IconLoader; +import com.github.weisj.darklaf.icons.DarkUIAwareIcon; +import com.github.weisj.darklaf.icons.EmptyIcon; +import com.github.weisj.darklaf.icons.IconLoader; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/weis/darklaf/util/StringUtil.java b/src/main/java/com/github/weisj/darklaf/util/StringUtil.java similarity index 99% rename from src/main/java/com/weis/darklaf/util/StringUtil.java rename to src/main/java/com/github/weisj/darklaf/util/StringUtil.java index fd3614ab..d369541b 100644 --- a/src/main/java/com/weis/darklaf/util/StringUtil.java +++ b/src/main/java/com/github/weisj/darklaf/util/StringUtil.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/SwingXUtilities.java b/src/main/java/com/github/weisj/darklaf/util/SwingXUtilities.java similarity index 98% rename from src/main/java/com/weis/darklaf/util/SwingXUtilities.java rename to src/main/java/com/github/weisj/darklaf/util/SwingXUtilities.java index 08569fb0..8eec214a 100644 --- a/src/main/java/com/weis/darklaf/util/SwingXUtilities.java +++ b/src/main/java/com/github/weisj/darklaf/util/SwingXUtilities.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -package com.weis.darklaf.util; +package com.github.weisj.darklaf.util; import org.jdesktop.jxlayer.JXLayer; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/weis/darklaf/util/SystemInfo.java b/src/main/java/com/github/weisj/darklaf/util/SystemInfo.java similarity index 76% rename from src/main/java/com/weis/darklaf/util/SystemInfo.java rename to src/main/java/com/github/weisj/darklaf/util/SystemInfo.java index d218ed1d..03d363fa 100644 --- a/src/main/java/com/weis/darklaf/util/SystemInfo.java +++ b/src/main/java/com/github/weisj/darklaf/util/SystemInfo.java @@ -1,4 +1,27 @@ -package com.weis.darklaf.util; +/* + * 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.github.weisj.darklaf.util; import org.jetbrains.annotations.Contract; diff --git a/src/main/java/com/github/weisj/darklaf/util/TimerUtil.java b/src/main/java/com/github/weisj/darklaf/util/TimerUtil.java new file mode 100644 index 00000000..ca938850 --- /dev/null +++ b/src/main/java/com/github/weisj/darklaf/util/TimerUtil.java @@ -0,0 +1,58 @@ +/* + * 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.github.weisj.darklaf.util; + +import org.jetbrains.annotations.Contract; +import org.jetbrains.annotations.NotNull; + +import javax.swing.*; +import java.awt.event.ActionListener; + +/** + * @author Jannis Weis + */ +public final class TimerUtil { + @Contract("_, _, _ -> new") + @NotNull + public static Timer createNamedTimer(@NotNull final String name, final int delay, + @NotNull final ActionListener listener) { + return new Timer(delay, listener) { + @Override + public String toString() { + return name; + } + }; + } + + @Contract("_, _ -> new") + @NotNull + public static Timer createNamedTimer(@NotNull final String name, final int delay) { + return new Timer(delay, null) { + @Override + public String toString() { + return name; + } + }; + } +} diff --git a/src/main/java/com/weis/darklaf/DarkMetalTheme.java b/src/main/java/com/weis/darklaf/DarkMetalTheme.java deleted file mode 100644 index bb40d0c1..00000000 --- a/src/main/java/com/weis/darklaf/DarkMetalTheme.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.weis.darklaf; - -import javax.swing.plaf.metal.DefaultMetalTheme; - -/** - * @author Jannis Weis - */ -public class DarkMetalTheme extends DefaultMetalTheme { - public String getName() { - return "Darcula theme"; - } -} - diff --git a/src/main/java/com/weis/darklaf/components/OverlayScrollPane.java b/src/main/java/com/weis/darklaf/components/OverlayScrollPane.java deleted file mode 100644 index b738d844..00000000 --- a/src/main/java/com/weis/darklaf/components/OverlayScrollPane.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * 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; -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import javax.swing.plaf.ScrollPaneUI; -import java.awt.*; - -/** - * Scroll pane that displays its content beneath the scrollbar. - * - * @author Jannis Weis - */ -public class OverlayScrollPane extends JLayeredPane { - - protected final OScrollPane scrollPane; - private final ControlPanel controlPanel; - - /** - * Creates a JScrollIndicator that displays the contents of the specified component, where both - * horizontal and vertical scrollbars appear whenever the component's contents are larger than the view and - * scrolling in underway or the mouse is over the scrollbar position. - */ - public OverlayScrollPane() { - this(null); - } - - /** - * Creates a JScrollIndicator that displays the contents of the specified component, where both - * horizontal and vertical scrollbars appear whenever the component's contents are larger than the view and - * scrolling in underway or the mouse is over the scrollbar position. - * - * @param view the component to display in the scrollable viewport - * @see JScrollPane#setViewportView - */ - public OverlayScrollPane(final JComponent view) { - this(view, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - } - - /** - * Creates a JScrollIndicator that displays the view component in a viewport whose view position can be controlled - * with a pair of scrollbars. The scrollbar policies specify when the scrollbars are displayed, For example, if - * vsbPolicy is JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED then the vertical scrollbar only appears if the view - * doesn't fit vertically. The available policy settings are listed at {@link JScrollPane#setVerticalScrollBarPolicy(int)} - * and {@link JScrollPane#setHorizontalScrollBarPolicy}. - * - * @param view the view of the component. - * @param vsbPolicy an integer that specifies the vertical scrollbar policy - * @param hsbPolicy an integer that specifies the horizontal scrollbar policy - */ - public OverlayScrollPane(final JComponent view, final int vsbPolicy, final int hsbPolicy) { - scrollPane = createScrollPane(view, vsbPolicy, hsbPolicy); - add(scrollPane, JLayeredPane.DEFAULT_LAYER); - - controlPanel = new ControlPanel(scrollPane); - add(controlPanel, JLayeredPane.PALETTE_LAYER); - } - - protected OScrollPane createScrollPane(final JComponent view, final int vsbPolicy, final int hsbPolicy) { - return new OScrollPane(view, vsbPolicy, hsbPolicy); - } - - /** - * Returns the scroll pane used by this scroll indicator. Use carefully (e.g. to set unit increments) because not - * all changes have an effect. You have to write listeners in this cases (e.g. for changing the scrollbar policy) - * - * @return the scrollPane - */ - @NotNull - public JScrollPane getScrollPane() { - return scrollPane; - } - - @Override - public void doLayout() { - scrollPane.setSize(getSize()); - controlPanel.setSize(getSize()); - scrollPane.doLayout(); - } - - public void setVerticalScrollBarPolicy(final int policy) { - scrollPane.setVerticalScrollBarPolicy(policy); - controlPanel.showVerticalScrollBar(policy != JScrollPane.VERTICAL_SCROLLBAR_NEVER); - } - - public void setHorizontalScrollBarPolicy(final int policy) { - scrollPane.setHorizontalScrollBarPolicy(policy); - controlPanel.showHorizontalScrollBar(policy != JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - } @Override - public Dimension getPreferredSize() { - return scrollPane.getPreferredSize(); - } - - @Contract(pure = true) - @NotNull - public JScrollBar getVerticalScrollBar() { - return scrollPane.verticalScrollBar; - } - - @Contract(pure = true) - @NotNull - public JScrollBar getHorizontalScrollBar() { - return scrollPane.horizontalScrollBar; - } - - public void setViewportView(final Component c) { - scrollPane.setViewportView(c); - } - - @Override - public void setPreferredSize(final Dimension preferredSize) { - super.setPreferredSize(preferredSize); - scrollPane.setPreferredSize(preferredSize); - } - - private static final class PopupScrollBar extends JScrollBar { - - private final JScrollPane pane; - - private PopupScrollBar(final int direction, final JScrollPane pane) { - super(direction); - this.pane = pane; - putClientProperty("JScrollBar.fastWheelScrolling", true); - setOpaque(false); - } - - @Contract(pure = true) - @Override - public boolean isOpaque() { - return false; - } - } - - protected static class OScrollPane extends JScrollPane { - private JScrollBar verticalScrollBar; - private JScrollBar horizontalScrollBar; - - protected OScrollPane(final JComponent view, final int vsbPolicy, final int hsbPolicy) { - super(view, vsbPolicy, hsbPolicy); - super.setLayout(new ScrollLayoutManagerDelegate((ScrollPaneLayout) getLayout()) { - @Override - public void removeLayoutComponent(final Component comp) { - if (comp == verticalScrollBar || comp == horizontalScrollBar) { - return; - } - super.removeLayoutComponent(comp); - } - - @Override - public void layoutContainer(final Container parent) { - super.layoutContainer(parent); - if (viewport != null) { - var bounds = viewport.getBounds(); - var vertBounds = verticalScrollBar.getBounds(); - var horBounds = horizontalScrollBar.getBounds(); - var columnHeader = getColumnHeader(); - var rowHeader = getRowHeader(); - if (getComponentOrientation().isLeftToRight()) { - if (verticalScrollBar.isVisible()) { - bounds.width += vertBounds.width; - } - if (columnHeader != null && verticalScrollBar.isVisible()) { - var chb = columnHeader.getBounds(); - chb.width += vertBounds.width; - columnHeader.setBounds(chb); - } - if (rowHeader != null && horizontalScrollBar.isVisible()) { - var rhb = rowHeader.getBounds(); - rhb.height += horBounds.height; - rowHeader.setBounds(rhb); - } - } else { - if (verticalScrollBar.isVisible()) { - bounds.x -= vertBounds.width; - bounds.width += vertBounds.width; - } - if (columnHeader != null && verticalScrollBar.isVisible()) { - var chb = columnHeader.getBounds(); - chb.x -= vertBounds.width; - chb.width += vertBounds.width; - columnHeader.setBounds(chb); - } - if (rowHeader != null && horizontalScrollBar.isVisible()) { - var rhb = rowHeader.getBounds(); - rhb.height += horBounds.height; - rowHeader.setBounds(rhb); - } - } - if (horizontalScrollBar.isVisible()) { - bounds.height += horBounds.height; - } - viewport.setBounds(bounds); - } - } - }); - } - - /* - * Ensure the correct background. - */ - public void setUI(final ScrollPaneUI ui) { - if (verticalScrollBar == null) { - verticalScrollBar = new PopupScrollBar(JScrollBar.VERTICAL, this); - verticalScrollBar.putClientProperty("JScrollBar.scrollPaneParent", this); - } - if (horizontalScrollBar == null) { - horizontalScrollBar = new PopupScrollBar(JScrollBar.HORIZONTAL, this); - horizontalScrollBar.putClientProperty("JScrollBar.scrollPaneParent", this); - } - super.setUI(ui); - SwingUtilities.invokeLater(() -> { - Component component = getViewport().getView(); - if (component != null) { - getViewport().setBackground(component.getBackground()); - } - }); - } - - @Override - public JScrollBar getHorizontalScrollBar() { - return horizontalScrollBar; - } - - @Override - public JScrollBar getVerticalScrollBar() { - return verticalScrollBar; - } - } - - private final class ControlPanel extends JPanel { - - private boolean showVertical; - private boolean showHorizontal; - - private ControlPanel(@NotNull final OScrollPane scrollPane) { - setLayout(null); - - scrollPane.setVerticalScrollBar(scrollPane.verticalScrollBar); - if (scrollPane.getVerticalScrollBarPolicy() != JScrollPane.VERTICAL_SCROLLBAR_NEVER) { - showVertical = true; - add(scrollPane.verticalScrollBar); - } - - scrollPane.setHorizontalScrollBar(scrollPane.horizontalScrollBar); - if (scrollPane.getHorizontalScrollBarPolicy() != JScrollPane.HORIZONTAL_SCROLLBAR_NEVER) { - showHorizontal = true; - add(scrollPane.horizontalScrollBar); - } - } - - private void showVerticalScrollBar(final boolean show) { - if (show == showVertical) { - return; - } - showVertical = show; - scrollPane.verticalScrollBar.setVisible(show); - } - - private void showHorizontalScrollBar(final boolean show) { - if (show == showHorizontal) { - return; - } - showHorizontal = show; - scrollPane.horizontalScrollBar.setVisible(show); - } - - @Override - public boolean contains(final int x, final int y) { - if (scrollPane.horizontalScrollBar.isVisible() - && scrollPane.horizontalScrollBar.getBounds().contains(x, y)) { - return true; - } - return scrollPane.verticalScrollBar.isVisible() - && scrollPane.verticalScrollBar.getBounds().contains(x, y); - } - - @Override - public boolean isOpaque() { - return false; - } - } - - - - - - -} diff --git a/src/main/java/com/weis/darklaf/components/ScrollPopupMenu.java b/src/main/java/com/weis/darklaf/components/ScrollPopupMenu.java deleted file mode 100644 index 9fd5455b..00000000 --- a/src/main/java/com/weis/darklaf/components/ScrollPopupMenu.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * 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; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; -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; - private final JScrollPane scrollPane; - private int maxHeight; - private JWindow popWin; - private int posX; - private int posY; - private JPanel view; - - public ScrollPopupMenu(final int maxHeight) { - this.maxHeight = maxHeight; - contentPane = new JPanel(new BorderLayout()); - OverlayScrollPane overlayScrollPane = createScrollPane(); - scrollPane = overlayScrollPane.getScrollPane(); - contentPane.add(overlayScrollPane, BorderLayout.CENTER); - contentPane.setBorder(getBorder()); - setDoubleBuffered(true); - MenuKeyListener menuKeyListener = new MenuKeyListener() { - @Override - public void menuKeyTyped(final MenuKeyEvent e) { - } - - @Override - public void menuKeyPressed(final MenuKeyEvent e) { - SwingUtilities.invokeLater(() -> { - var path = e.getMenuSelectionManager().getSelectedPath(); - if (path.length == 0) { - return; - } - var bounds = path[path.length - 1].getComponent().getBounds(); - var r = SwingUtilities.convertRectangle(ScrollPopupMenu.this, bounds, scrollPane); - scrollPane.getViewport().scrollRectToVisible(r); - }); - } - - @Override - public void menuKeyReleased(final MenuKeyEvent e) { - - } - }; - addMenuKeyListener(menuKeyListener); - } - - @NotNull - private OverlayScrollPane createScrollPane() { - view = new JPanel(new BorderLayout()); - view.add(this, BorderLayout.CENTER); - OverlayScrollPane overlayScrollPane = - new OverlayScrollPane(view, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, - JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); - JScrollBar bar = overlayScrollPane.getVerticalScrollBar(); - bar.putClientProperty("ScrollBar.thin", Boolean.TRUE); - DarkUIUtil.doNotCancelPopupSetup(bar); - DarkUIUtil.doNotCancelPopupSetup(overlayScrollPane.getScrollPane()); - return overlayScrollPane; - } - - /** - * Set the maximum height of the popup. If the size is larger than the specified maximum height the content will be - * wrapped inside a scroll pane. - *

- * Note: A value of <= 0 indicates that the height should not be limited. - * - * @param maxHeight the max height to use. - */ - public void setMaxHeight(final int maxHeight) { - this.maxHeight = maxHeight; - } - - @Override - public JMenuItem add(@NotNull final JMenuItem menuItem) { - menuItem.getModel().addChangeListener(e -> contentPane.repaint(menuItem.getBounds())); - return super.add(menuItem); - } - - @Override - public void pack() { - if (popWin == null) { - return; - } - final Dimension prefSize = getPreferredSize(); - if (maxHeight <= 0 || prefSize.height <= maxHeight) { - setBounds(0, 0, prefSize.width, prefSize.height); - popWin.setContentPane(this); - setBorderPainted(true); - popWin.setSize(prefSize.width, prefSize.height); - } else { - int increment = getComponentCount() > 0 - ? Math.max(1, getComponent(0).getPreferredSize().height / 2) - : 1; - var bar = scrollPane.getVerticalScrollBar(); - bar.setValue(bar.getMinimum()); - bar.setUnitIncrement(increment); - setBorderPainted(false); - view.add(this); - popWin.setContentPane(contentPane); - popWin.pack(); - popWin.setSize(prefSize.width + bar.getPreferredSize().width, maxHeight); - } - } - - @Override - public boolean isVisible() { - return popWin != null && popWin.isShowing(); - } @Override - public void setLocation(final int x, final int y) { - if (popWin != null && popWin.isShowing()) { - popWin.setLocation(x, y); - } else { - posX = x; - posY = y; - } - } - - /** - * Get the scroll pane of the popup. - * - * @return scroll pane; - */ - @Nullable - public JScrollPane getScrollPane() { - return scrollPane; - } - - @Override - public void setVisible(final boolean b) { - if (b == isVisible()) { - return; - } - if (b) { - if (isPopupMenu()) { - MenuElement[] menuElements = new MenuElement[1]; - if (getSubElements().length > 0) { - menuElements = new MenuElement[2]; - menuElements[1] = getSubElements()[0]; - } - menuElements[0] = this; - MenuSelectionManager.defaultManager().setSelectedPath(menuElements); - } - firePopupMenuWillBecomeVisible(); - showPopup(); - firePropertyChange("visible", Boolean.FALSE, Boolean.TRUE); - } else { - hidePopup(); - } - } - - protected void hidePopup() { - if (popWin != null) { - firePopupMenuWillBecomeInvisible(); - popWin.setVisible(false); - popWin = null; - firePropertyChange("visible", Boolean.TRUE, Boolean.FALSE); - if (isPopupMenu()) { - MenuSelectionManager.defaultManager().clearSelectedPath(); - } - } - } - - protected void showPopup() { - var comp = getInvoker(); - if (comp == null) return; - - while (comp.getParent() != null) { - comp = comp.getParent(); - } - - if (popWin == null || popWin.getOwner() != comp) { - popWin = comp instanceof Window ? new JWindow((Window) comp) : new JWindow(new JFrame()); - } - pack(); - popWin.setLocation(posX, posY); - popWin.setVisible(true); - requestFocus(); - } - - - private boolean isPopupMenu() { - var invoker = getInvoker(); - return ((invoker != null) && !(invoker instanceof JMenu)); - } -} diff --git a/src/main/java/com/weis/darklaf/components/TabEvent.java b/src/main/java/com/weis/darklaf/components/TabEvent.java deleted file mode 100644 index 4d6d8749..00000000 --- a/src/main/java/com/weis/darklaf/components/TabEvent.java +++ /dev/null @@ -1,22 +0,0 @@ -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; - public static final int TAB_CLOSED = 1; - private final int tabIndex; - - public TabEvent(final Object source, final int id, final String command, final int tabIndex) { - super(source, id, command); - this.tabIndex = tabIndex; - } - - public int getTabIndex() { - return tabIndex; - } -} diff --git a/src/main/java/com/weis/darklaf/components/TabListener.java b/src/main/java/com/weis/darklaf/components/TabListener.java deleted file mode 100644 index 0ea13507..00000000 --- a/src/main/java/com/weis/darklaf/components/TabListener.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.weis.darklaf.components; - -import java.util.EventListener; - -/** - * @author Jannis Weis - */ -public interface TabListener extends EventListener { - - void tabOpened(TabEvent e); - - void tabClosed(TabEvent e); -} diff --git a/src/main/java/com/weis/darklaf/components/TabPropertyChangeEvent.java b/src/main/java/com/weis/darklaf/components/TabPropertyChangeEvent.java deleted file mode 100644 index 5aac291a..00000000 --- a/src/main/java/com/weis/darklaf/components/TabPropertyChangeEvent.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.weis.darklaf.components; - -import java.beans.PropertyChangeEvent; - -/** - * @author Jannis Weis - */ -public class TabPropertyChangeEvent extends PropertyChangeEvent { - - private final int index; - - public TabPropertyChangeEvent(final Object source, final String propertyName, - final Object oldValue, final Object newValue, final int index) { - super(source, propertyName, oldValue, newValue); - this.index = index; - } - - public int getIndex() { - return index; - } -} diff --git a/src/main/java/com/weis/darklaf/components/text/TextFieldHistoryPopup.java b/src/main/java/com/weis/darklaf/components/text/TextFieldHistoryPopup.java deleted file mode 100644 index 4c3816c6..00000000 --- a/src/main/java/com/weis/darklaf/components/text/TextFieldHistoryPopup.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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.text; - -import com.weis.darklaf.components.ScrollPopupMenu; -import com.weis.darklaf.decorators.PlainAction; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import java.awt.*; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * @author Jannis Weis - */ -public class TextFieldHistoryPopup extends ScrollPopupMenu implements SearchListener { - - private final Set history; - private final JTextField textField; - private int capacity; - - /** - * Create a search popup Menu. - * - * @param textField the text field. - * @param capacity the length of the history. - * @param maxH maximum height. - */ - public TextFieldHistoryPopup(@NotNull final SearchTextField textField, final int capacity, final int maxH) { - super(maxH); - this.textField = textField; - textField.addSearchListener(this); - setCapacity(capacity); - this.history = Collections.newSetFromMap(new LinkedHashMap<>() { - protected boolean removeEldestEntry(final Map.Entry eldest) { - return size() > capacity; - } - }); - } - - /** - * Get the history as a list. - * - * @return the history. - */ - public List getHistory() { - return new ArrayList<>(history); - } - - /** - * Get the capacity of the history. - * - * @return the capacity. - * @see #setCapacity(int) setCapacity() - */ - public int getCapacity() { - return capacity; - } - - /** - * Set the capacity of the history. If the size grows larger than the capacity the oldest entry will be deleted. - * - * @param capacity the capacity. - * @throws IllegalArgumentException if capacity < 0 - */ - public void setCapacity(final int capacity) throws IllegalArgumentException { - if (capacity < 0) throw new IllegalArgumentException("Negative history size is not supported"); - this.capacity = capacity; - } - - /** - * Get the current length of the history. - * - * @return the current length of the history. - */ - public int getLength() { - return history.size(); - } - - @Override - public void searchPerformed(@NotNull final SearchEvent e) { - var text = e.getText(); - if (!text.isBlank()) { - addEntry(text); - } - } - - /** - * Add entry to the history. If the size is greater than the capacity the oldest entry will be deleted. - * - * @param entry the entry to add. - * @see #getLength() getLength - * @see #setCapacity(int) setCapacity - * @see #getCapacity() getCapacity - */ - public void addEntry(final String entry) { - history.remove(entry); - history.add(entry); - } - - @Override - public void show(final Component invoker, final int x, final int y) { - if (history.size() == 0) return; - super.show(invoker, x, y); - } - - @Override - protected void showPopup() { - if (history.size() == 0) { - firePopupMenuCanceled(); - return; - } - this.removeAll(); - LinkedList list = new LinkedList<>(history); - Iterator itr = list.descendingIterator(); - while (itr.hasNext()) { - String item = itr.next(); - add(new JMenuItem(new PlainAction(item, () -> textField.setText(item)))); - } - super.showPopup(); - } - - /** - * Clear all entries from the history. - */ - public void clearHistory() { - history.clear(); - } -} diff --git a/src/main/java/com/weis/darklaf/components/tristate/TristateState.java b/src/main/java/com/weis/darklaf/components/tristate/TristateState.java deleted file mode 100644 index b144142a..00000000 --- a/src/main/java/com/weis/darklaf/components/tristate/TristateState.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.weis.darklaf.components.tristate; - -public enum TristateState { - SELECTED { - public TristateState next() { - return INDETERMINATE; - } - }, - INDETERMINATE { - public TristateState next() { - return DESELECTED; - } - }, - DESELECTED { - public TristateState next() { - return SELECTED; - } - }; - - public abstract TristateState next(); -} diff --git a/src/main/java/com/weis/darklaf/decorators/AncestorAdapter.java b/src/main/java/com/weis/darklaf/decorators/AncestorAdapter.java deleted file mode 100644 index 3dfecaf9..00000000 --- a/src/main/java/com/weis/darklaf/decorators/AncestorAdapter.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.weis.darklaf.decorators; - -import javax.swing.event.AncestorEvent; -import javax.swing.event.AncestorListener; - -public class AncestorAdapter implements AncestorListener { - @Override - public void ancestorAdded(final AncestorEvent event) { - } - - @Override - public void ancestorRemoved(final AncestorEvent event) { - } - - @Override - public void ancestorMoved(final AncestorEvent event) { - } -} diff --git a/src/main/java/com/weis/darklaf/decorators/CellRenderer.java b/src/main/java/com/weis/darklaf/decorators/CellRenderer.java deleted file mode 100644 index 911ab623..00000000 --- a/src/main/java/com/weis/darklaf/decorators/CellRenderer.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.weis.darklaf.decorators; - -public interface CellRenderer { -} diff --git a/src/main/java/com/weis/darklaf/decorators/ComponentResizeListener.java b/src/main/java/com/weis/darklaf/decorators/ComponentResizeListener.java deleted file mode 100644 index 6cc9b7bd..00000000 --- a/src/main/java/com/weis/darklaf/decorators/ComponentResizeListener.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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; -import java.awt.event.ComponentListener; - -/** - * Wrapper interface for resize listener. - * - * @author Jannis Weis - * @since 2019 - */ -public interface ComponentResizeListener extends ComponentListener { - @Override - void componentResized(ComponentEvent e); - - @Override - default void componentMoved(final ComponentEvent e) { - } - - @Override - default void componentShown(final ComponentEvent e) { - } - - @Override - default void componentHidden(final ComponentEvent e) { - } -} diff --git a/src/main/java/com/weis/darklaf/decorators/LayoutManagerDelegate.java b/src/main/java/com/weis/darklaf/decorators/LayoutManagerDelegate.java deleted file mode 100644 index fa869e95..00000000 --- a/src/main/java/com/weis/darklaf/decorators/LayoutManagerDelegate.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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; - -import java.awt.*; - -public class LayoutManagerDelegate implements LayoutManager { - private final LayoutManager delegate; - - @Contract(pure = true) - public LayoutManagerDelegate(final LayoutManager delegate) { - if (delegate == null) { - throw new IllegalArgumentException("Delegate is null"); - } - this.delegate = delegate; - } - - @Override - public void addLayoutComponent(final String name, final Component comp) { - delegate.addLayoutComponent(name, comp); - } - - @Override - public void removeLayoutComponent(final Component comp) { - delegate.removeLayoutComponent(comp); - } - - @Override - public Dimension preferredLayoutSize(final Container parent) { - return delegate.preferredLayoutSize(parent); - } - - @Override - public Dimension minimumLayoutSize(final Container parent) { - return delegate.minimumLayoutSize(parent); - } - - @Override - public void layoutContainer(final Container parent) { - delegate.layoutContainer(parent); - } -} diff --git a/src/main/java/com/weis/darklaf/decorators/MouseClickListener.java b/src/main/java/com/weis/darklaf/decorators/MouseClickListener.java deleted file mode 100644 index 1b1aada2..00000000 --- a/src/main/java/com/weis/darklaf/decorators/MouseClickListener.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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; - -public interface MouseClickListener extends MouseListener { - - @Override - void mouseClicked(MouseEvent e); - - @Override - default void mousePressed(final MouseEvent e) { - } - - @Override - default void mouseReleased(final MouseEvent e) { - } - - @Override - default void mouseEntered(final MouseEvent e) { - } - - @Override - default void mouseExited(final MouseEvent e) { - } -} diff --git a/src/main/java/com/weis/darklaf/icons/DarkUIAwareIcon.java b/src/main/java/com/weis/darklaf/icons/DarkUIAwareIcon.java deleted file mode 100644 index 6790df1c..00000000 --- a/src/main/java/com/weis/darklaf/icons/DarkUIAwareIcon.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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; -import com.weis.darklaf.theme.Theme; -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import javax.swing.plaf.UIResource; -import java.awt.*; -import java.io.Serializable; - -/** - * Icon that is aware of the current ui theme and adjusts the icon accordingly. Icons are loaded lazily at their point - * of usage. - * - * @author Jannis Weis - * @since 2019 - */ -public class DarkUIAwareIcon implements UIAwareIcon, UIResource, Serializable { - - private final DarkUIAwareIcon dual; - private final String darkKey; - private final String lightKey; - private final int w; - private final int h; - private final Class parentClass; - private Theme currentTheme; - private transient boolean loaded; - private transient Icon icon; - - /** - * Create new ui aware icon. - * - * @param darkKey key to load icon for dark mode. - * @param lightKey key to load icon for light mode. - * @param w width of icon. - * @param h height of icon. - * @param parentClass the class to resolve the path while lazy loading. - */ - @Contract(pure = true) - public DarkUIAwareIcon(final String darkKey, final String lightKey, final int w, final int h, - final Class parentClass) { - this.darkKey = darkKey; - this.lightKey = lightKey; - this.w = w; - this.h = h; - this.parentClass = parentClass; - this.dual = new DarkUIAwareIcon(this); - } - - @Contract(pure = true) - private DarkUIAwareIcon(@NotNull final DarkUIAwareIcon dual) { - this.darkKey = dual.lightKey; - this.lightKey = dual.darkKey; - this.dual = dual; - this.w = dual.w; - this.h = dual.h; - this.parentClass = dual.parentClass; - } - - public void paintIcon(final Component c, @NotNull final Graphics g2, - final int x, final int y, final double scale) { - ensureLoaded(); - Graphics2D g = (Graphics2D) g2.create(); - g.translate(x, y); - g.scale(scale, scale); - icon.paintIcon(c, g, 0, 0); - g2.dispose(); - } - - private void ensureLoaded() { - if (!isLoaded()) { - loadIcon(); - } - } - - @Contract(pure = true) - private boolean isLoaded() { - return loaded && LafManager.getTheme().equals(currentTheme); - } - - private void loadIcon() { - currentTheme = LafManager.getTheme(); - if (currentTheme.isDark()) { - icon = IconLoader.get(parentClass).getIcon(darkKey, w, h); - } else { - icon = IconLoader.get(parentClass).getIcon(lightKey, w, h); - } - loaded = true; - } - - @Override - public void paintIcon(final Component c, final Graphics g, final int x, final int y) { - ensureLoaded(); - icon.paintIcon(c, g, x, y); - } - - @Override - public int getIconWidth() { - ensureLoaded(); - return icon.getIconWidth(); - } - - @Override - public int getIconHeight() { - ensureLoaded(); - return icon.getIconHeight(); - } - - public DarkUIAwareIcon getDual() { - return dual; - } -} diff --git a/src/main/java/com/weis/darklaf/icons/ThemedSVGIcon.java b/src/main/java/com/weis/darklaf/icons/ThemedSVGIcon.java deleted file mode 100644 index f5b4735d..00000000 --- a/src/main/java/com/weis/darklaf/icons/ThemedSVGIcon.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.weis.darklaf.icons; - -import com.weis.darklaf.LafManager; -import com.weis.darklaf.theme.Theme; -import org.jetbrains.annotations.NotNull; - -import java.awt.*; -import java.net.URI; - -/** - * @author Jannis Weis - */ -public class ThemedSVGIcon extends DarkSVGIcon { - - private Theme currentTheme; - - public ThemedSVGIcon(@NotNull final URI uri, final int displayWidth, final int displayHeight) { - super(uri, displayWidth, displayHeight); - } - - @Override - public void paintIcon(final Component c, final Graphics g, final int x, final int y) { - ensureTheme(); - super.paintIcon(c, g, x, y); - } - - private void ensureTheme() { - var theme = LafManager.getTheme(); - if (currentTheme != theme) { - IconColorMapper.patchColors(getSVGIcon()); - currentTheme = theme; - } - } -} diff --git a/src/main/java/com/weis/darklaf/icons/UIAwareIcon.java b/src/main/java/com/weis/darklaf/icons/UIAwareIcon.java deleted file mode 100644 index 00fff44a..00000000 --- a/src/main/java/com/weis/darklaf/icons/UIAwareIcon.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.weis.darklaf.icons; - -import javax.swing.*; - -/** - * @author Jannis Weis - */ -public interface UIAwareIcon extends Icon { - - UIAwareIcon getDual(); -} diff --git a/src/main/java/com/weis/darklaf/theme/DarculaTheme.java b/src/main/java/com/weis/darklaf/theme/DarculaTheme.java deleted file mode 100644 index 9e8b3494..00000000 --- a/src/main/java/com/weis/darklaf/theme/DarculaTheme.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.weis.darklaf.theme; - -/** - * @author Jannis Weis - */ -public class DarculaTheme extends Theme { - - @Override - protected String getResourcePath() { - return "darcula/"; - } - - @Override - public String getName() { - return "darcula"; - } - - @Override - public boolean isDark() { - return true; - } - - -} diff --git a/src/main/java/com/weis/darklaf/theme/IntelliJTheme.java b/src/main/java/com/weis/darklaf/theme/IntelliJTheme.java deleted file mode 100644 index e817991f..00000000 --- a/src/main/java/com/weis/darklaf/theme/IntelliJTheme.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.weis.darklaf.theme; - -import com.weis.darklaf.util.PropertyLoader; -import com.weis.darklaf.util.SystemInfo; - -import javax.swing.*; -import java.util.Properties; - -/** - * @author Jannis Weis - */ -public class IntelliJTheme extends Theme { - - @Override - public void loadPlatformProperties(final Properties properties, final UIDefaults currentDefaults) { - super.loadPlatformProperties(properties, currentDefaults); - if (SystemInfo.isMac) { - var name = getResourcePath() + getName() + "_mac.properties"; - PropertyLoader.putProperties(load(name), properties, currentDefaults); - } - } - - @Override - protected String getResourcePath() { - return "intellij/"; - } - - @Override - public boolean isDark() { - return false; - } - - @Override - public String getName() { - return "intellij"; - } - - @Override - public void loadUIProperties(final Properties properties, final UIDefaults currentDefaults) { - super.loadUIProperties(properties, currentDefaults); - var name = getResourcePath() + getName() + "_ui.properties"; - PropertyLoader.putProperties(load(name), properties, currentDefaults); - } -} diff --git a/src/main/java/com/weis/darklaf/ui/cell/DarkCellBorder.java b/src/main/java/com/weis/darklaf/ui/cell/DarkCellBorder.java deleted file mode 100644 index 65868ccd..00000000 --- a/src/main/java/com/weis/darklaf/ui/cell/DarkCellBorder.java +++ /dev/null @@ -1,14 +0,0 @@ -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() { - super(2, 5, 2, 5); - } -} diff --git a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxBorder.java b/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxBorder.java deleted file mode 100644 index c2dae1d2..00000000 --- a/src/main/java/com/weis/darklaf/ui/checkbox/DarkCheckBoxBorder.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.weis.darklaf.ui.checkbox; - - -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.SystemInfo; - -import javax.swing.*; -import javax.swing.border.Border; -import javax.swing.plaf.InsetsUIResource; -import javax.swing.plaf.UIResource; -import java.awt.*; - -/** - * @author Jannis Weis - */ -public class DarkCheckBoxBorder implements Border, UIResource { - - @Override - public void paintBorder(final Component c, final Graphics g, final int x, final int y, - final int width, final int height) { - } - - @Override - public Insets getBorderInsets(final Component c) { - if (isInCell(c)) { - return new Insets(0, 0, 0, 0); - } - final int a = SystemInfo.isMac ? 2 : 4; - return new InsetsUIResource(a, a, a, a); - } - - protected boolean isInCell(final Component c) { - return isTreeCellEditor(c) || isTableCellEditor(c) || DarkUIUtil.isInCell(c); - } - - protected boolean isTreeCellEditor(final Component c) { - return c instanceof JComponent - && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); - } - - protected boolean isTableCellEditor(final Component c) { - return c instanceof JComponent - && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); - } - - @Override - public boolean isBorderOpaque() { - return false; - } -} diff --git a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorListener.java b/src/main/java/com/weis/darklaf/ui/colorchooser/ColorListener.java deleted file mode 100644 index ec76ef74..00000000 --- a/src/main/java/com/weis/darklaf/ui/colorchooser/ColorListener.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.*; - -public interface ColorListener { - - void colorChanged(final Color color, final Object source); -} diff --git a/src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconBorder.java b/src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconBorder.java deleted file mode 100644 index 24ae787f..00000000 --- a/src/main/java/com/weis/darklaf/ui/internalframe/DarkDesktopIconBorder.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.weis.darklaf.ui.internalframe; - -import com.weis.darklaf.components.border.MutableLineBorder; - -import javax.swing.*; -import javax.swing.plaf.UIResource; - -/** - * @author Jannis Weis - */ -public class DarkDesktopIconBorder extends MutableLineBorder implements UIResource { - - public DarkDesktopIconBorder() { - super(1, 1, 1, 1, null); - setColor(UIManager.getColor("DesktopIcon.borderColor")); - } -} diff --git a/src/main/java/com/weis/darklaf/ui/label/DarkLabelUI.java b/src/main/java/com/weis/darklaf/ui/label/DarkLabelUI.java deleted file mode 100644 index 2b34adb4..00000000 --- a/src/main/java/com/weis/darklaf/ui/label/DarkLabelUI.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.weis.darklaf.ui.label; - -import org.jetbrains.annotations.Contract; - -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(); - - @Contract(pure = true) - public static ComponentUI createUI(final JComponent c) { - return darkLabelUI; - } -} diff --git a/src/main/java/com/weis/darklaf/ui/list/DarkListCellBorder.java b/src/main/java/com/weis/darklaf/ui/list/DarkListCellBorder.java deleted file mode 100644 index 4bab21f7..00000000 --- a/src/main/java/com/weis/darklaf/ui/list/DarkListCellBorder.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.weis.darklaf.ui.list; - -import com.weis.darklaf.ui.cell.DarkCellBorder; - -/** - * @author Jannis Weis - */ -public class DarkListCellBorder extends DarkCellBorder { -} diff --git a/src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarBorder.java b/src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarBorder.java deleted file mode 100644 index 87b03438..00000000 --- a/src/main/java/com/weis/darklaf/ui/progressbar/DarkProgressBarBorder.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.weis.darklaf.ui.progressbar; - -import javax.swing.plaf.BorderUIResource; - -/** - * @author Konstantin Bulenkov - * @author Jannis Weis - */ -public class DarkProgressBarBorder extends BorderUIResource.EmptyBorderUIResource { - public DarkProgressBarBorder() { - super(0, 0, 0, 0); - } -} diff --git a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonBorder.java b/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonBorder.java deleted file mode 100644 index 8b7825af..00000000 --- a/src/main/java/com/weis/darklaf/ui/radiobutton/DarkRadioButtonBorder.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.weis.darklaf.ui.radiobutton; - - -import com.weis.darklaf.util.DarkUIUtil; -import com.weis.darklaf.util.SystemInfo; - -import javax.swing.*; -import javax.swing.border.Border; -import javax.swing.plaf.InsetsUIResource; -import javax.swing.plaf.UIResource; -import java.awt.*; - -/** - * @author Konstantin Bulenkov - * @author Jannis Weis - */ -public class DarkRadioButtonBorder implements Border, UIResource { - - @Override - public void paintBorder(final Component c, final Graphics g, final int x, final int y, - final int width, final int height) { - } - - @Override - public Insets getBorderInsets(final Component c) { - if (isInCell(c)) { - return new Insets(0, 0, 0, 0); - } - final int a = SystemInfo.isMac ? 2 : 4; - return new InsetsUIResource(a, a, a, a); - } - - protected boolean isInCell(final Component c) { - return isTreeCellEditor(c) || isTableCellEditor(c) || DarkUIUtil.isInCell(c); - } - - protected boolean isTreeCellEditor(final Component c) { - return c instanceof JComponent - && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); - } - - protected boolean isTableCellEditor(final Component c) { - return c instanceof JComponent - && Boolean.TRUE.equals(((JComponent) c).getClientProperty("JToggleButton.isTreeCellEditor")); - } - - @Override - public boolean isBorderOpaque() { - return false; - } -} diff --git a/src/main/java/com/weis/darklaf/ui/rootpane/CloseButtonUI.java b/src/main/java/com/weis/darklaf/ui/rootpane/CloseButtonUI.java deleted file mode 100644 index 139736df..00000000 --- a/src/main/java/com/weis/darklaf/ui/rootpane/CloseButtonUI.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.weis.darklaf.ui.rootpane; - -import com.weis.darklaf.ui.button.DarkButtonUI; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import java.awt.*; - -/** - * @author Jannis Weis - */ -public class CloseButtonUI extends DarkButtonUI { - - protected Color closeHover; - protected Color closeClick; - - @Override - protected void installDefaults(final AbstractButton b) { - super.installDefaults(b); - closeHover = UIManager.getColor("TitlePane.close.rollOverColor"); - closeClick = UIManager.getColor("TitlePane.close.clickColor"); - } - - @Override - protected Color getShadowColor(@NotNull final AbstractButton c) { - return c.getModel().isArmed() ? closeClick : closeHover; - } -} diff --git a/src/main/java/com/weis/darklaf/ui/rootpane/TitlePaneIcon.java b/src/main/java/com/weis/darklaf/ui/rootpane/TitlePaneIcon.java deleted file mode 100644 index b31de974..00000000 --- a/src/main/java/com/weis/darklaf/ui/rootpane/TitlePaneIcon.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.weis.darklaf.ui.rootpane; - -import org.jetbrains.annotations.Contract; - -import javax.swing.*; -import java.awt.*; - -/** - * @author Jannis Weis - */ -public class TitlePaneIcon implements Icon { - - private final Icon activeIcon; - private final Icon inactiveIcon; - private boolean active = true; - - @Contract(pure = true) - public TitlePaneIcon(final Icon active, final Icon inactive) { - this.activeIcon = active; - this.inactiveIcon = inactive; - } - - public void setActive(final boolean active) { - this.active = active; - } - - @Override - public void paintIcon(final Component c, final Graphics g, final int x, final int y) { - currentIcon().paintIcon(c, g, x, y); - } - - @Contract(pure = true) - private Icon currentIcon() { - return active ? activeIcon : inactiveIcon; - } - - @Override - public int getIconWidth() { - return currentIcon().getIconWidth(); - } - - @Override - public int getIconHeight() { - return currentIcon().getIconHeight(); - } -} diff --git a/src/main/java/com/weis/darklaf/ui/text/DarkTextPaneUI.java b/src/main/java/com/weis/darklaf/ui/text/DarkTextPaneUI.java deleted file mode 100644 index 2cddfe2b..00000000 --- a/src/main/java/com/weis/darklaf/ui/text/DarkTextPaneUI.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.weis.darklaf.ui.text; - -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import javax.swing.plaf.ComponentUI; -import javax.swing.text.Element; -import javax.swing.text.View; -import java.beans.PropertyChangeEvent; - -/** - * @author Jannis Weis - */ -public class DarkTextPaneUI extends DarkEditorPaneUI { - - - @NotNull - @Contract("_ -> new") - public static ComponentUI createUI(final JComponent c) { - return new DarkTextPaneUI(); - } - - /* - * Implementation of BasicEditorPaneUI - */ - - @Override - public void installUI(final JComponent c) { - super.installUI(c); - } - - @Override - protected void propertyChange(final PropertyChangeEvent evt) { - super.propertyChange(evt); - } - - @Override - protected String getPropertyPrefix() { - return "TextPane"; - } - - @Override - public View create(final Element elem) { - return super.create(elem); - } -} diff --git a/src/main/java/com/weis/darklaf/util/TimerUtil.java b/src/main/java/com/weis/darklaf/util/TimerUtil.java deleted file mode 100644 index 0071f18c..00000000 --- a/src/main/java/com/weis/darklaf/util/TimerUtil.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.weis.darklaf.util; - -import org.jetbrains.annotations.Contract; -import org.jetbrains.annotations.NotNull; - -import javax.swing.*; -import java.awt.event.ActionListener; - -/** - * @author Jannis Weis - */ -public final class TimerUtil { - @Contract("_, _, _ -> new") - @NotNull - public static Timer createNamedTimer(@NotNull final String name, final int delay, - @NotNull final ActionListener listener) { - return new Timer(delay, listener) { - @Override - public String toString() { - return name; - } - }; - } - - @Contract("_, _ -> new") - @NotNull - public static Timer createNamedTimer(@NotNull final String name, final int delay) { - return new Timer(delay, null) { - @Override - public String toString() { - return name; - } - }; - } -} diff --git a/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java b/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java index 062cfdb7..7860eb49 100644 --- a/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java +++ b/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java @@ -23,8 +23,8 @@ */ package javax.swing.text.DefaultHighlighterDark; -import com.weis.darklaf.util.GraphicsContext; -import com.weis.darklaf.util.GraphicsUtil; +import com.github.weisj.darklaf.util.GraphicsContext; +import com.github.weisj.darklaf.util.GraphicsUtil; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import sun.swing.SwingUtilities2; diff --git a/src/main/java/org/pbjar/jxlayer/plaf/ext/TransformUI.java b/src/main/java/org/pbjar/jxlayer/plaf/ext/TransformUI.java index 6e59e72f..59d273a4 100644 --- a/src/main/java/org/pbjar/jxlayer/plaf/ext/TransformUI.java +++ b/src/main/java/org/pbjar/jxlayer/plaf/ext/TransformUI.java @@ -30,8 +30,8 @@ package org.pbjar.jxlayer.plaf.ext; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import com.github.weisj.darklaf.log.LogFormatter; import com.sun.java.swing.SwingUtilities3; -import com.weis.darklaf.log.LogFormatter; import org.jdesktop.jxlayer.JXLayer; import org.jdesktop.jxlayer.plaf.AbstractBufferedLayerUI; import org.jdesktop.jxlayer.plaf.LayerUI; diff --git a/src/main/java/org/pbjar/jxlayer/plaf/ext/transform/TransformRPMImpl.java b/src/main/java/org/pbjar/jxlayer/plaf/ext/transform/TransformRPMImpl.java index 0760d7e5..5166fa78 100644 --- a/src/main/java/org/pbjar/jxlayer/plaf/ext/transform/TransformRPMImpl.java +++ b/src/main/java/org/pbjar/jxlayer/plaf/ext/transform/TransformRPMImpl.java @@ -31,7 +31,7 @@ package org.pbjar.jxlayer.plaf.ext.transform; -import com.weis.darklaf.log.LogFormatter; +import com.github.weisj.darklaf.log.LogFormatter; import org.jdesktop.jxlayer.JXLayer; import org.jdesktop.jxlayer.plaf.LayerUI; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/org/pbjar/jxlayer/repaint/RepaintManagerUtils.java b/src/main/java/org/pbjar/jxlayer/repaint/RepaintManagerUtils.java index 2eb7f848..cfcdff4b 100644 --- a/src/main/java/org/pbjar/jxlayer/repaint/RepaintManagerUtils.java +++ b/src/main/java/org/pbjar/jxlayer/repaint/RepaintManagerUtils.java @@ -31,7 +31,7 @@ package org.pbjar.jxlayer.repaint; -import com.weis.darklaf.log.LogFormatter; +import com.github.weisj.darklaf.log.LogFormatter; import org.jdesktop.swingx.ForwardingRepaintManager; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBox.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBox.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBox.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBox.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxFocused.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxFocused.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxFocused.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxFocused.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelectedDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelectedDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelectedDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelectedDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelectedFocused.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelectedFocused.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxIndeterminateSelectedFocused.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxIndeterminateSelectedFocused.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxSelectedDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelectedDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxSelectedDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelectedDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/checkBoxSelectedFocused.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelectedFocused.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/checkBoxSelectedFocused.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/checkBoxSelectedFocused.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radio.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radio.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radio.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radio.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radioDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radioDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radioDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radioDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radioFocused.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radioFocused.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radioFocused.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radioFocused.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radioSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radioSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radioSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radioSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radioSelectedDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radioSelectedDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radioSelectedDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radioSelectedDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/control/radioSelectedFocused.svg b/src/main/resources/com/github/weisj/darklaf/icons/control/radioSelectedFocused.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/control/radioSelectedFocused.svg rename to src/main/resources/com/github/weisj/darklaf/icons/control/radioSelectedFocused.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/dialog/errorDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/errorDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/dialog/errorDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/errorDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/dialog/informationDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/informationDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/dialog/informationDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/informationDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/dialog/questionDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/questionDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/dialog/questionDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/questionDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/dialog/warningDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/warningDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/dialog/warningDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/dialog/warningDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/desktop.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/desktop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/desktop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/desktop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/drive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/drive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/drive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/drive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/folder.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/folder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/folder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/folder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/general.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/general.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/general.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/general.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/homeFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/homeFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/homeFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/homeFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/newFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/newFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/newFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/newFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/text.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/text.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/text.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/text.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/unknown.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/unknown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/unknown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/unknown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/files/upFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/files/upFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/files/upFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/files/upFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/frame/frame.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/frame/frame.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/frame/frame.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/frame/frame.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_0.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_0.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_0.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_0.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_1.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_1.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_1.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_1.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_2.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_2.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_2.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_2.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_3.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_3.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_3.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_3.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_4.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_4.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/indicator/speaker_4.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/indicator/speaker_4.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/copy.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/copy.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/copy.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/copy.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/cut.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/cut.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/cut.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/cut.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/delete.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/delete.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/delete.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/delete.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/down.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/down.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/down.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/down.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/groupBy.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/groupBy.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/groupBy.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/groupBy.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/listFiles.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/listFiles.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/listFiles.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/listFiles.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/paste.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/paste.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/paste.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/paste.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/save.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/save.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/save.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/save.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/up.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/up.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/up.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/up.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/menu/upDown.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/menu/upDown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/menu/upDown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/menu/upDown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/minus.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/minus.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/minus.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/minus.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/minusSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/minusSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/minusSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/minusSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/pipette.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/pipette.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/pipette.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/pipette.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/pipette_rollover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/pipette_rollover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/pipette_rollover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/pipette_rollover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/plus.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/plus.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/plus.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/plus.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/misc/plusSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/misc/plusSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/misc/plusSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/misc/plusSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/add.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/add.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/add.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/add.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDivider.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDivider.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDivider.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDivider.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDown.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDownHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDownHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDownHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDownHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDownSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDownSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowDownSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowDownSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeftHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeftHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeftHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeftHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeftSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeftSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowLeftSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowLeftSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRightHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRightHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRightHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRightHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRightSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRightSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowRightSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowRightSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowSplitCenterH.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowSplitCenterH.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowSplitCenterH.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowSplitCenterH.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowSplitCenterV.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowSplitCenterV.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowSplitCenterV.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowSplitCenterV.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUp.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUp.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUp.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUp.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUpHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUpHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUpHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUpHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUpSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUpSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/arrowUpSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/arrowUpSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmark.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmark.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmark.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmark.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmarkDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmarkDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmarkDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmarkDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmarkSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmarkSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/checkmarkSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/checkmarkSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/clear.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/clear.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/clear.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/clear.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/close.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/close.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/close.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/close.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/closeHovered.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/closeHovered.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/closeHovered.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/closeHovered.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/collapse.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/collapse.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/collapse.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/collapse.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/divider.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/divider.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/divider.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/divider.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/eye.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/eye.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/eye.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/eye.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/horizontalGlue.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/horizontalGlue.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/horizontalGlue.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/horizontalGlue.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/horizontalGrip.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/horizontalGrip.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/horizontalGrip.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/horizontalGrip.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moreTabs.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moreTabs.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moreTabs.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moreTabs.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToBottomLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToBottomLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToBottomLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToBottomLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToBottomRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToBottomRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToBottomRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToBottomRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToLeftBottom.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToLeftBottom.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToLeftBottom.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToLeftBottom.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToLeftTop.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToLeftTop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToLeftTop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToLeftTop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToRightBottom.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToRightBottom.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToRightBottom.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToRightBottom.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToRightTop.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToRightTop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToRightTop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToRightTop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToTopLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToTopLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToTopLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToTopLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToTopRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToTopRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/moveToTopRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/moveToTopRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/search.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/search.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/search.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/search.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/searchWithHistory.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/searchWithHistory.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/searchWithHistory.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/searchWithHistory.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/separatorH.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/separatorH.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/separatorH.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/separatorH.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/separatorV.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/separatorV.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/separatorV.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/separatorV.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/verticalGlue.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/verticalGlue.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/verticalGlue.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/verticalGlue.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/navigation/verticalGrip.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/verticalGrip.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/navigation/verticalGrip.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/navigation/verticalGrip.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/closeActive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeActive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/closeActive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeActive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/closeHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/closeHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/closeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/closeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/closeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/help.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/help.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/help.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/help.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/helpInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/helpInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/helpInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/helpInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/maximize.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/maximize.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/maximize.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/maximize.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/maximizeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/maximizeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/maximizeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/maximizeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/minimize.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/minimize.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/minimize.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/minimize.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/minimizeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/minimizeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/minimizeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/minimizeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/restore.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/restore.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/restore.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/restore.svg diff --git a/src/main/resources/com/weis/darklaf/icons/dark/window/restoreInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/dark/window/restoreInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/dark/window/restoreInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/dark/window/restoreInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/duke.svg b/src/main/resources/com/github/weisj/darklaf/icons/duke.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/duke.svg rename to src/main/resources/com/github/weisj/darklaf/icons/duke.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/dialog/errorDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/dialog/errorDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/dialog/errorDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/dialog/errorDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/dialog/informationDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/dialog/informationDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/dialog/informationDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/dialog/informationDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/dialog/questionDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/dialog/questionDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/dialog/questionDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/dialog/questionDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/dialog/warningDialog.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/dialog/warningDialog.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/dialog/warningDialog.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/dialog/warningDialog.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/desktop.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/desktop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/desktop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/desktop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/drive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/drive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/drive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/drive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/folder.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/folder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/folder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/folder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/general.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/general.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/general.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/general.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/homeFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/homeFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/homeFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/homeFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/newFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/newFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/newFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/newFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/text.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/text.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/text.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/text.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/unknown.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/unknown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/unknown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/unknown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/files/upFolder.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/files/upFolder.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/files/upFolder.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/files/upFolder.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/frame/frame.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/frame/frame.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/frame/frame.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/frame/frame.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_0.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_0.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_0.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_0.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_1.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_1.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_1.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_1.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_2.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_2.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_2.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_2.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_3.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_3.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_3.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_3.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_4.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_4.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/indicator/speaker_4.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/indicator/speaker_4.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/copy.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/copy.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/copy.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/copy.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/cut.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/cut.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/cut.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/cut.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/delete.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/delete.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/delete.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/delete.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/down.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/down.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/down.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/down.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/groupBy.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/groupBy.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/groupBy.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/groupBy.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/listFiles.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/listFiles.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/listFiles.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/listFiles.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/paste.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/paste.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/paste.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/paste.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/save.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/save.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/save.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/save.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/up.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/up.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/up.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/up.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/menu/upDown.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/menu/upDown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/menu/upDown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/menu/upDown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/minus.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/minus.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/minus.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/minus.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/minusSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/minusSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/minusSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/minusSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/pipette.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/pipette.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/pipette.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/pipette.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/pipette_rollover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/pipette_rollover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/pipette_rollover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/pipette_rollover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/plus.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/plus.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/plus.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/plus.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/misc/plusSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/misc/plusSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/misc/plusSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/misc/plusSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/add.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/add.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/add.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/add.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDivider.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDivider.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDivider.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDivider.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDown.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDown.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDown.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDown.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDownHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDownHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDownHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDownHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDownSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDownSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowDownSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowDownSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeftHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeftHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeftHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeftHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeftSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeftSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowLeftSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowLeftSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRightHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRightHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRightHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRightHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRightSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRightSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowRightSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowRightSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowSplitCenterH.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowSplitCenterH.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowSplitCenterH.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowSplitCenterH.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowSplitCenterV.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowSplitCenterV.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowSplitCenterV.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowSplitCenterV.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUp.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUp.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUp.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUp.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUpHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUpHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUpHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUpHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUpSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUpSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/arrowUpSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/arrowUpSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/checkmark.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmark.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/checkmark.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmark.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/checkmarkDisabled.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmarkDisabled.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/checkmarkDisabled.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmarkDisabled.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/checkmarkSelected.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmarkSelected.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/checkmarkSelected.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/checkmarkSelected.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/clear.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/clear.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/clear.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/clear.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/close.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/close.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/close.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/close.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/closeHovered.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/closeHovered.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/closeHovered.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/closeHovered.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/collapse.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/collapse.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/collapse.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/collapse.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/divider.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/divider.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/divider.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/divider.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/eye.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/eye.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/eye.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/eye.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/horizontalGlue.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/horizontalGlue.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/horizontalGlue.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/horizontalGlue.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/horizontalGrip.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/horizontalGrip.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/horizontalGrip.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/horizontalGrip.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moreTabs.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moreTabs.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moreTabs.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moreTabs.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToBottomLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToBottomLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToBottomLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToBottomLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToBottomRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToBottomRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToBottomRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToBottomRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToLeftBottom.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToLeftBottom.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToLeftBottom.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToLeftBottom.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToLeftTop.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToLeftTop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToLeftTop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToLeftTop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToRightBottom.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToRightBottom.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToRightBottom.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToRightBottom.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToRightTop.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToRightTop.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToRightTop.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToRightTop.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToTopLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToTopLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToTopLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToTopLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/moveToTopRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToTopRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/moveToTopRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/moveToTopRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/search.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/search.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/search.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/search.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/searchWithHistory.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/searchWithHistory.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/searchWithHistory.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/searchWithHistory.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/separatorH.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/separatorH.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/separatorH.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/separatorH.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/separatorV.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/separatorV.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/separatorV.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/separatorV.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/undo.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/undo.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/undo.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/undo.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/undo_inactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/undo_inactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/undo_inactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/undo_inactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/verticalGlue.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/verticalGlue.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/verticalGlue.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/verticalGlue.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/navigation/verticalGrip.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/navigation/verticalGrip.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/navigation/verticalGrip.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/navigation/verticalGrip.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/closeActive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/closeActive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/closeActive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/closeActive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/closeHover.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/closeHover.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/closeHover.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/closeHover.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/closeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/closeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/closeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/closeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/help.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/help.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/help.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/help.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/helpInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/helpInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/helpInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/helpInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/maximize.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/maximize.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/maximize.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/maximize.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/maximizeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/maximizeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/maximizeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/maximizeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/minimize.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/minimize.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/minimize.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/minimize.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/minimizeInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/minimizeInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/minimizeInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/minimizeInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/restore.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/restore.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/restore.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/restore.svg diff --git a/src/main/resources/com/weis/darklaf/icons/light/window/restoreInactive.svg b/src/main/resources/com/github/weisj/darklaf/icons/light/window/restoreInactive.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/light/window/restoreInactive.svg rename to src/main/resources/com/github/weisj/darklaf/icons/light/window/restoreInactive.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/bottom.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/bottom.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/bottom.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/bottom.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/bottomLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/bottomLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/bottomLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/bottomLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/bottomRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/bottomRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/bottomRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/bottomRight.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/left.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/left.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/left.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/left.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/right.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/right.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/right.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/right.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/top.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/top.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/top.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/top.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/topLeft.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/topLeft.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/topLeft.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/topLeft.svg diff --git a/src/main/resources/com/weis/darklaf/icons/shadow/topRight.svg b/src/main/resources/com/github/weisj/darklaf/icons/shadow/topRight.svg similarity index 100% rename from src/main/resources/com/weis/darklaf/icons/shadow/topRight.svg rename to src/main/resources/com/github/weisj/darklaf/icons/shadow/topRight.svg diff --git a/src/main/resources/com/github/weisj/darklaf/log/logging.properties b/src/main/resources/com/github/weisj/darklaf/log/logging.properties new file mode 100644 index 00000000..f734c015 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/log/logging.properties @@ -0,0 +1,30 @@ +# +# 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. +# +handlers = java.util.logging.ConsoleHandler +.level = ALL + +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = com.github.weisj.darklaf.log.LogFormatter + +com.weis.darklaf.level = INFO \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/globals.properties b/src/main/resources/com/github/weisj/darklaf/properties/globals.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/properties/globals.properties rename to src/main/resources/com/github/weisj/darklaf/properties/globals.properties diff --git a/src/main/resources/com/weis/darklaf/properties/platform/linux.properties b/src/main/resources/com/github/weisj/darklaf/properties/platform/linux.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/properties/platform/linux.properties rename to src/main/resources/com/github/weisj/darklaf/properties/platform/linux.properties diff --git a/src/main/resources/com/weis/darklaf/properties/platform/mac.properties b/src/main/resources/com/github/weisj/darklaf/properties/platform/mac.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/properties/platform/mac.properties rename to src/main/resources/com/github/weisj/darklaf/properties/platform/mac.properties diff --git a/src/main/resources/com/weis/darklaf/properties/platform/windows.properties b/src/main/resources/com/github/weisj/darklaf/properties/platform/windows.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/properties/platform/windows.properties rename to src/main/resources/com/github/weisj/darklaf/properties/platform/windows.properties diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/borders.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/borders.properties new file mode 100644 index 00000000..81407de1 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/borders.properties @@ -0,0 +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. +# +TitledBorder.titleColor = %textForeground +TitledBorder.border = com.github.weisj.darklaf.ui.titledborder.DarkTitledBorder +TitledBorder.borderColor = %border \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties new file mode 100644 index 00000000..465b3fa9 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties @@ -0,0 +1,50 @@ +# +# 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. +# +ButtonUI = com.github.weisj.darklaf.ui.button.DarkButtonUI +Button.border = com.github.weisj.darklaf.ui.button.DarkButtonBorder +Button.disabledText = %textForegroundInactive +Button.shadow = %shadow +Button.selectedButtonForeground = %textForegroundDefault +Button.activeBorderColor = %widgetBorder +Button.inactiveBorderColor = %widgetBorderInactive +Button.defaultBorderColor = %widgetBorderDefault +Button.focusBorderColor = %glowFocusLine +Button.inactiveFillColor = %widgetFillInactive +Button.defaultFillColor = %widgetFillDefault +Button.defaultFillColorRollOver = %hoverHighlightDefault +Button.defaultFillColorClick = %clickHighlightDefault +Button.activeFillColor = %widgetFill +Button.activeFillColorRollOver = %hoverHighlight +Button.activeFillColorClick = %clickHighlight + +Button.arc = %arc +Button.squareArc = %arcSecondary +Button.focusArc = %arcFocus +Button.squareFocusArc = %arcSecondaryFocus +Button.minimumArc = %arcSecondary +Button.borderThickness = %borderThickness +Button.shadowHeight = %shadowHeight + +Button.shadow.hover = %hoverHighlight +Button.shadow.click = %clickHighlight \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/checkBox.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/checkBox.properties similarity index 53% rename from src/main/resources/com/weis/darklaf/properties/ui/checkBox.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/checkBox.properties index 91238364..bbf26c00 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/checkBox.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/checkBox.properties @@ -1,28 +1,28 @@ -#MIT License # -#Copyright (c) 2019 Jannis Weis +# MIT License # -#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: +# Copyright (c) 2019 Jannis Weis # -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# 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 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. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # -# suppress inspection "UnusedProperty" for whole file -CheckBoxUI = com.weis.darklaf.ui.checkbox.DarkCheckBoxUI -CheckBox.border = com.weis.darklaf.ui.checkbox.DarkCheckBoxBorder +# 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. +# +CheckBoxUI = com.github.weisj.darklaf.ui.checkbox.DarkCheckBoxUI +CheckBox.border = com.github.weisj.darklaf.ui.checkbox.DarkCheckBoxBorder CheckBox.activeFillColor = %widgetFill CheckBox.selectedFillColor = %widgetFillSelected CheckBox.inactiveFillColor = %widgetFillInactive diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/colorChooser.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/colorChooser.properties new file mode 100644 index 00000000..8e793a0a --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/colorChooser.properties @@ -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. +# +ColorChooserUI = com.github.weisj.darklaf.ui.colorchooser.DarkColorChooserUI +ColorChooser.pipetteEnabled = true +ColorChooser.previewBorderColor = %widgetBorder +ColorChooser.sliderBorderColor = %widgetBorder +ColorChooser.sliderKnobColor = 993300 +ColorChooser.showPreviewPanelText = false +ColorChooser.colorWheelDropBackgroundColor = %dropBackground +ColorChooser.colorWheelDropBorderColor = %dropForeground +ColorChooser.pipetteBorderColor = %widgetBorder +ColorChooser.swatchesRecentSwatchSize = 15,15 +ColorChooser.swatchesSwatchSize = 15,15 +ColorChooser.swatchBorderColor = %borderSecondary +ColorChooser.swatchGridColor = %gridLine +ColorChooser.sliderShadow = %shadow +ColorChooser.errorDelay = 600 +ColorChooser.swatchesDefaultRecentColor = %background +ColorChooser.colorWheelBackground = %background +#Icons +ColorChooser.pipette.icon = misc/pipette.svg[aware] +ColorChooser.pipetteRollover.icon = misc/pipette_rollover.svg[aware] diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/comboBox.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/comboBox.properties new file mode 100644 index 00000000..798832c4 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/comboBox.properties @@ -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. +# +ComboBoxUI = com.github.weisj.darklaf.ui.combobox.DarkComboBoxUI +ComboBox.squareButton = false +ComboBox.background = %backgroundContainer +ComboBox.activeBorderColor = %widgetBorder +ComboBox.inactiveBorderColor = %widgetBorderInactive +ComboBox.focusBorderColor = %glowFocusLine +ComboBox.inactiveBackground = %widgetFillInactive +ComboBox.activeBackground = %backgroundContainer +ComboBox.arrowBackgroundStart = %background +ComboBox.arrowBackgroundEnd = %background +ComboBox.editBackground = %background +ComboBox.disabledForeground = %textForegroundInactive +ComboBox.disabledBackground = %widgetFillInactive +ComboBox.selectionBackground = %highlightFillFocus +ComboBox.arc = %arc +ComboBox.borderThickness = %borderThickness + +#Icons +ComboBox.arrow.icon = navigation/arrowDown.svg[aware] +ComboBox.arrowInactive.icon = navigation/arrowDown.svg[dual] \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/fileChooser.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/fileChooser.properties new file mode 100644 index 00000000..11a9aaf2 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/fileChooser.properties @@ -0,0 +1,51 @@ +# +# 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. +# +FileChooserUI = com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUI +FileChooser.newFolderIcon = files/newFolder.svg[aware] +FileChooser.upFolderIcon = files/upFolder.svg[aware] +FileChooser.homeFolderIcon = files/homeFolder.svg[aware] +FileChooser.listViewBorder = com.github.weisj.darklaf.ui.filechooser.DarkFileChooserListViewBorder + +FileChooser.detailsViewIcon = menu/listFiles.svg[aware] +FileChooser.listViewIcon = menu/groupBy.svg[aware] + +FileChooser.borderColor = %borderSecondary +FileChooser.rowHeight = 20 +FileChooser.minEditDelay = 200 +FileChooser.maxEditDelay = 600 +FileChooser.listViewWindowsStyle = false +FileChooser.fileSizeKiloBytes = {0} kb +FileChooser.fileSizeMegaBytes = {0} mb +FileChooser.fileSizeGigaBytes = {0} gb +FileChooser.readOnly = false + +FileView.background = %textBackground +FileView.foreground = %textForeground +FileView.fullRowSelection = true + +FileView.fileIcon = files/general.svg[aware] +FileView.directoryIcon = files/folder.svg[aware] +FileView.computerIcon = files/desktop.svg[aware] +FileView.floppyDriveIcon = menu/save.svg[aware] +FileView.hardDriveIcon = files/drive.svg[aware] \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/internalFrame.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/internalFrame.properties new file mode 100644 index 00000000..f14dc9bd --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/internalFrame.properties @@ -0,0 +1,58 @@ +# +# 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. +# +InternalFrameUI = com.github.weisj.darklaf.ui.internalframe.DarkInternalFrameUI +InternalFrame.border = com.github.weisj.darklaf.ui.internalframe.DarkInternalFrameBorder +InternalFrame.optionDialogBorder = com.github.weisj.darklaf.ui.internalframe.DarkInternalFrameBorder +InternalFrame.paletteBorder = com.github.weisj.darklaf.ui.internalframe.DarkInternalFrameBorder +InternalFrame.borderShadowColor = %shadow +InternalFrame.activeTitleBackground = %backgroundColorful +InternalFrame.background = %background + +InternalFrameTitlePane.selectedTextForeground = %textForeground +InternalFrameTitlePane.borderColor = %border +InternalFrameTitlePane.backgroundColor = %background +InternalFrameTitlePane.selectedBackgroundColor = %backgroundColorful +InternalFrameTitlePane.selectedButtonColor = %backgroundColorful +InternalFrameTitlePane.selectedButtonHoverColor = %hoverHighlightColorful +InternalFrameTitlePane.selectedButtonClickColor = %clickHighlightColorful +InternalFrameTitlePane.buttonColor = %background +InternalFrameTitlePane.buttonHoverColor = %hoverHighlight +InternalFrameTitlePane.buttonClickColor = %clickHighlight + + +DesktopIconUI = com.github.weisj.darklaf.ui.internalframe.DarkDesktopIconUI +DesktopIcon.border = com.github.weisj.darklaf.ui.internalframe.DarkDesktopIconBorder +DesktopIcon.background = %background +DesktopIcon.borderColor = %borderTertiary +DesktopIcon.hoverColor = %backgroundHoverSecondary +DesktopIcon.clickColor = %backgroundHoverSecondary +desktop = %backgroundColorful + +#Icons +InternalFrame.icon = duke.svg +InternalFrameTitlePane.close.icon = window/closeActive.svg[aware] +InternalFrameTitlePane.minimize.icon = window/restore.svg[aware] +InternalFrameTitlePane.maximize.icon = window/maximize.svg[aware] +InternalFrameTitlePane.iconify.icon = window/minimize.svg[aware] +DesktopIcon.drag.icon = navigation/horizontalGrip.svg[aware](5,20) \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/label.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/label.properties new file mode 100644 index 00000000..d67df955 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/label.properties @@ -0,0 +1,24 @@ +# +# 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. +# +LabelUI = com.github.weisj.darklaf.ui.label.DarkLabelUI \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/list.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/list.properties new file mode 100644 index 00000000..ad82a268 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/list.properties @@ -0,0 +1,34 @@ +# +# 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. +# +ListUI = com.github.weisj.darklaf.ui.list.DarkListUI +List.border = null +List.background = %backgroundContainer +List.focusSelectedCellHighlightBorder = com.github.weisj.darklaf.ui.list.DarkListCellFocusBorder +List.focusCellHighlightBorder = com.github.weisj.darklaf.ui.list.DarkListCellBorder +List.cellNoFocusBorder = com.github.weisj.darklaf.ui.list.DarkListCellBorder +List.dropLineColor = %dropForeground +List.selectionBackground = %highlightFillFocus +List.focusBorderColor = %borderFocus +List.alternateRowBackground = %backgroundAlternative +List.selectionForegroundInactive = %textSelectionForegroundInactive diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/menu.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/menu.properties new file mode 100644 index 00000000..5bc2cc74 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/menu.properties @@ -0,0 +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. +# +MenuUI = com.github.weisj.darklaf.ui.menu.DarkMenuUI +Menu.maxGutterIconWidth = 18 +Menu.border = com.github.weisj.darklaf.ui.menu.DarkMenuItemBorder +Menu.selectionBackground = %highlightFillFocus +Menu.acceleratorForeground = %acceleratorForeground +Menu.acceleratorSelectionForeground = %acceleratorForeground +Menu.submenuPopupOffsetX = -4 +Menu.submenuPopupOffsetY = -2 +Menu.background = %background + +#Icons +Menu.arrowIcon = navigation/arrowRight.svg[aware] \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/menuBar.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/menuBar.properties new file mode 100644 index 00000000..4fe63160 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/menuBar.properties @@ -0,0 +1,29 @@ +# +# 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. +# +MenuBarUI = com.github.weisj.darklaf.ui.menu.DarkMenuBarUI +MenuBar.disabledBackground = %background +MenuBar.border = com.github.weisj.darklaf.ui.menu.DarkMenuBarBorder +MenuBar.borderColor = %border +MenuBar.highlight = %background +MenuBar.background = %background \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/menuItem.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/menuItem.properties new file mode 100644 index 00000000..12c01451 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/menuItem.properties @@ -0,0 +1,51 @@ +# +# 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. +# +MenuItemUI = com.github.weisj.darklaf.ui.menu.DarkMenuItemUIBase +MenuItem.border = com.github.weisj.darklaf.ui.menu.DarkMenuItemBorder + +MenuItem.selectionBackground = %highlightFillFocus +MenuItem.maxGutterIconWidth = 18 +MenuItem.acceleratorDelimiter = - +MenuItem.acceleratorForeground = %acceleratorForeground +MenuItem.acceleratorSelectionForeground = %acceleratorForeground + +RadioButtonMenuItemUI = com.github.weisj.darklaf.ui.radiobutton.DarkRadioButtonMenuItemUI +RadioButtonMenuItem.borderPainted = false +RadioButtonMenuItem.acceleratorForeground = %acceleratorForeground +RadioButtonMenuItem.acceleratorSelectionForeground = %acceleratorForeground +RadioButtonMenuItem.selectionBackground = %highlightFillFocus + +CheckBoxMenuItemUI = com.github.weisj.darklaf.ui.checkbox.DarkCheckBoxMenuItemUI +CheckBoxMenuItem.borderPainted = false +CheckBoxMenuItem.acceleratorForeground = %acceleratorForeground +CheckBoxMenuItem.acceleratorSelectionForeground = %acceleratorForeground +CheckBoxMenuItem.selectionBackground = %highlightFillFocus +CheckBoxMenuItem.foreground = %textForeground + +#Icons +MenuItem.arrowIcon = navigation/arrowRight.svg[aware] +MenuItem.arrowHover.icon = navigation/arrowRightHover.svg[aware] +RadioButtonMenuItem.arrowIcon = empty(16,16) +CheckBoxMenuItem.checkIcon = empty(19,19) +RadioButtonMenuItem.checkIcon = empty(19,19) \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/optionPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/optionPane.properties new file mode 100644 index 00000000..e3f58461 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/optionPane.properties @@ -0,0 +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. +# +OptionPaneUI = com.github.weisj.darklaf.ui.optionpane.DarkOptionPaneUI +OptionPane.messageForeground = %textForeground +OptionPane.buttonPadding = 5 +#SwingConstants.CENTER +OptionPane.buttonOrientation = 0 +OptionPane.sameSizeButtons = false + +#Icons +OptionPane.informationIcon = dialog/informationDialog.svg[aware](32,32) +OptionPane.questionIcon = dialog/questionDialog.svg[aware](32,32) +OptionPane.warningIcon = dialog/warningDialog.svg[aware](32,32) +OptionPane.errorIcon = dialog/errorDialog.svg[aware](32,32) diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/panel.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/panel.properties new file mode 100644 index 00000000..d1478519 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/panel.properties @@ -0,0 +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. +# +PanelUI = com.github.weisj.darklaf.ui.panel.DarkPanelUI +Panel.foreground = %textForeground +Panel.background = %background diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/popupMenu.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/popupMenu.properties new file mode 100644 index 00000000..08dd6422 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/popupMenu.properties @@ -0,0 +1,27 @@ +# +# 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. +# +PopupMenuUI = com.github.weisj.darklaf.ui.menu.DarkPopupMenuUI +PopupMenu.border = com.github.weisj.darklaf.ui.menu.DarkPopupMenuBorder +PopupMenu.translucentBackground = %backgroundContainer +PopupMenu.borderColor = %border \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties new file mode 100644 index 00000000..578bd910 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties @@ -0,0 +1,39 @@ +# +# 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. +# +ProgressBarUI = com.github.weisj.darklaf.ui.progressbar.DarkProgressBarUI +ProgressBar.border = com.github.weisj.darklaf.ui.progressbar.DarkProgressBarBorder +ProgressBar.foreground = %textForeground + +ProgressBar.trackColor = %controlBackground +ProgressBar.progressColor = %controlFillSecondary +ProgressBar.indeterminateStartColor = %controlFadeStart +ProgressBar.indeterminateEndColor = %controlFadeEnd + +ProgressBar.failedColor = %controlErrorFadeStart +ProgressBar.failedEndColor = %controlErrorFadeEnd +ProgressBar.passedColor = %controlPassedFadeStart +ProgressBar.passedEndColor = %controlPassedFadeEnd + +ProgressBar.isSimplified = false +ProgressBar.stripeWidth = 4 \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/radioButton.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/radioButton.properties new file mode 100644 index 00000000..e5d7f1fb --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/radioButton.properties @@ -0,0 +1,45 @@ +# +# 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. +# +RadioButtonUI = com.github.weisj.darklaf.ui.radiobutton.DarkRadioButtonUI +RadioButton.border = com.github.weisj.darklaf.ui.radiobutton.DarkRadioButtonBorder +RadioButton.selectionSelectedColor = %controlFill +RadioButton.selectionDisabledColor = %controlFillDisabled +RadioButton.selectionFocusSelectedColor = %controlFillFocus + +RadioButton.focusBorderColor = %controlBorderFocus +RadioButton.focusSelectedBorderColor = %controlBorderFocusSelected +RadioButton.inactiveFillColor = %widgetFillInactive +RadioButton.activeFillColor = %widgetFill +RadioButton.selectedFillColor = %widgetFillSelected +RadioButton.selectedBorderColor = %controlBorderSelected +RadioButton.activeBorderColor = %controlBorder +RadioButton.inactiveBorderColor = %controlBorderDisabled + +#Icons +RadioButton.unchecked.icon = control/radio.svg[patch](19,19) +RadioButton.uncheckedDisabled.icon = control/radioDisabled.svg[patch](19,19) +RadioButton.uncheckedFocused.icon = control/radioFocused.svg[patch](19,19) +RadioButton.selected.icon = control/radioSelected.svg[patch](19,19) +RadioButton.selectedDisabled.icon = control/radioSelectedDisabled.svg[patch](19,19) +RadioButton.selectedFocused.icon = control/radioSelectedFocused.svg[patch](19,19) \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/rootPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/rootPane.properties new file mode 100644 index 00000000..b4837797 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/rootPane.properties @@ -0,0 +1,29 @@ +# +# 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. +# +RootPaneUI = com.github.weisj.darklaf.ui.rootpane.DarkRootPaneUI +RootPane.background = %backgroundContainer + +RootPane.frameBorder = null +RootPane.informationDialogBorder = null +RootPane.plainDialogBorder = null \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollBar.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollBar.properties new file mode 100644 index 00000000..cb8a7a7d --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollBar.properties @@ -0,0 +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. +# +ScrollBarUI = com.github.weisj.darklaf.ui.scrollpane.DarkScrollBarUI +ScrollBar.fadeStartColor = %controlFadeStart +ScrollBar.fadeEndColor = %controlFadeEnd +ScrollBar.trackColor = %controlTrack +ScrollBar.thumbBorderColor = %controlBorderSecondary +ScrollBar.thumb = %controlFillSecondary +ScrollBar.thumbShadow = null +ScrollBar.thumbHighlight = null diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollPane.properties new file mode 100644 index 00000000..9756c7f2 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/scrollPane.properties @@ -0,0 +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. +# +ScrollPaneUI = com.github.weisj.darklaf.ui.scrollpane.DarkScrollPaneUI +ScrollPane.barInsets = 0,0,0,0 +ScrollPane.border = null diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/separator.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/separator.properties new file mode 100644 index 00000000..8baf87ff --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/separator.properties @@ -0,0 +1,27 @@ +# +# 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. +# +SeparatorUI = com.github.weisj.darklaf.ui.separator.DarkSeparatorUI +PopupMenuSeparatorUI = com.github.weisj.darklaf.ui.menu.DarkPopupMenuSeparatorUI +Separator.foreground = %border +Separator.background = %background diff --git a/src/main/resources/com/weis/darklaf/properties/ui/slider.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/slider.properties similarity index 60% rename from src/main/resources/com/weis/darklaf/properties/ui/slider.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/slider.properties index 3c001ed7..65fe9d0f 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/slider.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/slider.properties @@ -1,27 +1,27 @@ -#MIT License # -#Copyright (c) 2019 Jannis Weis +# MIT License # -#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: +# Copyright (c) 2019 Jannis Weis # -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# 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 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. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # -# suppress inspection "UnusedProperty" for whole file -SliderUI = com.weis.darklaf.ui.slider.DarkSliderUI +# 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. +# +SliderUI = com.github.weisj.darklaf.ui.slider.DarkSliderUI Slider.font = Dialog-0-10 Slider.tickColor = %textForegroundSecondary Slider.disabledTickColor = %textForegroundInactive diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/spinner.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/spinner.properties new file mode 100644 index 00000000..6a75b25c --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/spinner.properties @@ -0,0 +1,47 @@ +# +# 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. +# +SpinnerUI = com.github.weisj.darklaf.ui.spinner.DarkSpinnerUI +Spinner.border = com.github.weisj.darklaf.ui.spinner.DarkSpinnerBorder +Spinner.activeBorderColor = %widgetBorder +Spinner.inactiveBorderColor = %widgetBorderInactive +Spinner.focusBorderColor = %glowFocusLine +Spinner.inactiveBackground = %widgetFillInactive +Spinner.arrowBackgroundStart = %background +Spinner.arrowBackgroundEnd = %background +Spinner.activeBackground = %textBackground +Spinner.arrowButtonInsets = 2,2,2,2 +Spinner.editorBorderPainted = false +Spinner.arrowButtonSize = 16,5 +Spinner.arrowButtonBorder = null +Spinner.arc = %arc +Spinner.borderThickness = %borderThickness + +Spinner.plus.icon = misc/plus.svg[aware] +Spinner.plusInactive.icon = misc/plus.svg[aware] +Spinner.minus.icon = misc/minus.svg[aware] +Spinner.minusInactive.icon = misc/minus.svg[aware] +Spinner.arrowUp.icon = navigation/arrowUp.svg[aware] +Spinner.arrowUpInactive.icon = navigation/arrowUp.svg[dual] +Spinner.arrowDown.icon = navigation/arrowDown.svg[aware] +Spinner.arrowDownInactive.icon = navigation/arrowDown.svg[dual] \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties new file mode 100644 index 00000000..9204d33c --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties @@ -0,0 +1,38 @@ +# +# 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. +# +SplitPaneUI = com.github.weisj.darklaf.ui.splitpane.DarkSplitPaneUI +SplitPane.border = com.github.weisj.darklaf.ui.splitpane.DarkSplitPaneBorder +SplitPaneDivider.border = com.github.weisj.darklaf.ui.splitpane.DarkSplitPaneDividerBorder +SplitPane.highlight = %backgroundContainer +SplitPane.dividerLineColor = %border +SplitPane.dividerFocusColor = null +SplitPane.centerOneTouchButtons = true + +#Icons +SplitPane.horizontalGlue.icon = navigation/horizontalGlue.svg[aware](4,13) +SplitPane.verticalGlue.icon = navigation/verticalGlue.svg[aware](13,4) +SplitPaneDivider.leftOneTouch.icon = navigation/arrowLeft.svg[aware] +SplitPaneDivider.rightOneTouch.icon = navigation/arrowRight.svg[aware] +SplitPaneDivider.topOneTouch.icon = navigation/arrowUp.svg[aware](13,13) +SplitPaneDivider.bottomOneTouch.icon = navigation/arrowDown.svg[aware](13,13) diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/statusBar.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/statusBar.properties new file mode 100644 index 00000000..3ad65137 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/statusBar.properties @@ -0,0 +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. +# +StatusBarUI = com.github.weisj.darklaf.ui.statusbar.DarkStatusBarUI +StatusBar.topColor = %border +StatusBar.background = %background \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/tabFrame.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/tabFrame.properties similarity index 85% rename from src/main/resources/com/weis/darklaf/properties/ui/tabFrame.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/tabFrame.properties index 403ec928..d1088c78 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/tabFrame.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/tabFrame.properties @@ -21,10 +21,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -# suppress inspection "UnusedProperty" for whole file -TabFramePanelPopupUI = com.weis.darklaf.ui.tabframe.DarkPanelPopupUI -TabFrameTabbedPopupUI = com.weis.darklaf.ui.tabframe.DarkTabbedPopupUI -TabFramePopup.headerBorder = com.weis.darklaf.ui.tabframe.DarkTabFramePopupHeaderBorder +TabFramePanelPopupUI = com.github.weisj.darklaf.ui.tabframe.DarkPanelPopupUI +TabFrameTabbedPopupUI = com.github.weisj.darklaf.ui.tabframe.DarkTabbedPopupUI +TabFramePopup.headerBorder = com.github.weisj.darklaf.ui.tabframe.DarkTabFramePopupHeaderBorder TabFramePopup.headerBackground = %background TabFramePopup.headerFocusBackground = %backgroundColorful @@ -46,16 +45,16 @@ TabFramePopup.minimumHeaderSize = null TabFramePopup.borderColor = %borderSecondary -TabFrameTabLabelUI = com.weis.darklaf.ui.tabframe.DarkTabFrameTabLabelUI -TabFrameTabContainerUI = com.weis.darklaf.ui.tabframe.DarkTabFrameTabContainerUI -TabFrameTab.border = com.weis.darklaf.ui.tabframe.DarkTabFrameTabBorder +TabFrameTabLabelUI = com.github.weisj.darklaf.ui.tabframe.DarkTabFrameTabLabelUI +TabFrameTabContainerUI = com.github.weisj.darklaf.ui.tabframe.DarkTabFrameTabContainerUI +TabFrameTab.border = com.github.weisj.darklaf.ui.tabframe.DarkTabFrameTabBorder TabFrameTab.font = Dialog-0-11 TabFrameTab.foreground = %textForeground TabFrameTab.selectedForeground = %textForegroundHighlight TabFrameTab.selectedBackground = %backgroundSelectedSecondary TabFrameTab.hoverBackground = %backgroundHoverSecondary -TabFrameUI = com.weis.darklaf.ui.tabframe.DarkTabFrameUI +TabFrameUI = com.github.weisj.darklaf.ui.tabframe.DarkTabFrameUI TabFrame.line = %borderSecondary TabFrame.tabHeight = 24 TabFrame.acceleratorKeyCode = alt pressed diff --git a/src/main/resources/com/weis/darklaf/properties/ui/tabbedPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/tabbedPane.properties similarity index 51% rename from src/main/resources/com/weis/darklaf/properties/ui/tabbedPane.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/tabbedPane.properties index b2366a75..0e97d215 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/tabbedPane.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/tabbedPane.properties @@ -1,27 +1,27 @@ -#MIT License # -#Copyright (c) 2019 Jannis Weis +# MIT License # -#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: +# Copyright (c) 2019 Jannis Weis # -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# 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 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. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # -# suppress inspection "UnusedProperty" for whole file -TabbedPaneUI = com.weis.darklaf.ui.tabbedpane.DarkTabbedPaneUI +# 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. +# +TabbedPaneUI = com.github.weisj.darklaf.ui.tabbedpane.DarkTabbedPaneUI TabbedPane.tabInsets = 5,7,5,7 TabbedPane.tabRunOverlay = 0 diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/table.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/table.properties new file mode 100644 index 00000000..d960b65b --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/table.properties @@ -0,0 +1,62 @@ +# +# 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. +# +TableHeaderUI = com.github.weisj.darklaf.ui.table.DarkTableHeaderUI +TableHeader.cellBorder = com.github.weisj.darklaf.ui.table.DarkTableCellBorder +TableHeader.focusCellBorder = com.github.weisj.darklaf.ui.table.DarkTableCellBorder +TableHeader.border = com.github.weisj.darklaf.ui.table.DarkTableHeaderBorder +TableHeader.background = %backgroundHeader +TableHeader.focusCellBackground = %backgroundHeader +TableHeader.borderColor = %borderSecondary +TableHeader.height = 26 + +TableUI = com.github.weisj.darklaf.ui.table.DarkTableUI +Table.scrollPaneCornerComponent = com.github.weisj.darklaf.ui.table.DarkTableHeaderCorner +Table.cellNoFocusBorder = com.github.weisj.darklaf.ui.table.DarkTableCellBorder +Table.focusCellHighlightBorder = com.github.weisj.darklaf.ui.table.DarkTableCellFocusBorder +Table.focusSelectedCellHighlightBorder = com.github.weisj.darklaf.ui.table.DarkTableCellFocusBorder +Table.cellEditorBorder = com.github.weisj.darklaf.ui.table.DarkTableCellBorder +Table.scrollPaneBorder = com.github.weisj.darklaf.ui.table.DarkTableBorder +Table.background = %backgroundContainer +Table.focusBorderColor = %borderFocus +Table.focusRowBorderColor = %borderFocus +Table.gridColor = %gridLine +Table.dropLineColor = %dropForeground +Table.dropLineShortColor = %dropForeground +Table.focusSelectionBackground = %highlightFillFocus +Table.focusCellBackground = %backgroundContainer +Table.focusCellForeground = %textForeground +Table.selectionNoFocusBackground = %highlightFill +Table.selectionBackground = %highlightFillFocus +Table.selectionForegroundInactive = %textSelectionForegroundInactive + +Table.alternateRowColor = false +Table.alternateRowBackground = %backgroundAlternative + +Table.renderBooleanAsCheckBox = true +Table.booleanRenderType = checkBox +Table.rowHeight = 22 + +#Icons +Table.ascendingSortIcon = menu/up.svg[aware](8,16) +Table.descendingSortIcon = menu/down.svg[aware](8,16) diff --git a/src/main/resources/com/weis/darklaf/properties/ui/taskPane.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/taskPane.properties similarity index 85% rename from src/main/resources/com/weis/darklaf/properties/ui/taskPane.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/taskPane.properties index 54458715..6a775664 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/taskPane.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/taskPane.properties @@ -1,3 +1,4 @@ +# # MIT License # # Copyright (c) 2019 Jannis Weis @@ -20,9 +21,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # -# suppress inspection "UnusedProperty" for whole file -swingx/TaskPaneUI = com.weis.darklaf.ui.taskpane.DarkTaskPaneUI -swingx/TaskPaneContainerUI = com.weis.darklaf.ui.taskpane.DarkTaskPaneContainerUI +swingx/TaskPaneUI = com.github.weisj.darklaf.ui.taskpane.DarkTaskPaneUI +swingx/TaskPaneContainerUI = com.github.weisj.darklaf.ui.taskpane.DarkTaskPaneContainerUI TaskPane.background = %widgetFill TaskPane.foreground = %textForeground TaskPane.titleForeground = %textForeground diff --git a/src/main/resources/com/weis/darklaf/properties/ui/text.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/text.properties similarity index 60% rename from src/main/resources/com/weis/darklaf/properties/ui/text.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/text.properties index 8019e408..d844693b 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/text.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/text.properties @@ -1,36 +1,36 @@ -#MIT License # -#Copyright (c) 2019 Jannis Weis +# MIT License # -#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: +# Copyright (c) 2019 Jannis Weis # -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# 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 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. +# 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. # -# suppress inspection "UnusedProperty" for whole file TextComponent.roundedSelection = true -EditorPaneUI = com.weis.darklaf.ui.text.DarkEditorPaneUI -TextPaneUI = com.weis.darklaf.ui.text.DarkTextPaneUI -TextAreaUI = com.weis.darklaf.ui.text.DarkTextAreaUI +EditorPaneUI = com.github.weisj.darklaf.ui.text.DarkEditorPaneUI +TextPaneUI = com.github.weisj.darklaf.ui.text.DarkTextPaneUI +TextAreaUI = com.github.weisj.darklaf.ui.text.DarkTextAreaUI EditorPane.inactiveBackground = %textBackgroundInactive EditorPane.inactiveForeground = %textForegroundInactive -TextFieldUI = com.weis.darklaf.ui.text.DarkTextFieldUI -TextField.border = com.weis.darklaf.ui.text.DarkTextBorder +TextFieldUI = com.github.weisj.darklaf.ui.text.DarkTextFieldUI +TextField.border = com.github.weisj.darklaf.ui.text.DarkTextBorder TextField.border.enabled = %widgetBorder TextField.border.disabled = %widgetBorderInactive TextField.border.focusError = %glowFocusErrorLine @@ -66,20 +66,20 @@ TextArea.background = %textBackground TextArea.disabledBackground = %textBackgroundInactive -FormattedTextFieldUI = com.weis.darklaf.ui.text.DarkFormattedTextFieldUI -FormattedTextField.border = com.weis.darklaf.ui.text.DarkTextBorder +FormattedTextFieldUI = com.github.weisj.darklaf.ui.text.DarkFormattedTextFieldUI +FormattedTextField.border = com.github.weisj.darklaf.ui.text.DarkTextBorder FormattedTextField.background = %textBackground FormattedTextField.disabledBackground = %textBackgroundInactive FormattedTextField.selectionBackground = %textSelectionBackground FormattedTextField.selectionForeground = %textSelectionForeground -PasswordFieldUI = com.weis.darklaf.ui.text.DarkPasswordFieldUI +PasswordFieldUI = com.github.weisj.darklaf.ui.text.DarkPasswordFieldUI PasswordField.background = %textBackground PasswordField.disabledBackground = %textBackgroundInactive PasswordField.selectionBackground = %textSelectionBackground PasswordField.selectionForeground = %textSelectionForeground -PasswordField.border = com.weis.darklaf.ui.text.DarkTextBorder +PasswordField.border = com.github.weisj.darklaf.ui.text.DarkTextBorder PasswordField.arc = %arcSecondary PasswordField.borderThickness = %borderThickness diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties new file mode 100644 index 00000000..ec1e9f03 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties @@ -0,0 +1,37 @@ +# +# 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. +# +ToggleButtonUI = com.github.weisj.darklaf.ui.button.DarkToggleButtonUI +ToggleButton.border = com.github.weisj.darklaf.ui.button.DarkButtonBorder +ToggleButton.sliderBorderColor = %widgetBorder +ToggleButton.disabledSliderBorderColor = %widgetBorderInactive +ToggleButton.focusedSliderBorderColor = %glowFocusLine +ToggleButton.sliderKnobFillColor = %controlFill +ToggleButton.sliderKnobBorderColor = %controlBorder +ToggleButton.disabledSliderKnobFillColor = %controlFillDisabled +ToggleButton.disabledSliderKnobBorderColor = %controlFillDisabled + +ToggleButton.inactiveFillColor = %widgetFill +ToggleButton.activeFillColor = %backgroundHoverSecondary + +ToggleButton.sliderSize = 35,17 \ No newline at end of file diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/toolBar.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/toolBar.properties new file mode 100644 index 00000000..eceba9dc --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/toolBar.properties @@ -0,0 +1,36 @@ +# +# 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. +# +ToolBarUI = com.github.weisj.darklaf.ui.toolbar.DarkToolBarUI +ToolBar.border = com.github.weisj.darklaf.ui.toolbar.DarkToolBarBorder +ToolBar.rolloverBorder = com.github.weisj.darklaf.ui.toolbar.DarkToolBarBorder +ToolBar.nonrolloverBorder = com.github.weisj.darklaf.ui.toolbar.DarkToolBarBorder +ToolBar.dropColor = %dropBackground +ToolBar.dockingForeground = %textForeground +ToolBar.floatingBackground = %background +ToolBar.floatingForeground = %textForeground +ToolBar.borderColor = %border + +#Icons +ToolBar.horizontalGrip.icon = navigation/horizontalGrip.svg[aware](5,20) +ToolBar.verticalGrip.icon = navigation/verticalGrip.svg[aware](20,5) diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/toolTip.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/toolTip.properties new file mode 100644 index 00000000..b49ca459 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/toolTip.properties @@ -0,0 +1,28 @@ +# +# 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. +# +ToolTipUI = com.github.weisj.darklaf.ui.tooltip.DarkTooltipUI +ToolTip.background = %backgroundToolTip +ToolTip.borderColor = %borderTertiary +ToolTip.border = com.github.weisj.darklaf.ui.tooltip.DarkDefaultToolTipBorder +ToolTip.borderShadowColor = %shadow \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/tree.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/tree.properties similarity index 61% rename from src/main/resources/com/weis/darklaf/properties/ui/tree.properties rename to src/main/resources/com/github/weisj/darklaf/properties/ui/tree.properties index c77a6bd4..aabc2150 100644 --- a/src/main/resources/com/weis/darklaf/properties/ui/tree.properties +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/tree.properties @@ -1,28 +1,28 @@ -#MIT License # -#Copyright (c) 2019 Jannis Weis +# MIT License # -#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: +# Copyright (c) 2019 Jannis Weis # -#The above copyright notice and this permission notice shall be included in all -#copies or substantial portions of the Software. +# 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 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. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # -# suppress inspection "UnusedProperty" for whole file -TreeUI = com.weis.darklaf.ui.tree.DarkTreeUI -Tree.editorBorder = com.weis.darklaf.ui.tree.DarkTreeCellBorder +# 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. +# +TreeUI = com.github.weisj.darklaf.ui.tree.DarkTreeUI +Tree.editorBorder = com.github.weisj.darklaf.ui.tree.DarkTreeCellBorder Tree.editorBorderColor = %widgetBorder Tree.rendererFillBackground = false Tree.background = %backgroundContainer diff --git a/src/main/resources/com/github/weisj/darklaf/properties/ui/tristate.properties b/src/main/resources/com/github/weisj/darklaf/properties/ui/tristate.properties new file mode 100644 index 00000000..54b62171 --- /dev/null +++ b/src/main/resources/com/github/weisj/darklaf/properties/ui/tristate.properties @@ -0,0 +1,24 @@ +# +# 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. +# +TristateCheckBoxUI = com.github.weisj.darklaf.ui.tristate.DarkTristateCheckBoxUI \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/theme/darcula/darcula_defaults.properties b/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/darcula/darcula_defaults.properties rename to src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_defaults.properties diff --git a/src/main/resources/com/weis/darklaf/theme/darcula/darcula_styleSheet.css b/src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_styleSheet.css similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/darcula/darcula_styleSheet.css rename to src/main/resources/com/github/weisj/darklaf/theme/darcula/darcula_styleSheet.css diff --git a/src/main/resources/com/weis/darklaf/theme/intellij/intellij_defaults.properties b/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/intellij/intellij_defaults.properties rename to src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_defaults.properties diff --git a/src/main/resources/com/weis/darklaf/theme/intellij/intellij_mac.properties b/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_mac.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/intellij/intellij_mac.properties rename to src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_mac.properties diff --git a/src/main/resources/com/weis/darklaf/theme/intellij/intellij_styleSheet.css b/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_styleSheet.css similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/intellij/intellij_styleSheet.css rename to src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_styleSheet.css diff --git a/src/main/resources/com/weis/darklaf/theme/intellij/intellij_ui.properties b/src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/intellij/intellij_ui.properties rename to src/main/resources/com/github/weisj/darklaf/theme/intellij/intellij_ui.properties diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_defaults.properties b/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_defaults.properties rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_defaults.properties diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css b/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_styleSheet.css diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_ui.properties b/src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_ui.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_dark/solarized_dark_ui.properties rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_dark/solarized_dark_ui.properties diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_defaults.properties b/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_defaults.properties rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_defaults.properties diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_styleSheet.css b/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_styleSheet.css similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_styleSheet.css rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_styleSheet.css diff --git a/src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_ui.properties b/src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_ui.properties similarity index 100% rename from src/main/resources/com/weis/darklaf/theme/solarized_light/solarized_light_ui.properties rename to src/main/resources/com/github/weisj/darklaf/theme/solarized_light/solarized_light_ui.properties diff --git a/src/main/resources/com/weis/darklaf/log/logging.properties b/src/main/resources/com/weis/darklaf/log/logging.properties deleted file mode 100644 index 706e9a22..00000000 --- a/src/main/resources/com/weis/darklaf/log/logging.properties +++ /dev/null @@ -1,7 +0,0 @@ -handlers = java.util.logging.ConsoleHandler -.level = ALL - -java.util.logging.ConsoleHandler.level = INFO -java.util.logging.ConsoleHandler.formatter = com.weis.darklaf.log.LogFormatter - -com.weis.darklaf.level = INFO \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/borders.properties b/src/main/resources/com/weis/darklaf/properties/ui/borders.properties deleted file mode 100644 index 073fe747..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/borders.properties +++ /dev/null @@ -1,26 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -TitledBorder.titleColor = %textForeground -TitledBorder.border = com.weis.darklaf.ui.titledborder.DarkTitledBorder -TitledBorder.borderColor = %border \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/button.properties b/src/main/resources/com/weis/darklaf/properties/ui/button.properties deleted file mode 100644 index e8ce775a..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/button.properties +++ /dev/null @@ -1,50 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ButtonUI = com.weis.darklaf.ui.button.DarkButtonUI -Button.border = com.weis.darklaf.ui.button.DarkButtonBorder -Button.disabledText = %textForegroundInactive -Button.shadow = %shadow -Button.selectedButtonForeground = %textForegroundDefault -Button.activeBorderColor = %widgetBorder -Button.inactiveBorderColor = %widgetBorderInactive -Button.defaultBorderColor = %widgetBorderDefault -Button.focusBorderColor = %glowFocusLine -Button.inactiveFillColor = %widgetFillInactive -Button.defaultFillColor = %widgetFillDefault -Button.defaultFillColorRollOver = %hoverHighlightDefault -Button.defaultFillColorClick = %clickHighlightDefault -Button.activeFillColor = %widgetFill -Button.activeFillColorRollOver = %hoverHighlight -Button.activeFillColorClick = %clickHighlight - -Button.arc = %arc -Button.squareArc = %arcSecondary -Button.focusArc = %arcFocus -Button.squareFocusArc = %arcSecondaryFocus -Button.minimumArc = %arcSecondary -Button.borderThickness = %borderThickness -Button.shadowHeight = %shadowHeight - -Button.shadow.hover = %hoverHighlight -Button.shadow.click = %clickHighlight \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/colorChooser.properties b/src/main/resources/com/weis/darklaf/properties/ui/colorChooser.properties deleted file mode 100644 index 7b9db99c..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/colorChooser.properties +++ /dev/null @@ -1,43 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ColorChooserUI = com.weis.darklaf.ui.colorchooser.DarkColorChooserUI -ColorChooser.pipetteEnabled = true -ColorChooser.previewBorderColor = %widgetBorder -ColorChooser.sliderBorderColor = %widgetBorder -ColorChooser.sliderKnobColor = 993300 -ColorChooser.showPreviewPanelText = false -ColorChooser.colorWheelDropBackgroundColor = %dropBackground -ColorChooser.colorWheelDropBorderColor = %dropForeground -ColorChooser.pipetteBorderColor = %widgetBorder -ColorChooser.swatchesRecentSwatchSize = 15,15 -ColorChooser.swatchesSwatchSize = 15,15 -ColorChooser.swatchBorderColor = %borderSecondary -ColorChooser.swatchGridColor = %gridLine -ColorChooser.sliderShadow = %shadow -ColorChooser.errorDelay = 600 -ColorChooser.swatchesDefaultRecentColor = %background -ColorChooser.colorWheelBackground = %background -#Icons -ColorChooser.pipette.icon = misc/pipette.svg[aware] -ColorChooser.pipetteRollover.icon = misc/pipette_rollover.svg[aware] diff --git a/src/main/resources/com/weis/darklaf/properties/ui/comboBox.properties b/src/main/resources/com/weis/darklaf/properties/ui/comboBox.properties deleted file mode 100644 index 5902b9d2..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/comboBox.properties +++ /dev/null @@ -1,43 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ComboBoxUI = com.weis.darklaf.ui.combobox.DarkComboBoxUI -ComboBox.squareButton = false -ComboBox.background = %backgroundContainer -ComboBox.activeBorderColor = %widgetBorder -ComboBox.inactiveBorderColor = %widgetBorderInactive -ComboBox.focusBorderColor = %glowFocusLine -ComboBox.inactiveBackground = %widgetFillInactive -ComboBox.activeBackground = %backgroundContainer -ComboBox.arrowBackgroundStart = %background -ComboBox.arrowBackgroundEnd = %background -ComboBox.editBackground = %background -ComboBox.disabledForeground = %textForegroundInactive -ComboBox.disabledBackground = %widgetFillInactive -ComboBox.selectionBackground = %highlightFillFocus -ComboBox.arc = %arc -ComboBox.borderThickness = %borderThickness - -#Icons -ComboBox.arrow.icon = navigation/arrowDown.svg[aware] -ComboBox.arrowInactive.icon = navigation/arrowDown.svg[dual] \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/fileChooser.properties b/src/main/resources/com/weis/darklaf/properties/ui/fileChooser.properties deleted file mode 100644 index b270c25b..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/fileChooser.properties +++ /dev/null @@ -1,51 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -FileChooserUI = com.weis.darklaf.ui.filechooser.DarkFileChooserUI -FileChooser.newFolderIcon = files/newFolder.svg[aware] -FileChooser.upFolderIcon = files/upFolder.svg[aware] -FileChooser.homeFolderIcon = files/homeFolder.svg[aware] -FileChooser.listViewBorder = com.weis.darklaf.ui.filechooser.DarkFileChooserListViewBorder - -FileChooser.detailsViewIcon = menu/listFiles.svg[aware] -FileChooser.listViewIcon = menu/groupBy.svg[aware] - -FileChooser.borderColor = %borderSecondary -FileChooser.rowHeight = 20 -FileChooser.minEditDelay = 200 -FileChooser.maxEditDelay = 600 -FileChooser.listViewWindowsStyle = false -FileChooser.fileSizeKiloBytes = {0} kb -FileChooser.fileSizeMegaBytes = {0} mb -FileChooser.fileSizeGigaBytes = {0} gb -FileChooser.readOnly = false - -FileView.background = %textBackground -FileView.foreground = %textForeground -FileView.fullRowSelection = true - -FileView.fileIcon = files/general.svg[aware] -FileView.directoryIcon = files/folder.svg[aware] -FileView.computerIcon = files/desktop.svg[aware] -FileView.floppyDriveIcon = menu/save.svg[aware] -FileView.hardDriveIcon = files/drive.svg[aware] \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/internalFrame.properties b/src/main/resources/com/weis/darklaf/properties/ui/internalFrame.properties deleted file mode 100644 index 1ca38b23..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/internalFrame.properties +++ /dev/null @@ -1,58 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -InternalFrameUI = com.weis.darklaf.ui.internalframe.DarkInternalFrameUI -InternalFrame.border = com.weis.darklaf.ui.internalframe.DarkInternalFrameBorder -InternalFrame.optionDialogBorder = com.weis.darklaf.ui.internalframe.DarkInternalFrameBorder -InternalFrame.paletteBorder = com.weis.darklaf.ui.internalframe.DarkInternalFrameBorder -InternalFrame.borderShadowColor = %shadow -InternalFrame.activeTitleBackground = %backgroundColorful -InternalFrame.background = %background - -InternalFrameTitlePane.selectedTextForeground = %textForeground -InternalFrameTitlePane.borderColor = %border -InternalFrameTitlePane.backgroundColor = %background -InternalFrameTitlePane.selectedBackgroundColor = %backgroundColorful -InternalFrameTitlePane.selectedButtonColor = %backgroundColorful -InternalFrameTitlePane.selectedButtonHoverColor = %hoverHighlightColorful -InternalFrameTitlePane.selectedButtonClickColor = %clickHighlightColorful -InternalFrameTitlePane.buttonColor = %background -InternalFrameTitlePane.buttonHoverColor = %hoverHighlight -InternalFrameTitlePane.buttonClickColor = %clickHighlight - - -DesktopIconUI = com.weis.darklaf.ui.internalframe.DarkDesktopIconUI -DesktopIcon.border = com.weis.darklaf.ui.internalframe.DarkDesktopIconBorder -DesktopIcon.background = %background -DesktopIcon.borderColor = %borderTertiary -DesktopIcon.hoverColor = %backgroundHoverSecondary -DesktopIcon.clickColor = %backgroundHoverSecondary -desktop = %backgroundColorful - -#Icons -InternalFrame.icon = duke.svg -InternalFrameTitlePane.close.icon = window/closeActive.svg[aware] -InternalFrameTitlePane.minimize.icon = window/restore.svg[aware] -InternalFrameTitlePane.maximize.icon = window/maximize.svg[aware] -InternalFrameTitlePane.iconify.icon = window/minimize.svg[aware] -DesktopIcon.drag.icon = navigation/horizontalGrip.svg[aware](5,20) \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/label.properties b/src/main/resources/com/weis/darklaf/properties/ui/label.properties deleted file mode 100644 index acb758f1..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/label.properties +++ /dev/null @@ -1,24 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -LabelUI = com.weis.darklaf.ui.label.DarkLabelUI \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/list.properties b/src/main/resources/com/weis/darklaf/properties/ui/list.properties deleted file mode 100644 index 9518e1a8..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/list.properties +++ /dev/null @@ -1,34 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ListUI = com.weis.darklaf.ui.list.DarkListUI -List.border = null -List.background = %backgroundContainer -List.focusSelectedCellHighlightBorder = com.weis.darklaf.ui.list.DarkListCellFocusBorder -List.focusCellHighlightBorder = com.weis.darklaf.ui.list.DarkListCellBorder -List.cellNoFocusBorder = com.weis.darklaf.ui.list.DarkListCellBorder -List.dropLineColor = %dropForeground -List.selectionBackground = %highlightFillFocus -List.focusBorderColor = %borderFocus -List.alternateRowBackground = %backgroundAlternative -List.selectionForegroundInactive = %textSelectionForegroundInactive diff --git a/src/main/resources/com/weis/darklaf/properties/ui/menu.properties b/src/main/resources/com/weis/darklaf/properties/ui/menu.properties deleted file mode 100644 index f868d0f5..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/menu.properties +++ /dev/null @@ -1,35 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -MenuUI = com.weis.darklaf.ui.menu.DarkMenuUI -Menu.maxGutterIconWidth = 18 -Menu.border = com.weis.darklaf.ui.menu.DarkMenuItemBorder -Menu.selectionBackground = %highlightFillFocus -Menu.acceleratorForeground = %acceleratorForeground -Menu.acceleratorSelectionForeground = %acceleratorForeground -Menu.submenuPopupOffsetX = -4 -Menu.submenuPopupOffsetY = -2 -Menu.background = %background - -#Icons -Menu.arrowIcon = navigation/arrowRight.svg[aware] \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/menuBar.properties b/src/main/resources/com/weis/darklaf/properties/ui/menuBar.properties deleted file mode 100644 index 76d8afe1..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/menuBar.properties +++ /dev/null @@ -1,29 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -MenuBarUI = com.weis.darklaf.ui.menu.DarkMenuBarUI -MenuBar.disabledBackground = %background -MenuBar.border = com.weis.darklaf.ui.menu.DarkMenuBarBorder -MenuBar.borderColor = %border -MenuBar.highlight = %background -MenuBar.background = %background \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/menuItem.properties b/src/main/resources/com/weis/darklaf/properties/ui/menuItem.properties deleted file mode 100644 index 8a00e7a5..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/menuItem.properties +++ /dev/null @@ -1,51 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -MenuItemUI = com.weis.darklaf.ui.menu.DarkMenuItemUIBase -MenuItem.border = com.weis.darklaf.ui.menu.DarkMenuItemBorder - -MenuItem.selectionBackground = %highlightFillFocus -MenuItem.maxGutterIconWidth = 18 -MenuItem.acceleratorDelimiter = - -MenuItem.acceleratorForeground = %acceleratorForeground -MenuItem.acceleratorSelectionForeground = %acceleratorForeground - -RadioButtonMenuItemUI = com.weis.darklaf.ui.radiobutton.DarkRadioButtonMenuItemUI -RadioButtonMenuItem.borderPainted = false -RadioButtonMenuItem.acceleratorForeground = %acceleratorForeground -RadioButtonMenuItem.acceleratorSelectionForeground = %acceleratorForeground -RadioButtonMenuItem.selectionBackground = %highlightFillFocus - -CheckBoxMenuItemUI = com.weis.darklaf.ui.checkbox.DarkCheckBoxMenuItemUI -CheckBoxMenuItem.borderPainted = false -CheckBoxMenuItem.acceleratorForeground = %acceleratorForeground -CheckBoxMenuItem.acceleratorSelectionForeground = %acceleratorForeground -CheckBoxMenuItem.selectionBackground = %highlightFillFocus -CheckBoxMenuItem.foreground = %textForeground - -#Icons -MenuItem.arrowIcon = navigation/arrowRight.svg[aware] -MenuItem.arrowHover.icon = navigation/arrowRightHover.svg[aware] -RadioButtonMenuItem.arrowIcon = empty(16,16) -CheckBoxMenuItem.checkIcon = empty(19,19) -RadioButtonMenuItem.checkIcon = empty(19,19) \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/optionPane.properties b/src/main/resources/com/weis/darklaf/properties/ui/optionPane.properties deleted file mode 100644 index fdf45747..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/optionPane.properties +++ /dev/null @@ -1,35 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -OptionPaneUI = com.weis.darklaf.ui.optionpane.DarkOptionPaneUI -OptionPane.messageForeground = %textForeground -OptionPane.buttonPadding = 5 -#SwingConstants.CENTER -OptionPane.buttonOrientation = 0 -OptionPane.sameSizeButtons = false - -#Icons -OptionPane.informationIcon = dialog/informationDialog.svg[aware](32,32) -OptionPane.questionIcon = dialog/questionDialog.svg[aware](32,32) -OptionPane.warningIcon = dialog/warningDialog.svg[aware](32,32) -OptionPane.errorIcon = dialog/errorDialog.svg[aware](32,32) diff --git a/src/main/resources/com/weis/darklaf/properties/ui/panel.properties b/src/main/resources/com/weis/darklaf/properties/ui/panel.properties deleted file mode 100644 index 4c12464a..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/panel.properties +++ /dev/null @@ -1,26 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -PanelUI = com.weis.darklaf.ui.panel.DarkPanelUI -Panel.foreground = %textForeground -Panel.background = %background diff --git a/src/main/resources/com/weis/darklaf/properties/ui/popupMenu.properties b/src/main/resources/com/weis/darklaf/properties/ui/popupMenu.properties deleted file mode 100644 index 7dffa22d..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/popupMenu.properties +++ /dev/null @@ -1,27 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -PopupMenuUI = com.weis.darklaf.ui.menu.DarkPopupMenuUI -PopupMenu.border = com.weis.darklaf.ui.menu.DarkPopupMenuBorder -PopupMenu.translucentBackground = %backgroundContainer -PopupMenu.borderColor = %border \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/progressBar.properties b/src/main/resources/com/weis/darklaf/properties/ui/progressBar.properties deleted file mode 100644 index e34883cc..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/progressBar.properties +++ /dev/null @@ -1,39 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ProgressBarUI = com.weis.darklaf.ui.progressbar.DarkProgressBarUI -ProgressBar.border = com.weis.darklaf.ui.progressbar.DarkProgressBarBorder -ProgressBar.foreground = %textForeground - -ProgressBar.trackColor = %controlBackground -ProgressBar.progressColor = %controlFillSecondary -ProgressBar.indeterminateStartColor = %controlFadeStart -ProgressBar.indeterminateEndColor = %controlFadeEnd - -ProgressBar.failedColor = %controlErrorFadeStart -ProgressBar.failedEndColor = %controlErrorFadeEnd -ProgressBar.passedColor = %controlPassedFadeStart -ProgressBar.passedEndColor = %controlPassedFadeEnd - -ProgressBar.isSimplified = false -ProgressBar.stripeWidth = 4 \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/radioButton.properties b/src/main/resources/com/weis/darklaf/properties/ui/radioButton.properties deleted file mode 100644 index dea1496b..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/radioButton.properties +++ /dev/null @@ -1,45 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -RadioButtonUI = com.weis.darklaf.ui.radiobutton.DarkRadioButtonUI -RadioButton.border = com.weis.darklaf.ui.radiobutton.DarkRadioButtonBorder -RadioButton.selectionSelectedColor = %controlFill -RadioButton.selectionDisabledColor = %controlFillDisabled -RadioButton.selectionFocusSelectedColor = %controlFillFocus - -RadioButton.focusBorderColor = %controlBorderFocus -RadioButton.focusSelectedBorderColor = %controlBorderFocusSelected -RadioButton.inactiveFillColor = %widgetFillInactive -RadioButton.activeFillColor = %widgetFill -RadioButton.selectedFillColor = %widgetFillSelected -RadioButton.selectedBorderColor = %controlBorderSelected -RadioButton.activeBorderColor = %controlBorder -RadioButton.inactiveBorderColor = %controlBorderDisabled - -#Icons -RadioButton.unchecked.icon = control/radio.svg[patch](19,19) -RadioButton.uncheckedDisabled.icon = control/radioDisabled.svg[patch](19,19) -RadioButton.uncheckedFocused.icon = control/radioFocused.svg[patch](19,19) -RadioButton.selected.icon = control/radioSelected.svg[patch](19,19) -RadioButton.selectedDisabled.icon = control/radioSelectedDisabled.svg[patch](19,19) -RadioButton.selectedFocused.icon = control/radioSelectedFocused.svg[patch](19,19) \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/rootPane.properties b/src/main/resources/com/weis/darklaf/properties/ui/rootPane.properties deleted file mode 100644 index cafea8d0..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/rootPane.properties +++ /dev/null @@ -1,29 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -RootPaneUI = com.weis.darklaf.ui.rootpane.DarkRootPaneUI -RootPane.background = %backgroundContainer - -RootPane.frameBorder = null -RootPane.informationDialogBorder = null -RootPane.plainDialogBorder = null \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/scrollBar.properties b/src/main/resources/com/weis/darklaf/properties/ui/scrollBar.properties deleted file mode 100644 index 75fe5b79..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/scrollBar.properties +++ /dev/null @@ -1,31 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ScrollBarUI = com.weis.darklaf.ui.scrollpane.DarkScrollBarUI -ScrollBar.fadeStartColor = %controlFadeStart -ScrollBar.fadeEndColor = %controlFadeEnd -ScrollBar.trackColor = %controlTrack -ScrollBar.thumbBorderColor = %controlBorderSecondary -ScrollBar.thumb = %controlFillSecondary -ScrollBar.thumbShadow = null -ScrollBar.thumbHighlight = null diff --git a/src/main/resources/com/weis/darklaf/properties/ui/scrollPane.properties b/src/main/resources/com/weis/darklaf/properties/ui/scrollPane.properties deleted file mode 100644 index 4d0d60e6..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/scrollPane.properties +++ /dev/null @@ -1,26 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ScrollPaneUI = com.weis.darklaf.ui.scrollpane.DarkScrollPaneUI -ScrollPane.barInsets = 0,0,0,0 -ScrollPane.border = null diff --git a/src/main/resources/com/weis/darklaf/properties/ui/separator.properties b/src/main/resources/com/weis/darklaf/properties/ui/separator.properties deleted file mode 100644 index afb2e6d9..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/separator.properties +++ /dev/null @@ -1,27 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -SeparatorUI = com.weis.darklaf.ui.separator.DarkSeparatorUI -PopupMenuSeparatorUI = com.weis.darklaf.ui.menu.DarkPopupMenuSeparatorUI -Separator.foreground = %border -Separator.background = %background diff --git a/src/main/resources/com/weis/darklaf/properties/ui/spinner.properties b/src/main/resources/com/weis/darklaf/properties/ui/spinner.properties deleted file mode 100644 index b633956e..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/spinner.properties +++ /dev/null @@ -1,47 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -SpinnerUI = com.weis.darklaf.ui.spinner.DarkSpinnerUI -Spinner.border = com.weis.darklaf.ui.spinner.DarkSpinnerBorder -Spinner.activeBorderColor = %widgetBorder -Spinner.inactiveBorderColor = %widgetBorderInactive -Spinner.focusBorderColor = %glowFocusLine -Spinner.inactiveBackground = %widgetFillInactive -Spinner.arrowBackgroundStart = %background -Spinner.arrowBackgroundEnd = %background -Spinner.activeBackground = %textBackground -Spinner.arrowButtonInsets = 2,2,2,2 -Spinner.editorBorderPainted = false -Spinner.arrowButtonSize = 16,5 -Spinner.arrowButtonBorder = null -Spinner.arc = %arc -Spinner.borderThickness = %borderThickness - -Spinner.plus.icon = misc/plus.svg[aware] -Spinner.plusInactive.icon = misc/plus.svg[aware] -Spinner.minus.icon = misc/minus.svg[aware] -Spinner.minusInactive.icon = misc/minus.svg[aware] -Spinner.arrowUp.icon = navigation/arrowUp.svg[aware] -Spinner.arrowUpInactive.icon = navigation/arrowUp.svg[dual] -Spinner.arrowDown.icon = navigation/arrowDown.svg[aware] -Spinner.arrowDownInactive.icon = navigation/arrowDown.svg[dual] \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/splitPane.properties b/src/main/resources/com/weis/darklaf/properties/ui/splitPane.properties deleted file mode 100644 index be0275c4..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/splitPane.properties +++ /dev/null @@ -1,38 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -SplitPaneUI = com.weis.darklaf.ui.splitpane.DarkSplitPaneUI -SplitPane.border = com.weis.darklaf.ui.splitpane.DarkSplitPaneBorder -SplitPaneDivider.border = com.weis.darklaf.ui.splitpane.DarkSplitPaneDividerBorder -SplitPane.highlight = %backgroundContainer -SplitPane.dividerLineColor = %border -SplitPane.dividerFocusColor = null -SplitPane.centerOneTouchButtons = true - -#Icons -SplitPane.horizontalGlue.icon = navigation/horizontalGlue.svg[aware](4,13) -SplitPane.verticalGlue.icon = navigation/verticalGlue.svg[aware](13,4) -SplitPaneDivider.leftOneTouch.icon = navigation/arrowLeft.svg[aware] -SplitPaneDivider.rightOneTouch.icon = navigation/arrowRight.svg[aware] -SplitPaneDivider.topOneTouch.icon = navigation/arrowUp.svg[aware](13,13) -SplitPaneDivider.bottomOneTouch.icon = navigation/arrowDown.svg[aware](13,13) diff --git a/src/main/resources/com/weis/darklaf/properties/ui/statusBar.properties b/src/main/resources/com/weis/darklaf/properties/ui/statusBar.properties deleted file mode 100644 index 1571c82a..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/statusBar.properties +++ /dev/null @@ -1,26 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -StatusBarUI = com.weis.darklaf.ui.statusbar.DarkStatusBarUI -StatusBar.topColor = %border -StatusBar.background = %background \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/table.properties b/src/main/resources/com/weis/darklaf/properties/ui/table.properties deleted file mode 100644 index 7f87a712..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/table.properties +++ /dev/null @@ -1,62 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -TableHeaderUI = com.weis.darklaf.ui.table.DarkTableHeaderUI -TableHeader.cellBorder = com.weis.darklaf.ui.table.DarkTableCellBorder -TableHeader.focusCellBorder = com.weis.darklaf.ui.table.DarkTableCellBorder -TableHeader.border = com.weis.darklaf.ui.table.DarkTableHeaderBorder -TableHeader.background = %backgroundHeader -TableHeader.focusCellBackground = %backgroundHeader -TableHeader.borderColor = %borderSecondary -TableHeader.height = 26 - -TableUI = com.weis.darklaf.ui.table.DarkTableUI -Table.scrollPaneCornerComponent = com.weis.darklaf.ui.table.DarkTableHeaderCorner -Table.cellNoFocusBorder = com.weis.darklaf.ui.table.DarkTableCellBorder -Table.focusCellHighlightBorder = com.weis.darklaf.ui.table.DarkTableCellFocusBorder -Table.focusSelectedCellHighlightBorder = com.weis.darklaf.ui.table.DarkTableCellFocusBorder -Table.cellEditorBorder = com.weis.darklaf.ui.table.DarkTableCellBorder -Table.scrollPaneBorder = com.weis.darklaf.ui.table.DarkTableBorder -Table.background = %backgroundContainer -Table.focusBorderColor = %borderFocus -Table.focusRowBorderColor = %borderFocus -Table.gridColor = %gridLine -Table.dropLineColor = %dropForeground -Table.dropLineShortColor = %dropForeground -Table.focusSelectionBackground = %highlightFillFocus -Table.focusCellBackground = %backgroundContainer -Table.focusCellForeground = %textForeground -Table.selectionNoFocusBackground = %highlightFill -Table.selectionBackground = %highlightFillFocus -Table.selectionForegroundInactive = %textSelectionForegroundInactive - -Table.alternateRowColor = false -Table.alternateRowBackground = %backgroundAlternative - -Table.renderBooleanAsCheckBox = true -Table.booleanRenderType = checkBox -Table.rowHeight = 22 - -#Icons -Table.ascendingSortIcon = menu/up.svg[aware](8,16) -Table.descendingSortIcon = menu/down.svg[aware](8,16) diff --git a/src/main/resources/com/weis/darklaf/properties/ui/toggleButton.properties b/src/main/resources/com/weis/darklaf/properties/ui/toggleButton.properties deleted file mode 100644 index ca7643b1..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/toggleButton.properties +++ /dev/null @@ -1,37 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ToggleButtonUI = com.weis.darklaf.ui.button.DarkToggleButtonUI -ToggleButton.border = com.weis.darklaf.ui.button.DarkButtonBorder -ToggleButton.sliderBorderColor = %widgetBorder -ToggleButton.disabledSliderBorderColor = %widgetBorderInactive -ToggleButton.focusedSliderBorderColor = %glowFocusLine -ToggleButton.sliderKnobFillColor = %controlFill -ToggleButton.sliderKnobBorderColor = %controlBorder -ToggleButton.disabledSliderKnobFillColor = %controlFillDisabled -ToggleButton.disabledSliderKnobBorderColor = %controlFillDisabled - -ToggleButton.inactiveFillColor = %widgetFill -ToggleButton.activeFillColor = %backgroundHoverSecondary - -ToggleButton.sliderSize = 35,17 \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/toolBar.properties b/src/main/resources/com/weis/darklaf/properties/ui/toolBar.properties deleted file mode 100644 index 2fe1941f..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/toolBar.properties +++ /dev/null @@ -1,36 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ToolBarUI = com.weis.darklaf.ui.toolbar.DarkToolBarUI -ToolBar.border = com.weis.darklaf.ui.toolbar.DarkToolBarBorder -ToolBar.rolloverBorder = com.weis.darklaf.ui.toolbar.DarkToolBarBorder -ToolBar.nonrolloverBorder = com.weis.darklaf.ui.toolbar.DarkToolBarBorder -ToolBar.dropColor = %dropBackground -ToolBar.dockingForeground = %textForeground -ToolBar.floatingBackground = %background -ToolBar.floatingForeground = %textForeground -ToolBar.borderColor = %border - -#Icons -ToolBar.horizontalGrip.icon = navigation/horizontalGrip.svg[aware](5,20) -ToolBar.verticalGrip.icon = navigation/verticalGrip.svg[aware](20,5) diff --git a/src/main/resources/com/weis/darklaf/properties/ui/toolTip.properties b/src/main/resources/com/weis/darklaf/properties/ui/toolTip.properties deleted file mode 100644 index 4292c7eb..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/toolTip.properties +++ /dev/null @@ -1,28 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -ToolTipUI = com.weis.darklaf.ui.tooltip.DarkTooltipUI -ToolTip.background = %backgroundToolTip -ToolTip.borderColor = %borderTertiary -ToolTip.border = com.weis.darklaf.ui.tooltip.DarkDefaultToolTipBorder -ToolTip.borderShadowColor = %shadow \ No newline at end of file diff --git a/src/main/resources/com/weis/darklaf/properties/ui/tristate.properties b/src/main/resources/com/weis/darklaf/properties/ui/tristate.properties deleted file mode 100644 index 39d12125..00000000 --- a/src/main/resources/com/weis/darklaf/properties/ui/tristate.properties +++ /dev/null @@ -1,24 +0,0 @@ -#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. -# -# suppress inspection "UnusedProperty" for whole file -TristateCheckBoxUI = com.weis.darklaf.ui.tristate.DarkTristateCheckBoxUI \ No newline at end of file diff --git a/src/main/resources/library/x64/jniplatform.dll b/src/main/resources/library/x64/jniplatform.dll index 78a2fff8..ee793773 100644 Binary files a/src/main/resources/library/x64/jniplatform.dll and b/src/main/resources/library/x64/jniplatform.dll differ diff --git a/src/main/resources/library/x86/jniplatform.dll b/src/main/resources/library/x86/jniplatform.dll index 3f7f047c..df9ddebf 100644 Binary files a/src/main/resources/library/x86/jniplatform.dll and b/src/main/resources/library/x86/jniplatform.dll differ diff --git a/src/test/java/ColorChooserDemo.java b/src/test/java/ColorChooserDemo.java index 80fbe94a..4c8d9000 100644 --- a/src/test/java/ColorChooserDemo.java +++ b/src/test/java/ColorChooserDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/ComboDemo.java b/src/test/java/ComboDemo.java index f1fcbc9e..8658bfa0 100644 --- a/src/test/java/ComboDemo.java +++ b/src/test/java/ComboDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/DarklafDemo.java b/src/test/java/DarklafDemo.java index 5b58e734..83a033a8 100644 --- a/src/test/java/DarklafDemo.java +++ b/src/test/java/DarklafDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; diff --git a/src/test/java/DnDTest.java b/src/test/java/DnDTest.java index 962887ad..1bb137d1 100644 --- a/src/test/java/DnDTest.java +++ b/src/test/java/DnDTest.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.icons.IconLoader; +import com.github.weisj.darklaf.icons.IconLoader; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/FileChooserDemo.java b/src/test/java/FileChooserDemo.java index 12dac4e7..c4d11e48 100644 --- a/src/test/java/FileChooserDemo.java +++ b/src/test/java/FileChooserDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import javax.swing.filechooser.FileFilter; diff --git a/src/test/java/GenerateColors.java b/src/test/java/GenerateColors.java index 3e6a266a..cd20611c 100644 --- a/src/test/java/GenerateColors.java +++ b/src/test/java/GenerateColors.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.color.DarkColorModelHSL; +import com.github.weisj.darklaf.color.DarkColorModelHSL; import java.awt.*; diff --git a/src/test/java/InternalFrameDemo.java b/src/test/java/InternalFrameDemo.java index b7d2bab9..cc0113eb 100644 --- a/src/test/java/InternalFrameDemo.java +++ b/src/test/java/InternalFrameDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/test/java/ListDemo.java b/src/test/java/ListDemo.java index ce5cc3d6..7f5259ee 100644 --- a/src/test/java/ListDemo.java +++ b/src/test/java/ListDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; diff --git a/src/test/java/SVGTest.java b/src/test/java/SVGTest.java index 16ba500c..42b47c43 100644 --- a/src/test/java/SVGTest.java +++ b/src/test/java/SVGTest.java @@ -1,3 +1,4 @@ +import com.github.weisj.darklaf.LafManager; import com.kitfox.svg.Defs; import com.kitfox.svg.LinearGradient; import com.kitfox.svg.SVGDiagram; @@ -5,7 +6,6 @@ import com.kitfox.svg.SVGElementException; import com.kitfox.svg.SVGUniverse; import com.kitfox.svg.animation.AnimationElement; import com.kitfox.svg.app.beans.SVGPanel; -import com.weis.darklaf.LafManager; import org.jetbrains.annotations.NotNull; import javax.swing.*; @@ -25,7 +25,7 @@ public class SVGTest { svgPanel.setAntiAlias(true); svgPanel.setScaleToFit(true); svgPanel.setSvgURI(SVGTest.class.getClassLoader() - .getResource("com/weis/darklaf/icons/control/checkBox.svg") + .getResource("com/github/weisj/darklaf/icons/control/checkBox.svg") .toURI()); SVGUniverse svgUniverse = svgPanel.getSvgUniverse(); SVGDiagram diagram = svgUniverse.getDiagram(svgPanel.getSvgURI()); diff --git a/src/test/java/ScrollPaneDemo.java b/src/test/java/ScrollPaneDemo.java index a066fcfe..78255321 100644 --- a/src/test/java/ScrollPaneDemo.java +++ b/src/test/java/ScrollPaneDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import org.jdesktop.swingx.MultiSplitLayout; import javax.swing.*; diff --git a/src/test/java/SplitPaneDemo.java b/src/test/java/SplitPaneDemo.java index 2211ef07..f894743d 100644 --- a/src/test/java/SplitPaneDemo.java +++ b/src/test/java/SplitPaneDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/TabFrameDemo.java b/src/test/java/TabFrameDemo.java index 1670021f..96a4eba0 100644 --- a/src/test/java/TabFrameDemo.java +++ b/src/test/java/TabFrameDemo.java @@ -1,10 +1,10 @@ -import com.weis.darklaf.LafManager; -import com.weis.darklaf.components.OverlayScrollPane; -import com.weis.darklaf.components.SelectableTreeNode; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tabframe.JTabFrame; -import com.weis.darklaf.components.tabframe.TabbedPopup; -import com.weis.darklaf.icons.IconLoader; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.components.OverlayScrollPane; +import com.github.weisj.darklaf.components.SelectableTreeNode; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tabframe.JTabFrame; +import com.github.weisj.darklaf.components.tabframe.TabbedPopup; +import com.github.weisj.darklaf.icons.IconLoader; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/test/java/TabbedPaneDemo.java b/src/test/java/TabbedPaneDemo.java index 5b18cc76..9cac6526 100644 --- a/src/test/java/TabbedPaneDemo.java +++ b/src/test/java/TabbedPaneDemo.java @@ -1,5 +1,5 @@ -import com.weis.darklaf.LafManager; -import com.weis.darklaf.components.ClosableTabbedPane; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.components.ClosableTabbedPane; import javax.swing.*; import javax.swing.border.EmptyBorder; diff --git a/src/test/java/TabbedPaneKeyboardShortcut.java b/src/test/java/TabbedPaneKeyboardShortcut.java index 34205de8..edc2cf68 100644 --- a/src/test/java/TabbedPaneKeyboardShortcut.java +++ b/src/test/java/TabbedPaneKeyboardShortcut.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/TextDemo.java b/src/test/java/TextDemo.java index f5f9ef23..359cb6d5 100644 --- a/src/test/java/TextDemo.java +++ b/src/test/java/TextDemo.java @@ -1,4 +1,4 @@ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; diff --git a/src/test/java/ToolBarDemo.java b/src/test/java/ToolBarDemo.java index 3581b472..0af59e9f 100644 --- a/src/test/java/ToolBarDemo.java +++ b/src/test/java/ToolBarDemo.java @@ -36,7 +36,7 @@ * images/Up24.gif */ -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import org.jetbrains.annotations.NotNull; import javax.swing.*; diff --git a/src/test/java/ToolTipDemo.java b/src/test/java/ToolTipDemo.java index 02c37a97..8b4e3e57 100644 --- a/src/test/java/ToolTipDemo.java +++ b/src/test/java/ToolTipDemo.java @@ -1,6 +1,6 @@ -import com.weis.darklaf.LafManager; -import com.weis.darklaf.components.alignment.Alignment; -import com.weis.darklaf.components.tooltip.ToolTipContext; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.components.alignment.Alignment; +import com.github.weisj.darklaf.components.tooltip.ToolTipContext; import javax.swing.*; import java.awt.*; diff --git a/src/test/java/TreeDemo.java b/src/test/java/TreeDemo.java index 07e29f40..20a05846 100644 --- a/src/test/java/TreeDemo.java +++ b/src/test/java/TreeDemo.java @@ -1,5 +1,5 @@ -import com.weis.darklaf.LafManager; -import com.weis.darklaf.components.SelectableTreeNode; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.components.SelectableTreeNode; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/test/java/UIDemo.java b/src/test/java/UIDemo.java index 9f1db0a8..518dbfaf 100644 --- a/src/test/java/UIDemo.java +++ b/src/test/java/UIDemo.java @@ -1,8 +1,8 @@ -import com.weis.darklaf.LafManager; -import com.weis.darklaf.components.text.SearchTextField; -import com.weis.darklaf.components.text.SearchTextFieldWithHistory; -import com.weis.darklaf.components.tristate.TristateCheckBox; -import com.weis.darklaf.icons.IconLoader; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.components.text.SearchTextField; +import com.github.weisj.darklaf.components.text.SearchTextFieldWithHistory; +import com.github.weisj.darklaf.components.tristate.TristateCheckBox; +import com.github.weisj.darklaf.icons.IconLoader; import org.jdesktop.swingx.JXStatusBar; import org.jdesktop.swingx.JXTaskPane; import org.jdesktop.swingx.JXTaskPaneContainer; diff --git a/src/test/java/UIManagerDefaults.java b/src/test/java/UIManagerDefaults.java index 07d0202a..61430624 100644 --- a/src/test/java/UIManagerDefaults.java +++ b/src/test/java/UIManagerDefaults.java @@ -3,10 +3,10 @@ * to create a table of key/value pairs for each Swing component. */ -import com.weis.darklaf.DarkLafInfo; -import com.weis.darklaf.LafManager; -import com.weis.darklaf.ui.cell.DarkCellRendererToggleButton; -import com.weis.darklaf.ui.table.DarkColorTableCellRendererEditor; +import com.github.weisj.darklaf.DarkLafInfo; +import com.github.weisj.darklaf.LafManager; +import com.github.weisj.darklaf.ui.cell.DarkCellRendererToggleButton; +import com.github.weisj.darklaf.ui.table.DarkColorTableCellRendererEditor; import org.jdesktop.swingx.JXTaskPane; import org.jdesktop.swingx.JXTaskPaneContainer; import org.jetbrains.annotations.Contract; diff --git a/src/test/java/dialog/DialogDemo.java b/src/test/java/dialog/DialogDemo.java index f850e93d..f952870b 100644 --- a/src/test/java/dialog/DialogDemo.java +++ b/src/test/java/dialog/DialogDemo.java @@ -24,7 +24,7 @@ package dialog; -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import javax.swing.border.Border; diff --git a/src/test/java/formattedTextField/FormattedTextFieldDemo.java b/src/test/java/formattedTextField/FormattedTextFieldDemo.java index 9abfcc71..7e82dc2a 100644 --- a/src/test/java/formattedTextField/FormattedTextFieldDemo.java +++ b/src/test/java/formattedTextField/FormattedTextFieldDemo.java @@ -24,7 +24,7 @@ package formattedTextField; -import com.weis.darklaf.LafManager; +import com.github.weisj.darklaf.LafManager; import javax.swing.*; import java.awt.*;