Updated to newer version of utilties project. fixed several issues with the gradle build
This commit is contained in:
parent
4d42fcdcae
commit
7e468c87aa
353
LICENSE
353
LICENSE
@ -1,39 +1,318 @@
|
|||||||
- Dorkbox Notify - Apache 2.0 License
|
- Notify -
|
||||||
https://github.com/dorkbox
|
[The Apache Software License, Version 2.0]
|
||||||
Copyright 2015, dorkbox, llc
|
https://git.dorkbox.com/dorkbox/Notify
|
||||||
Linux, MacOS, or Windows (notification/growl/toast/) popups for the desktop for Java 6+
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
Linux, MacOS, or Windows (notification/growl/toast/) popups for the desktop for Java 8+
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- SwingActiveRender - Active Renderer for Swing
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/SwingActiveRender
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- PropertyLoader - Property annotation and loader for fields
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/PropertyLoader
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
- Utilities - Utilities for use within Java projects
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- MersenneTwisterFast -
|
||||||
|
[BSD 3-Clause License]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
Copyright 2003
|
||||||
|
Sean Luke
|
||||||
|
Michael Lecuyer (portions Copyright 1993
|
||||||
|
|
||||||
|
- FileUtil (code from FilenameUtils.java for normalize + dependencies) -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
http://commons.apache.org/proper/commons-io/
|
||||||
|
Copyright 2013
|
||||||
|
The Apache Software Foundation
|
||||||
|
Kevin A. Burton
|
||||||
|
Scott Sanders
|
||||||
|
Daniel Rall
|
||||||
|
Christoph.Reck
|
||||||
|
Peter Donald
|
||||||
|
Jeff Turner
|
||||||
|
Matthew Hawthorne
|
||||||
|
Martin Cooper
|
||||||
|
Jeremias Maerki
|
||||||
|
Stephen Colebourne
|
||||||
|
|
||||||
|
- FastThreadLocal -
|
||||||
|
[BSD 3-Clause License]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java
|
||||||
|
https://github.com/riven8192/LibStruct/blob/master/src/net/indiespot/struct/runtime/FastThreadLocal.java
|
||||||
|
Copyright 2014
|
||||||
|
Lightweight Java Game Library Project
|
||||||
|
Riven
|
||||||
|
|
||||||
|
- Base64Fast -
|
||||||
|
[BSD 3-Clause License]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
http://migbase64.sourceforge.net/
|
||||||
|
Copyright 2004
|
||||||
|
Mikael Grev, MiG InfoCom AB. (base64@miginfocom.com)
|
||||||
|
|
||||||
|
- BCrypt -
|
||||||
|
[BSD 2-Clause "Simplified" or "FreeBSD" license]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
http://www.mindrot.org/projects/jBCrypt
|
||||||
|
Copyright 2006
|
||||||
|
Damien Miller (djm@mindrot.org)
|
||||||
|
GWT modified version
|
||||||
|
|
||||||
|
- Bias, BinarySearch -
|
||||||
|
[MIT License]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/timboudreau/util
|
||||||
|
Copyright 2013
|
||||||
|
Tim Boudreau
|
||||||
|
|
||||||
|
- ConcurrentEntry -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
Copyright 2016
|
||||||
|
bennidi
|
||||||
|
dorkbox
|
||||||
|
|
||||||
|
- Collection Utilities (Array, ArrayMap, BooleanArray, ByteArray, CharArray, FloatArray, IdentityMap, IntArray, IntFloatMap, IntIntMap, IntMap, IntSet, LongArray, LongMap, ObjectFloatMap, ObjectIntMap, ObjectMap, ObjectSet, OrderedMap, OrderedSet) -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils
|
||||||
|
Copyright 2011
|
||||||
|
LibGDX
|
||||||
|
Mario Zechner (badlogicgames@gmail.com)
|
||||||
|
Nathan Sweet (nathan.sweet@gmail.com)
|
||||||
|
|
||||||
|
- Predicate -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils
|
||||||
|
Copyright 2011
|
||||||
|
LibGDX
|
||||||
|
Mario Zechner (badlogicgames@gmail.com)
|
||||||
|
Nathan Sweet (nathan.sweet@gmail.com)
|
||||||
|
xoppa
|
||||||
|
|
||||||
|
- Select, QuickSelect -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils
|
||||||
|
Copyright 2011
|
||||||
|
LibGDX
|
||||||
|
Mario Zechner (badlogicgames@gmail.com)
|
||||||
|
Nathan Sweet (nathan.sweet@gmail.com)
|
||||||
|
Jon Renner
|
||||||
|
|
||||||
|
- TimSort, ComparableTimSort -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/utils
|
||||||
|
Copyright 2008
|
||||||
|
The Android Open Source Project
|
||||||
|
|
||||||
|
- Modified hex conversion utility methods -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Utilities
|
||||||
|
https://netty.io
|
||||||
|
Copyright 2014
|
||||||
|
The Netty Project
|
||||||
|
|
||||||
|
- Retrofit - A type-safe HTTP client for Android and Java
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/square/retrofit
|
||||||
|
Copyright 2020
|
||||||
|
Square, Inc
|
||||||
|
|
||||||
|
- JNA - Simplified native library access for Java.
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/twall/jna
|
||||||
|
Copyright 2021
|
||||||
|
Timothy Wall
|
||||||
|
|
||||||
|
- JNA-Platform - Mappings for a number of commonly used platform functions
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/twall/jna
|
||||||
|
Copyright 2021
|
||||||
|
Timothy Wall
|
||||||
|
|
||||||
|
- Java Uuid Generator - A set of Java classes for working with UUIDs
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/cowtowncoder/java-uuid-generator
|
||||||
|
Copyright 2021
|
||||||
|
Tatu Saloranta (tatu.saloranta@iki.fi)
|
||||||
|
Contributors. See source release-notes/CREDITS
|
||||||
|
|
||||||
|
- Netty - An event-driven asynchronous network application framework
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://netty.io
|
||||||
|
Copyright 2021
|
||||||
|
The Netty Project
|
||||||
|
Contributors. See source NOTICE
|
||||||
|
|
||||||
|
- Bouncy Castle Crypto - Lightweight cryptography API and JCE Extension
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
http://www.bouncycastle.org
|
||||||
|
Copyright 2021
|
||||||
|
The Legion of the Bouncy Castle Inc
|
||||||
|
|
||||||
|
- Lightweight Java Game Library - Java library that enables cross-platform access to popular native APIs
|
||||||
|
[BSD 3-Clause License]
|
||||||
|
https://github.com/LWJGL/lwjgl3
|
||||||
|
Copyright 2021
|
||||||
|
Lightweight Java Game Library
|
||||||
|
|
||||||
|
- TypeTools - A simple, zero-dependency library for working with types. Supports Java 1.6+ and Android.
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/jhalterman/typetools
|
||||||
|
Copyright 2021
|
||||||
|
Jonathan Halterman and friends
|
||||||
|
|
||||||
|
- SLF4J - Simple facade or abstraction for various logging frameworks
|
||||||
|
[MIT License]
|
||||||
|
http://www.slf4j.org
|
||||||
|
Copyright 2021
|
||||||
|
QOS.ch
|
||||||
|
|
||||||
|
- XZ for Java - Complete implementation of XZ data compression in pure Java
|
||||||
|
[Public Domain, per Creative Commons CC0]
|
||||||
|
https://tukaani.org/xz/java.html
|
||||||
|
Copyright 2021
|
||||||
|
Lasse Collin
|
||||||
|
Igor Pavlov
|
||||||
|
|
||||||
|
- Executor - Shell, JVM, and SSH command execution on Linux, MacOS, or Windows for Java 8+
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/Executor
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- ZT Process Executor -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/zeroturnaround/zt-exec
|
||||||
|
Copyright 2014
|
||||||
|
ZeroTurnaround LLC
|
||||||
|
|
||||||
|
- Apache Commons Exec -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://commons.apache.org/proper/commons-exec/
|
||||||
|
Copyright 2014
|
||||||
|
The Apache Software Foundation
|
||||||
|
|
||||||
|
- Kotlin -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/JetBrains/kotlin
|
||||||
|
Copyright 2020
|
||||||
|
JetBrains s.r.o. and Kotlin Programming Language contributors
|
||||||
|
Kotlin Compiler, Test Data+Libraries, and Tools repository contain third-party code, to which different licenses may apply
|
||||||
|
See: https://github.com/JetBrains/kotlin/blob/master/license/README.md
|
||||||
|
|
||||||
|
- kotlinx.coroutines - Library support for Kotlin coroutines with multiplatform support
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/Kotlin/kotlinx.coroutines
|
||||||
|
Copyright 2021
|
||||||
|
JetBrains s.r.o.
|
||||||
|
|
||||||
|
- kotlin-logging - Lightweight logging framework for Kotlin
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/MicroUtils/kotlin-logging
|
||||||
|
Copyright 2021
|
||||||
|
Ohad Shai
|
||||||
|
|
||||||
|
- SLF4J - Simple facade or abstraction for various logging frameworks
|
||||||
|
[MIT License]
|
||||||
|
http://www.slf4j.org
|
||||||
|
Copyright 2021
|
||||||
|
QOS.ch
|
||||||
|
|
||||||
|
- SSHJ - SSHv2 library for Java
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://github.com/hierynomus/sshj
|
||||||
|
Copyright 2021
|
||||||
|
Jeroen van Erp
|
||||||
|
SSHJ Contributors
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- Apache MINA -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://mina.apache.org/sshd-project/
|
||||||
|
The Apache Software Foundation
|
||||||
|
|
||||||
|
- Apache Commons-Net -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://commons.apache.org/proper/commons-net/
|
||||||
|
The Apache Software Foundation
|
||||||
|
|
||||||
|
- JZlib -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
http://www.jcraft.com/jzlib
|
||||||
|
Atsuhiko Yamanaka
|
||||||
|
JCraft, Inc.
|
||||||
|
|
||||||
|
- Bouncy Castle Crypto -
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
http://www.bouncycastle.org
|
||||||
|
The Legion of the Bouncy Castle Inc
|
||||||
|
|
||||||
|
- ed25519-java -
|
||||||
|
[Public Domain, per Creative Commons CC0]
|
||||||
|
https://github.com/str4d/ed25519-java
|
||||||
|
https://github.com/str4d
|
||||||
|
|
||||||
|
- SwtJavaFx - Swt and JavaFx Utilities
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/SwtJavaFx
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
Extra license information
|
||||||
|
- Eclipse Platform - Frameworks and common services to support the use of Eclipse and it's tools (SWT)
|
||||||
|
[Eclipse Public License (EPL)]
|
||||||
|
https://projects.eclipse.org/projects/eclipse.platform
|
||||||
|
Copyright 2021
|
||||||
|
The Eclipse Foundation, Inc.
|
||||||
|
|
||||||
|
- OpenJFX - OpenJFX client application platform for desktop, mobile and embedded systems
|
||||||
|
[GNU General Public License, version 2, with the Classpath Exception]
|
||||||
|
https://github.com/openjdk/jfx
|
||||||
|
Copyright 2021
|
||||||
|
Oracle and/or its affiliates
|
||||||
|
|
||||||
|
- SLF4J - Simple facade or abstraction for various logging frameworks
|
||||||
|
[MIT License]
|
||||||
|
http://www.slf4j.org
|
||||||
|
Copyright 2021
|
||||||
|
QOS.ch
|
||||||
|
|
||||||
|
- PropertyLoader - Property annotation and loader for fields
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/PropertyLoader
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
- PropertyLoader - Property annotation and loader for fields
|
||||||
|
[The Apache Software License, Version 2.0]
|
||||||
|
https://git.dorkbox.com/dorkbox/PropertyLoader
|
||||||
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
|
|
||||||
- ControlsFX - BSD 3-clause License
|
- Dorkbox TweenEngine -
|
||||||
https://bitbucket.org/controlsfx/controlsfx/
|
[The Apache Software License, Version 2.0]
|
||||||
Copyright 2013, 2014, ControlsFX
|
https://git.dorkbox.com/dorkbox/TweenEngine
|
||||||
Dialog icons by the ControlsFX project
|
Copyright 2021
|
||||||
|
Dorkbox LLC
|
||||||
|
|
||||||
- Dorkbox ObjectPool - Apache 2.0 License
|
|
||||||
https://github.com/dorkbox
|
|
||||||
Copyright 2014, dorkbox, llc
|
|
||||||
Fast, lightweight, and compatible blocking/non-blocking/soft-reference object pool for Java 6+
|
|
||||||
|
|
||||||
|
|
||||||
- Dorkbox TweenEngine - Apache 2.0 License
|
|
||||||
https://github.com/dorkbox
|
|
||||||
Copyright 2015, dorkbox, llc
|
|
||||||
High performance and lightweight Animation/Tween framework for Java 6+
|
|
||||||
|
|
||||||
|
|
||||||
- Java Universal Tween Engine - Apache 2.0 License
|
|
||||||
https://code.google.com/p/java-universal-tween-engine/
|
|
||||||
Copyright 2012, Aurelien Ribon
|
|
||||||
Abandoned project, origin of TweenEngine code fork.
|
|
||||||
|
|
||||||
|
|
||||||
- Robert Penner's Easing Functions - BSD 3-clause License
|
|
||||||
http://robertpenner.com/easing/
|
|
||||||
Copyright 2001, Robert Penner
|
|
||||||
Tween easing algorithms
|
|
||||||
|
|
||||||
|
|
||||||
- SLF4J - MIT License
|
|
||||||
http://www.slf4j.org
|
|
||||||
Copyright 2004-2008, QOS.ch
|
|
||||||
|
224
build.gradle.kts
224
build.gradle.kts
@ -14,45 +14,29 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.Properties
|
|
||||||
import kotlin.collections.ArrayList
|
|
||||||
import kotlin.collections.component1
|
|
||||||
import kotlin.collections.component2
|
|
||||||
import kotlin.collections.set
|
|
||||||
import kotlin.reflect.KMutableProperty
|
|
||||||
import kotlin.reflect.full.declaredMemberProperties
|
|
||||||
|
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
////// PUBLISH TO SONATYPE / MAVEN CENTRAL
|
////// PUBLISH TO SONATYPE / MAVEN CENTRAL
|
||||||
//////
|
////// TESTING : (to local maven repo) <'publish and release' - 'publishToMavenLocal'>
|
||||||
////// TESTING : local maven repo <PUBLISHING - publishToMavenLocal>
|
////// RELEASE : (to sonatype/maven central), <'publish and release' - 'publishToSonatypeAndRelease'>
|
||||||
//////
|
|
||||||
////// RELEASE : sonatype / maven central, <PUBLISHING - publish> then <RELEASE - closeAndReleaseRepository>
|
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
|
|
||||||
println("\tGradle ${project.gradle.gradleVersion} on Java ${JavaVersion.current()}")
|
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS_FULL // always show the stacktrace!
|
||||||
|
gradle.startParameter.warningMode = WarningMode.All
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
id("com.dorkbox.GradleUtils") version "1.12"
|
||||||
signing
|
id("com.dorkbox.Licensing") version "2.5.4"
|
||||||
`maven-publish`
|
id("com.dorkbox.VersionUpdate") version "2.1"
|
||||||
|
id("com.dorkbox.GradlePublish") version "1.10"
|
||||||
|
|
||||||
// close and release on sonatype
|
kotlin("jvm") version "1.4.21-2"
|
||||||
id("io.codearte.nexus-staging") version "0.20.0"
|
|
||||||
|
|
||||||
id("com.dorkbox.CrossCompile") version "1.0.1"
|
|
||||||
id("com.dorkbox.Licensing") version "1.4"
|
|
||||||
id("com.dorkbox.VersionUpdate") version "1.4.1"
|
|
||||||
id("com.dorkbox.GradleUtils") version "1.0"
|
|
||||||
|
|
||||||
kotlin("jvm") version "1.3.11"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object Extras {
|
object Extras {
|
||||||
// set for the project
|
// set for the project
|
||||||
const val description = "Linux, MacOS, or Windows (notification/growl/toast/) popups for the desktop for Java 6+"
|
const val description = "Linux, MacOS, or Windows (notification/growl/toast/) popups for the desktop for Java 8+"
|
||||||
const val group = "com.dorkbox"
|
const val group = "com.dorkbox"
|
||||||
const val version = "3.7"
|
const val version = "3.7"
|
||||||
|
|
||||||
@ -60,45 +44,18 @@ object Extras {
|
|||||||
const val name = "Notify"
|
const val name = "Notify"
|
||||||
const val id = "Notify"
|
const val id = "Notify"
|
||||||
const val vendor = "Dorkbox LLC"
|
const val vendor = "Dorkbox LLC"
|
||||||
|
const val vendorUrl = "https://dorkbox.com"
|
||||||
const val url = "https://git.dorkbox.com/dorkbox/Notify"
|
const val url = "https://git.dorkbox.com/dorkbox/Notify"
|
||||||
val buildDate = Instant.now().toString()
|
val buildDate = Instant.now().toString()
|
||||||
|
|
||||||
val JAVA_VERSION = JavaVersion.VERSION_1_6.toString()
|
|
||||||
|
|
||||||
var sonatypeUserName = ""
|
|
||||||
var sonatypePassword = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
///// assign 'Extras'
|
///// assign 'Extras'
|
||||||
///////////////////////////////z
|
///////////////////////////////
|
||||||
description = Extras.description
|
GradleUtils.load("$projectDir/../../gradle.properties", Extras)
|
||||||
group = Extras.group
|
GradleUtils.fixIntellijPaths()
|
||||||
version = Extras.version
|
GradleUtils.defaultResolutionStrategy()
|
||||||
|
GradleUtils.compileConfiguration(JavaVersion.VERSION_1_8)
|
||||||
val propsFile = File("$projectDir/../../gradle.properties").normalize()
|
|
||||||
if (propsFile.canRead()) {
|
|
||||||
println("\tLoading custom property data from: [$propsFile]")
|
|
||||||
|
|
||||||
val props = Properties()
|
|
||||||
propsFile.inputStream().use {
|
|
||||||
props.load(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
val extraProperties = Extras::class.declaredMemberProperties.filterIsInstance<KMutableProperty<String>>()
|
|
||||||
props.forEach { (k, v) -> run {
|
|
||||||
val key = k as String
|
|
||||||
val value = v as String
|
|
||||||
|
|
||||||
val member = extraProperties.find { it.name == key }
|
|
||||||
if (member != null) {
|
|
||||||
member.setter.call(Extras::class.objectInstance, value)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
project.extra.set(k, v)
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
}
|
|
||||||
|
|
||||||
licensing {
|
licensing {
|
||||||
license(License.APACHE_2) {
|
license(License.APACHE_2) {
|
||||||
@ -107,11 +64,6 @@ licensing {
|
|||||||
note(Extras.description)
|
note(Extras.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
license("Dorkbox Utils", License.APACHE_2) {
|
|
||||||
author(Extras.vendor)
|
|
||||||
url("https://git.dorkbox.com/dorkbox/Utilities")
|
|
||||||
}
|
|
||||||
|
|
||||||
license("Dorkbox TweenEngine", License.APACHE_2) {
|
license("Dorkbox TweenEngine", License.APACHE_2) {
|
||||||
author(Extras.vendor)
|
author(Extras.vendor)
|
||||||
url("https://git.dorkbox.com/dorkbox/TweenEngine")
|
url("https://git.dorkbox.com/dorkbox/TweenEngine")
|
||||||
@ -126,6 +78,11 @@ sourceSets {
|
|||||||
// want to include java files for the source. 'setSrcDirs' resets includes...
|
// want to include java files for the source. 'setSrcDirs' resets includes...
|
||||||
include("**/*.java")
|
include("**/*.java")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
setSrcDirs(listOf("resources"))
|
||||||
|
include("*.png")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
@ -135,6 +92,11 @@ sourceSets {
|
|||||||
// want to include java files for the source. 'setSrcDirs' resets includes...
|
// want to include java files for the source. 'setSrcDirs' resets includes...
|
||||||
include("**/*.java")
|
include("**/*.java")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
setSrcDirs(listOf("test"))
|
||||||
|
include("*.png")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,17 +108,6 @@ repositories {
|
|||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
////// Task defaults
|
////// Task defaults
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
tasks.withType<JavaCompile> {
|
|
||||||
options.encoding = "UTF-8"
|
|
||||||
|
|
||||||
sourceCompatibility = Extras.JAVA_VERSION
|
|
||||||
targetCompatibility = Extras.JAVA_VERSION
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Jar> {
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.FAIL
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.jar.get().apply {
|
tasks.jar.get().apply {
|
||||||
manifest {
|
manifest {
|
||||||
// https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html
|
// https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html
|
||||||
@ -174,118 +125,33 @@ tasks.jar.get().apply {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.compileJava.get().apply {
|
|
||||||
println("\tCompiling classes to Java $sourceCompatibility")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.dorkbox:TweenEngine:8.3")
|
implementation("com.dorkbox:TweenEngine:8.3")
|
||||||
implementation("com.dorkbox:Utilities:1.1")
|
implementation("com.dorkbox:SwingActiveRender:1.1")
|
||||||
|
implementation("com.dorkbox:Utilities:1.9")
|
||||||
|
implementation("com.dorkbox:PropertyLoader:1.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////
|
publishToSonatype {
|
||||||
////// PUBLISH TO SONATYPE / MAVEN CENTRAL
|
groupId = Extras.group
|
||||||
//////
|
artifactId = Extras.id
|
||||||
////// TESTING : local maven repo <PUBLISHING - publishToMavenLocal>
|
version = Extras.version
|
||||||
//////
|
|
||||||
////// RELEASE : sonatype / maven central, <PUBLISHING - publish> then <RELEASE - closeAndReleaseRepository>
|
|
||||||
///////////////////////////////
|
|
||||||
val sourceJar = task<Jar>("sourceJar") {
|
|
||||||
description = "Creates a JAR that contains the source code."
|
|
||||||
|
|
||||||
from(sourceSets["main"].java)
|
name = Extras.name
|
||||||
|
description = Extras.description
|
||||||
|
url = Extras.url
|
||||||
|
|
||||||
archiveClassifier.set("sources")
|
vendor = Extras.vendor
|
||||||
}
|
vendorUrl = Extras.vendorUrl
|
||||||
|
|
||||||
val javaDocJar = task<Jar>("javaDocJar") {
|
issueManagement {
|
||||||
description = "Creates a JAR that contains the javadocs."
|
url = "${Extras.url}/issues"
|
||||||
|
nickname = "Gitea Issues"
|
||||||
archiveClassifier.set("javadoc")
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
publications {
|
|
||||||
create<MavenPublication>("maven") {
|
|
||||||
groupId = Extras.group
|
|
||||||
artifactId = Extras.id
|
|
||||||
version = Extras.version
|
|
||||||
|
|
||||||
from(components["java"])
|
|
||||||
|
|
||||||
artifact(sourceJar)
|
|
||||||
artifact(javaDocJar)
|
|
||||||
|
|
||||||
pom {
|
|
||||||
name.set(Extras.name)
|
|
||||||
description.set(Extras.description)
|
|
||||||
url.set(Extras.url)
|
|
||||||
|
|
||||||
issueManagement {
|
|
||||||
url.set("${Extras.url}/issues")
|
|
||||||
system.set("Gitea Issues")
|
|
||||||
}
|
|
||||||
organization {
|
|
||||||
name.set(Extras.vendor)
|
|
||||||
url.set("https://dorkbox.com")
|
|
||||||
}
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id.set("dorkbox")
|
|
||||||
name.set(Extras.vendor)
|
|
||||||
email.set("email@dorkbox.com")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm {
|
|
||||||
url.set(Extras.url)
|
|
||||||
connection.set("scm:${Extras.url}.git")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
developer {
|
||||||
repositories {
|
id = "dorkbox"
|
||||||
maven {
|
name = Extras.vendor
|
||||||
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2")
|
email = "email@dorkbox.com"
|
||||||
credentials {
|
|
||||||
username = Extras.sonatypeUserName
|
|
||||||
password = Extras.sonatypePassword
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
tasks.withType<PublishToMavenRepository> {
|
|
||||||
onlyIf {
|
|
||||||
publication == publishing.publications["maven"] && repository == publishing.repositories["maven"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<PublishToMavenLocal> {
|
|
||||||
onlyIf {
|
|
||||||
publication == publishing.publications["maven"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// output the release URL in the console
|
|
||||||
tasks["releaseRepository"].doLast {
|
|
||||||
val url = "https://oss.sonatype.org/content/repositories/releases/"
|
|
||||||
val projectName = Extras.group.replace('.', '/')
|
|
||||||
val name = Extras.name
|
|
||||||
val version = Extras.version
|
|
||||||
|
|
||||||
println("Maven URL: $url$projectName/$name/$version/")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nexusStaging {
|
|
||||||
username = Extras.sonatypeUserName
|
|
||||||
password = Extras.sonatypePassword
|
|
||||||
}
|
|
||||||
|
|
||||||
signing {
|
|
||||||
sign(publishing.publications["maven"])
|
|
||||||
}
|
|
||||||
|
21
src/dorkbox/notify/ActionHandler.java
Normal file
21
src/dorkbox/notify/ActionHandler.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2021 dorkbox, llc
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package dorkbox.notify;
|
||||||
|
|
||||||
|
public
|
||||||
|
interface ActionHandler<T> {
|
||||||
|
void handle(T value);
|
||||||
|
}
|
@ -24,15 +24,14 @@ import java.util.Iterator;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import dorkbox.swingActiveRender.ActionHandlerLong;
|
||||||
|
import dorkbox.swingActiveRender.SwingActiveRender;
|
||||||
import dorkbox.tweenEngine.BaseTween;
|
import dorkbox.tweenEngine.BaseTween;
|
||||||
import dorkbox.tweenEngine.Tween;
|
import dorkbox.tweenEngine.Tween;
|
||||||
import dorkbox.tweenEngine.TweenCallback;
|
import dorkbox.tweenEngine.TweenCallback;
|
||||||
import dorkbox.tweenEngine.TweenEngine;
|
import dorkbox.tweenEngine.TweenEngine;
|
||||||
import dorkbox.tweenEngine.TweenEquations;
|
import dorkbox.tweenEngine.TweenEquations;
|
||||||
import dorkbox.util.ActionHandler;
|
|
||||||
import dorkbox.util.ActionHandlerLong;
|
|
||||||
import dorkbox.util.ScreenUtil;
|
import dorkbox.util.ScreenUtil;
|
||||||
import dorkbox.util.swing.SwingActiveRender;
|
|
||||||
|
|
||||||
@SuppressWarnings({"FieldCanBeLocal"})
|
@SuppressWarnings({"FieldCanBeLocal"})
|
||||||
class LookAndFeel {
|
class LookAndFeel {
|
||||||
|
@ -17,7 +17,6 @@ package dorkbox.notify;
|
|||||||
|
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.ref.SoftReference;
|
import java.lang.ref.SoftReference;
|
||||||
@ -28,10 +27,9 @@ import javax.imageio.ImageIO;
|
|||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
|
|
||||||
import dorkbox.util.ActionHandler;
|
import dorkbox.propertyLoader.Property;
|
||||||
import dorkbox.util.ImageUtil;
|
import dorkbox.util.ImageUtil;
|
||||||
import dorkbox.util.LocationResolver;
|
import dorkbox.util.LocationResolver;
|
||||||
import dorkbox.util.Property;
|
|
||||||
import dorkbox.util.SwingUtil;
|
import dorkbox.util.SwingUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,11 +127,11 @@ class Notify {
|
|||||||
throw new RuntimeException("Unable to set an image that already has been set. This action must be done as soon as possible.");
|
throw new RuntimeException("Unable to set an image that already has been set. This action must be done as soon as possible.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Image imageImmediate = ImageUtil.getImageImmediate(image);
|
ImageUtil.waitForImageLoad(image);
|
||||||
|
|
||||||
// we only use 48x48 pixel images. Resize as necessary
|
// we only use 48x48 pixel images. Resize as necessary
|
||||||
int width = imageImmediate.getWidth(null);
|
int width = image.getWidth(null);
|
||||||
int height = imageImmediate.getHeight(null);
|
int height = image.getHeight(null);
|
||||||
|
|
||||||
BufferedImage bufferedImage;
|
BufferedImage bufferedImage;
|
||||||
|
|
||||||
@ -161,11 +159,12 @@ class Notify {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (image == null) {
|
if (image == null) {
|
||||||
String name = IMAGE_PATH + File.separatorChar + imageName;
|
// String name = IMAGE_PATH + File.separatorChar + imageName;
|
||||||
|
String name = imageName;
|
||||||
|
|
||||||
resourceAsStream = LocationResolver.getResourceAsStream(name);
|
resourceAsStream = LocationResolver.getResourceAsStream(name);
|
||||||
|
|
||||||
image = new ImageIcon(ImageUtil.getImageImmediate(ImageIO.read(resourceAsStream)));
|
image = new ImageIcon(ImageIO.read(resourceAsStream));
|
||||||
imageCache.put(imageName, new SoftReference<ImageIcon>(image));
|
imageCache.put(imageName, new SoftReference<ImageIcon>(image));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
@ -26,7 +26,6 @@ import javax.swing.JPanel;
|
|||||||
|
|
||||||
import dorkbox.notify.Notify;
|
import dorkbox.notify.Notify;
|
||||||
import dorkbox.notify.Pos;
|
import dorkbox.notify.Pos;
|
||||||
import dorkbox.util.ActionHandler;
|
|
||||||
import dorkbox.util.ImageUtil;
|
import dorkbox.util.ImageUtil;
|
||||||
import dorkbox.util.LocationResolver;
|
import dorkbox.util.LocationResolver;
|
||||||
import dorkbox.util.ScreenUtil;
|
import dorkbox.util.ScreenUtil;
|
||||||
@ -63,104 +62,107 @@ class NotifyTest {
|
|||||||
|
|
||||||
int count = 2;
|
int count = 2;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
// for (int i = 0; i < count; i++) {
|
||||||
final int finalI = i;
|
// final int finalI = i;
|
||||||
notify = Notify.create()
|
// notify = Notify.create()
|
||||||
.title("Notify title " + i)
|
// .title("Notify title " + i)
|
||||||
.text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
// .text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
||||||
"notification popup message")
|
// "notification popup message")
|
||||||
.hideAfter(13000)
|
// .hideAfter(13000)
|
||||||
.position(Pos.BOTTOM_RIGHT)
|
// .position(Pos.BOTTOM_RIGHT)
|
||||||
// .position(Pos.CENTER)
|
// // .position(Pos.CENTER)
|
||||||
// .setScreen(0)
|
// // .setScreen(0)
|
||||||
.darkStyle()
|
// .darkStyle()
|
||||||
// .shake(1300, 4)
|
// // .shake(1300, 4)
|
||||||
.shake(1300, 10)
|
// .shake(1300, 10)
|
||||||
.attach(frame)
|
// .attach(frame)
|
||||||
.hideCloseButton()
|
// .hideCloseButton()
|
||||||
.onAction(new ActionHandler<Notify>() {
|
// .onAction(new ActionHandler<Notify>() {
|
||||||
@Override
|
// @Override
|
||||||
public
|
// public
|
||||||
void handle(final Notify arg0) {
|
// void handle(final Notify arg0) {
|
||||||
System.err.println("Notification " + finalI + " clicked on!");
|
// System.err.println("Notification " + finalI + " clicked on!");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
notify.showWarning();
|
// notify.showWarning();
|
||||||
|
//
|
||||||
// try {
|
// // try {
|
||||||
// Thread.sleep(1000);
|
// // Thread.sleep(1000);
|
||||||
// } catch (InterruptedException e) {
|
// // } catch (InterruptedException e) {
|
||||||
// e.printStackTrace();
|
// // e.printStackTrace();
|
||||||
// }
|
// // }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
for (int i = 0; i < count; i++) {
|
// for (int i = 0; i < count; i++) {
|
||||||
final int finalI = i;
|
// final int finalI = i;
|
||||||
notify = Notify.create()
|
// notify = Notify.create()
|
||||||
.title("Notify title " + i)
|
// .title("Notify title " + i)
|
||||||
.text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
// .text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
||||||
"notification popup message")
|
// "notification popup message")
|
||||||
.hideAfter(13000)
|
// .hideAfter(13000)
|
||||||
.position(Pos.TOP_LEFT)
|
// .position(Pos.TOP_LEFT)
|
||||||
// .position(Pos.CENTER)
|
// // .position(Pos.CENTER)
|
||||||
// .setScreen(0)
|
// // .setScreen(0)
|
||||||
// .darkStyle()
|
// // .darkStyle()
|
||||||
// .shake(1300, 4)
|
// // .shake(1300, 4)
|
||||||
// .shake(1300, 10)
|
// // .shake(1300, 10)
|
||||||
.attach(frame)
|
// .attach(frame)
|
||||||
// .hideCloseButton()
|
// // .hideCloseButton()
|
||||||
.onAction(new ActionHandler<Notify>() {
|
// .onAction(new ActionHandler<Notify>() {
|
||||||
@Override
|
// @Override
|
||||||
public
|
// public
|
||||||
void handle(final Notify arg0) {
|
// void handle(final Notify arg0) {
|
||||||
System.err.println("Notification " + finalI + " clicked on!");
|
// System.err.println("Notification " + finalI + " clicked on!");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
notify.showWarning();
|
// notify.showWarning();
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
Thread.sleep(1000);
|
// Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
for (int i = 0; i < count; i++) {
|
// for (int i = 0; i < count; i++) {
|
||||||
final int finalI = i;
|
// final int finalI = i;
|
||||||
notify = Notify.create()
|
// notify = Notify.create()
|
||||||
.title("Notify title " + i)
|
// .title("Notify title " + i)
|
||||||
.text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
// .text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
||||||
"notification popup message")
|
// "notification popup message")
|
||||||
.hideAfter(3000)
|
// .hideAfter(3000)
|
||||||
.position(Pos.TOP_RIGHT)
|
// .position(Pos.TOP_RIGHT)
|
||||||
// .setScreen(0)
|
// // .setScreen(0)
|
||||||
.darkStyle()
|
// .darkStyle()
|
||||||
// .shake(1300, 4)
|
// // .shake(1300, 4)
|
||||||
.shake(1300, 10)
|
// .shake(1300, 10)
|
||||||
.hideCloseButton()
|
// .hideCloseButton()
|
||||||
.onAction(new ActionHandler<Notify>() {
|
// .onAction(new ActionHandler<Notify>() {
|
||||||
@Override
|
// @Override
|
||||||
public
|
// public
|
||||||
void handle(final Notify arg0) {
|
// void handle(final Notify arg0) {
|
||||||
System.err.println("Notification " + finalI + " clicked on!");
|
// System.err.println("Notification " + finalI + " clicked on!");
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
notify.show();
|
// notify.show();
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
Thread.sleep(1000);
|
// Thread.sleep(1000);
|
||||||
} catch (InterruptedException e) {
|
// } catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
// The purpose of this, is to display this image AS A SQUARE!
|
||||||
InputStream resourceAsStream = LocationResolver.getResourceAsStream("notify-dark.png");
|
InputStream resourceAsStream = LocationResolver.getResourceAsStream("notify-dark.png");
|
||||||
Image image = null;
|
Image image = null;
|
||||||
try {
|
try {
|
||||||
image = ImageUtil.getImageImmediate(ImageIO.read(resourceAsStream));
|
image = ImageIO.read(resourceAsStream);
|
||||||
|
ImageUtil.waitForImageLoad(image);
|
||||||
|
|
||||||
// image = image.getScaledInstance(144, 104, Image.SCALE_SMOOTH);
|
// image = image.getScaledInstance(144, 104, Image.SCALE_SMOOTH);
|
||||||
// image = image.getScaledInstance(104, 144, Image.SCALE_SMOOTH);
|
// image = image.getScaledInstance(104, 144, Image.SCALE_SMOOTH);
|
||||||
image = image.getScaledInstance(144, 144, Image.SCALE_SMOOTH);
|
image = image.getScaledInstance(144, 144, Image.SCALE_SMOOTH);
|
||||||
@ -168,41 +170,59 @@ class NotifyTest {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notify = Notify.create()
|
||||||
for (int i = 0; i < count; i++) {
|
.title("Notify scaled")
|
||||||
final int finalI = i;
|
.text("This is a notification popup message scaled This is a notification popup message This is a " +
|
||||||
notify = Notify.create()
|
"notification popup message scaled ")
|
||||||
.title("Notify title " + i)
|
// .hideAfter(13000)
|
||||||
.text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
.position(Pos.BOTTOM_LEFT)
|
||||||
"notification popup message")
|
|
||||||
// .hideAfter(13000)
|
|
||||||
.position(Pos.BOTTOM_LEFT)
|
|
||||||
// .setScreen(0)
|
// .setScreen(0)
|
||||||
// .darkStyle()
|
// .darkStyle()
|
||||||
// .shake(1300, 4)
|
// .shake(1300, 4)
|
||||||
// .shake(1300, 10)
|
// .shake(1300, 10)
|
||||||
// .hideCloseButton()
|
// .hideCloseButton()
|
||||||
.onAction(new ActionHandler<Notify>() {
|
.onAction(arg0->System.err.println("Notification scaled clicked on!"));
|
||||||
@Override
|
|
||||||
public
|
|
||||||
void handle(final Notify arg0) {
|
|
||||||
System.err.println("Notification " + finalI + " clicked on!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (i == 0) {
|
notify.image(image);
|
||||||
notify.image(image);
|
notify.show();
|
||||||
notify.show();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
notify.showConfirm();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Thread.sleep(1000);
|
|
||||||
} catch (InterruptedException e) {
|
//
|
||||||
e.printStackTrace();
|
// for (int i = 0; i < count; i++) {
|
||||||
}
|
// final int finalI = i;
|
||||||
}
|
// notify = Notify.create()
|
||||||
|
// .title("Notify title " + i)
|
||||||
|
// .text("This is a notification " + i + " popup message This is a notification popup message This is a " +
|
||||||
|
// "notification popup message")
|
||||||
|
// // .hideAfter(13000)
|
||||||
|
// .position(Pos.BOTTOM_LEFT)
|
||||||
|
// // .setScreen(0)
|
||||||
|
// // .darkStyle()
|
||||||
|
// // .shake(1300, 4)
|
||||||
|
// // .shake(1300, 10)
|
||||||
|
// // .hideCloseButton()
|
||||||
|
// .onAction(new ActionHandler<Notify>() {
|
||||||
|
// @Override
|
||||||
|
// public
|
||||||
|
// void handle(final Notify arg0) {
|
||||||
|
// System.err.println("Notification " + finalI + " clicked on!");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
//
|
||||||
|
// if (i == 0) {
|
||||||
|
// notify.image(image);
|
||||||
|
// notify.show();
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// notify.showConfirm();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// Thread.sleep(1000);
|
||||||
|
// } catch (InterruptedException e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
test/notify-dark.png
Normal file
BIN
test/notify-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
Loading…
Reference in New Issue
Block a user