Linux, MacOS, or Windows (notification/growl/toast/) popups for the desktop for Java 6+
 
 
Go to file
Robinson efd4328695
Version 4.5
2023-12-18 14:26:46 +01:00
gradle/wrapper updated gradle 2023-08-20 13:35:04 +02:00
resources cleanup 2023-01-26 02:10:04 +01:00
src/dorkbox/notify Version 4.5 2023-12-18 14:26:46 +01:00
src9 Direct rendering for desktop notifications 2023-02-03 00:05:10 +01:00
test Enhanced tests 2023-12-18 14:25:44 +01:00
.gitignore updated gradle 2023-01-26 02:10:26 +01:00
LICENSE updated deps 2023-08-21 01:51:36 +02:00
LICENSE.Apachev2 Added Growl project 2015-11-01 00:24:42 +01:00
LICENSE.BSD2 added license info 2023-01-29 15:05:14 +01:00
LICENSE.BSD3 Added Growl project 2015-11-01 00:24:42 +01:00
LICENSE.CC0 added license info 2023-01-29 15:05:14 +01:00
LICENSE.MIT Reverted change to use Version object. 2017-09-15 00:42:19 +02:00
README.md Version 4.5 2023-12-18 14:26:46 +01:00
build.gradle.kts Version 4.5 2023-12-18 14:26:46 +01:00
gradle.properties Updated build deps 2023-10-09 12:31:49 +02:00
gradlew updated gradle 2023-08-20 13:35:04 +02:00
gradlew.bat updated gradle 2023-08-20 13:35:04 +02:00
notify-dark.png cleanup 2023-01-26 02:10:04 +01:00
notify-light.png cleanup 2023-01-26 02:10:04 +01:00
settings.gradle.kts Hardcoded project name 2023-08-07 17:25:59 -06:00

README.md

Notify

Dorkbox Github Gitlab

Cross platform notification popups, similar to "Growl" on OSX, "Toasts" on Windows, and "Notifications" on Ubuntu.

This small library can display notifications on any screen, in any corner.

Basic usage

Notify.create()
      .title("Title Text")
      .text("Hello World!")
      .useDarkStyle()
      .showWarning();

Primary Features:

  1. Can specify which screen to use for notification.
  2. Can specify which corner (center is also possible) to use for notification
  3. If no location is specified, it will show on whatever screen the mouse is on (if a desktop notification)
  4. Duration timeouts, with progress indicator on notification
  5. Light or Dark themes
  6. Can close via close button or clicking on notification body
  7. Can show/hide the close button
  8. Can register a callback for when a user clicks on the notification body
  9. Animates to a collated position if multiple notifications are in the same position
  10. Bypasses the swing EDT, and now renders at a beautiful 30 frames-per-second.
  11. Can have notifications in an application or on the desktop.
  • This is for cross-platform use, specifically - linux 32/64, mac 32/64, and windows 32/64. Java 6+
  • You will need the images in the 'resources' directory, in addition to the normal libs.
  • Note: If you want to COMPLETELY remove repainting by the swing EDT (for the entire JVM), run NullRepaintManager.install();
Customization parameters:

-ActiveRenderLoop.TARGET_FPS  (type int, default value '30')
 - How many frames per second we want the Swing ActiveRender thread to run at?
 - NOTE: The ActiveRenderLoop replaces the Swing EDT (only for specified JFrames) in order to enable smoother animations. 
  It is also important to REMEMBER -- if you add a component to an actively managed JFrame, YOU MUST make sure to call
  JComponent.setIgnoreRepaint(boolean) otherwise this component will "fight" on the EDT for updates. You can completely
  disable the EDT by calling NullRepaintManager.install()


Notify.IMAGE_PATH    (type String, default value 'resources')
 - Location of the dialog image resources. By default they must be in the 'resources' directory relative to the application
 
 
Notify.TITLE_TEXT_FONT    (type String, default value 'Source Code Pro BOLD 16')
 - This is the title font used by a notification.

 
Notify.MAIN_TEXT_FONT    (type String, default value 'Source Code Pro BOLD 12')
 - This is the main text font used by a notification.
    
 
Notify.MOVE_DURATION    (type float, default value '1.0F')
 - How long we want it to take for the popups to relocate when one is closed

light theme

dark theme

   

Release Notes

It is important to note that notifications for an application use the glassPane and sets it's layoutManager to null. This can cause problems with some applications, and you'll need to work around this limitation.

Maven Info

<dependencies>
    ...
    <dependency>
      <groupId>com.dorkbox</groupId>
      <artifactId>Notify</artifactId>
      <version>4.5</version>
    </dependency>
</dependencies>

Gradle Info

dependencies {
    ...
    compile "com.dorkbox:Notify:4.5"
}

Or if you don't want to use Maven, you can access the files directly here:
https://oss.sonatype.org/content/repositories/releases/com/dorkbox/Notify/

https://oss.sonatype.org/content/repositories/releases/com/dorkbox/TweenEngine/
https://oss.sonatype.org/content/repositories/releases/com/dorkbox/ObjectPool/

https://repo1.maven.org/maven2/org/slf4j/slf4j-api/

License

This project is © 2023 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further references.