mirror of https://github.com/weisJ/darklaf.git
weisj
5 years ago
594 changed files with 5205 additions and 4417 deletions
@ -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 |
|
@ -0,0 +1,77 @@ |
|||||||
|
/* DO NOT EDIT THIS FILE - it is machine generated */ |
||||||
|
#include <jni.h> |
||||||
|
/* 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 |
@ -1,77 +0,0 @@ |
|||||||
/* DO NOT EDIT THIS FILE - it is machine generated */ |
|
||||||
#include <jni.h> |
|
||||||
/* 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 |
|
@ -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"; |
||||||
|
} |
||||||
|
} |
||||||
|
|
@ -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 javax.swing.*; |
||||||
import java.awt.*; |
import java.awt.*; |
@ -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; |
* MIT License |
||||||
|
* |
||||||
import com.weis.darklaf.ui.colorchooser.ColorListener; |
* Copyright (c) 2019 Jannis Weis |
||||||
import com.weis.darklaf.util.GraphicsUtil; |
* |
||||||
import com.weis.darklaf.util.TimerUtil; |
* 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 org.jetbrains.annotations.NotNull; |
||||||
|
|
||||||
import javax.swing.*; |
import javax.swing.*; |
@ -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; |
||||||
|
} |
||||||
|
} |
@ -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); |
||||||
|
} |
@ -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; |
||||||
|
} |
||||||
|
} |
@ -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.github.weisj.darklaf.components.alignment.Alignment; |
||||||
import com.weis.darklaf.util.GraphicsUtil; |
import com.github.weisj.darklaf.util.GraphicsUtil; |
||||||
import org.jetbrains.annotations.Contract; |
import org.jetbrains.annotations.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
||||||
|
|
@ -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.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
||||||
|
|
@ -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; |
import org.jetbrains.annotations.NotNull; |
||||||
|
|
@ -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 javax.swing.*; |
||||||
import java.awt.event.ItemEvent; |
import java.awt.event.ItemEvent; |
@ -1,6 +1,29 @@ |
|||||||
package com.weis.darklaf.components.tristate; |
/* |
||||||
|
* MIT License |
||||||
import com.weis.darklaf.DarkLaf; |
* |
||||||
|
* 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.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
||||||
|
|
@ -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(); |
||||||
|
} |
@ -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) { |
||||||
|
} |
||||||
|
} |
@ -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 { |
||||||
|
} |
@ -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.Defs; |
||||||
import com.kitfox.svg.LinearGradient; |
import com.kitfox.svg.LinearGradient; |
@ -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; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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(); |
||||||
|
} |
@ -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.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
@ -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.Native; |
||||||
import com.sun.jna.Pointer; |
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 org.jetbrains.annotations.Contract; |
||||||
|
|
||||||
import java.awt.*; |
import java.awt.*; |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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.github.weisj.darklaf.DarkLaf; |
||||||
import com.weis.darklaf.DarkMetalTheme; |
import com.github.weisj.darklaf.DarkMetalTheme; |
||||||
import com.weis.darklaf.util.PropertyLoader; |
import com.github.weisj.darklaf.util.PropertyLoader; |
||||||
import com.weis.darklaf.util.SystemInfo; |
import com.github.weisj.darklaf.util.SystemInfo; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
||||||
|
|
||||||
import javax.swing.*; |
import javax.swing.*; |
@ -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); |
||||||
|
} |
||||||
|
} |
@ -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; |
||||||
|
} |
||||||
|
} |
@ -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.github.weisj.darklaf.decorators.MouseClickListener; |
||||||
import com.weis.darklaf.ui.menu.DarkMenuItemUIBase; |
import com.github.weisj.darklaf.ui.menu.DarkMenuItemUIBase; |
||||||
import com.weis.darklaf.util.GraphicsContext; |
import com.github.weisj.darklaf.util.GraphicsContext; |
||||||
import com.weis.darklaf.util.GraphicsUtil; |
import com.github.weisj.darklaf.util.GraphicsUtil; |
||||||
import org.jetbrains.annotations.Contract; |
import org.jetbrains.annotations.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
||||||
import sun.swing.MenuItemLayoutHelper; |
import sun.swing.MenuItemLayoutHelper; |
@ -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.Contract; |
||||||
import org.jetbrains.annotations.NotNull; |
import org.jetbrains.annotations.NotNull; |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue