Skip to content

Commit f98997d

Browse files
committed
cleanup
1 parent ab8a289 commit f98997d

25 files changed

+482
-149
lines changed

LICENSE

Lines changed: 462 additions & 106 deletions
Large diffs are not rendered by default.

README.md

100644100755
File mode changed.

build.gradle.kts

100644100755
Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS_FULL // always sh
2626
gradle.startParameter.warningMode = WarningMode.All
2727

2828
plugins {
29-
id("com.dorkbox.GradleUtils") version "1.12"
30-
id("com.dorkbox.Licensing") version "2.5.4"
31-
id("com.dorkbox.VersionUpdate") version "2.1"
32-
id("com.dorkbox.GradlePublish") version "1.10"
29+
id("com.dorkbox.GradleUtils") version "3.10"
30+
id("com.dorkbox.Licensing") version "2.20"
31+
id("com.dorkbox.VersionUpdate") version "2.6"
32+
id("com.dorkbox.GradlePublish") version "1.17"
3333

34-
kotlin("jvm") version "1.4.21-2"
34+
kotlin("jvm") version "1.8.0"
3535
}
3636

3737
object Extras {
@@ -53,8 +53,7 @@ object Extras {
5353
///// assign 'Extras'
5454
///////////////////////////////
5555
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
56-
GradleUtils.fixIntellijPaths()
57-
GradleUtils.defaultResolutionStrategy()
56+
GradleUtils.defaults()
5857
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
5958

6059
licensing {
@@ -72,39 +71,20 @@ licensing {
7271

7372
sourceSets {
7473
main {
75-
java {
76-
setSrcDirs(listOf("src"))
77-
78-
// want to include java files for the source. 'setSrcDirs' resets includes...
79-
include("**/*.java")
80-
}
81-
8274
resources {
8375
setSrcDirs(listOf("resources"))
8476
include("*.png")
8577
}
8678
}
8779

8880
test {
89-
java {
90-
setSrcDirs(listOf("test"))
91-
92-
// want to include java files for the source. 'setSrcDirs' resets includes...
93-
include("**/*.java")
94-
}
95-
9681
resources {
9782
setSrcDirs(listOf("test"))
9883
include("*.png")
9984
}
10085
}
10186
}
10287

103-
repositories {
104-
mavenLocal() // this must be first!
105-
jcenter()
106-
}
107-
10888
///////////////////////////////
10989
////// Task defaults
11090
///////////////////////////////
@@ -120,16 +100,14 @@ tasks.jar.get().apply {
120100
attributes["Implementation-Title"] = "${Extras.group}.${Extras.id}"
121101
attributes["Implementation-Version"] = Extras.buildDate
122102
attributes["Implementation-Vendor"] = Extras.vendor
123-
124-
attributes["Automatic-Module-Name"] = Extras.id
125103
}
126104
}
127105

128106
dependencies {
129-
implementation("com.dorkbox:TweenEngine:8.3")
130-
implementation("com.dorkbox:SwingActiveRender:1.1")
131-
implementation("com.dorkbox:Utilities:1.9")
132-
implementation("com.dorkbox:PropertyLoader:1.0")
107+
implementation("com.dorkbox:TweenEngine:8.3.1")
108+
implementation("com.dorkbox:SwingActiveRender:1.2")
109+
implementation("com.dorkbox:Utilities:1.39")
110+
implementation("com.dorkbox:PropertyLoader:1.1")
133111
}
134112

135113
publishToSonatype {

notify-dark.png

100644100755
File mode changed.

notify-light.png

100644100755
File mode changed.

resources/dialog-confirm.png

100644100755
File mode changed.

resources/dialog-error.png

100644100755
File mode changed.

resources/dialog-information.png

100644100755
File mode changed.

resources/dialog-warning.png

100644100755
File mode changed.

settings.gradle.kts

100644100755
File mode changed.

src/dorkbox/notify/ActionHandler.java

100644100755
File mode changed.

src/dorkbox/notify/AsApplication.java

100644100755
File mode changed.

src/dorkbox/notify/AsDesktop.java

100644100755
File mode changed.

src/dorkbox/notify/ClickAdapter.java

100644100755
File mode changed.

src/dorkbox/notify/INotify.java

100644100755
File mode changed.

src/dorkbox/notify/LookAndFeel.java

100644100755
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@
3232
import dorkbox.tweenEngine.TweenEngine;
3333
import dorkbox.tweenEngine.TweenEquations;
3434
import dorkbox.util.ScreenUtil;
35+
import org.jetbrains.annotations.NotNull;
3536

3637
@SuppressWarnings({"FieldCanBeLocal"})
3738
class LookAndFeel {
3839
private static final Map<String, PopupList> popups = new HashMap<String, PopupList>();
3940

40-
static final TweenEngine animation = TweenEngine.create()
41+
static final TweenEngine animation = TweenEngine.Companion.create()
4142
.unsafe() // access is only from a single thread ever, so unsafe is preferred.
4243
.build();
4344

@@ -392,13 +393,12 @@ void addPopupToMap(final LookAndFeel sourceLook) {
392393
.target(NotifyCanvas.WIDTH)
393394
.ease(TweenEquations.Linear)
394395
.addCallback(new TweenCallback() {
395-
@Override
396-
public
397-
void onEvent(final int type, final BaseTween<?> source) {
398-
if (type == Events.COMPLETE) {
399-
sourceLook.notify.close();
400-
}
401-
}
396+
@Override
397+
public void onEvent(int type, BaseTween source) {
398+
if (type == Events.COMPLETE) {
399+
sourceLook.notify.close();
400+
}
401+
}
402402
})
403403
.start();
404404
}
@@ -456,14 +456,14 @@ boolean removePopupFromMap(final LookAndFeel sourceLook) {
456456
changedY = look.anchorY - (look.popupIndex * (NotifyCanvas.HEIGHT + SPACER) + offsetY);
457457
}
458458

459-
// now animate that popup to it's new location
459+
// now animate that popup to its new location
460460
look.tween = animation.to(look, NotifyAccessor.Y_POS, accessor, MOVE_DURATION)
461461
.target((float) changedY)
462462
.ease(TweenEquations.Linear)
463463
.addCallback(new TweenCallback() {
464464
@Override
465465
public
466-
void onEvent(final int type, final BaseTween<?> source) {
466+
void onEvent(final int type, final BaseTween source) {
467467
if (type == Events.COMPLETE) {
468468
// make sure to remove the tween once it's done, otherwise .kill can do weird things.
469469
look.tween = null;

src/dorkbox/notify/Notify.java

100644100755
File mode changed.

src/dorkbox/notify/NotifyAccessor.java

100644100755
File mode changed.

src/dorkbox/notify/NotifyCanvas.java

100644100755
File mode changed.

src/dorkbox/notify/PopupList.java

100644100755
File mode changed.

src/dorkbox/notify/Pos.java

100644100755
File mode changed.

src/dorkbox/notify/Theme.java

100644100755
File mode changed.

src/dorkbox/notify/WindowAdapter.java

100644100755
File mode changed.

test/NotifyTest.java

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class NotifyTest {
3737
void main(String[] args) {
3838
Notify notify;
3939

40-
4140
JFrame frame = new JFrame("Test");
4241

4342
JPanel panel = new JPanel();

test/notify-dark.png

100644100755
File mode changed.

0 commit comments

Comments
 (0)