java-gnome version 4.0.19

org.gnome.notify
Class Notify

Object
  extended by org.gnome.glib.Glib
      extended by org.gnome.notify.Notify

public final class Notify
extends Glib

Notification system initialization point. A notification enabled program written with java-gnome will boil down to this:

 public class ExampleNotificationApp
   
     public static void main(String[] args) {
         Gtk.init(args);
         Notify.init("example-app");
           
         // build user interface
         
         // create and display notifications for application events
           
         Gtk.main();
     }
 }
 

The meat of this library is the Notification class; see there.

Since:
4.0.12
Author:
Serkan Kaba
See Also:
Desktop Notifications Spec

Method Summary
static String getApplicationName()
          Returns the registered application name.
static String[] getServerCapabilities()
          Returns a list of features supported by the notification system.
static boolean init(String applicationName)
          Initialize the notification system.
static boolean isInitialized()
          Tests whether notification system is initialized or not.
static void uninit()
          Uninitialize the notification system.
 
Methods inherited from class org.gnome.glib.Glib
formatSizeForDisplay, getRealName, getSystemConfigDirs, getSystemDataDirs, getUserCacheDir, getUserConfigDir, getUserDataDir, getUserName, getUserSpecialDir, markupEscapeText, reloadUserSpecialDirsCache, setProgramName
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getApplicationName

public static String getApplicationName()
Returns the registered application name. This is as passed when you called Notify.init().

Since:
4.0.12

getServerCapabilities

public static String[] getServerCapabilities()
Returns a list of features supported by the notification system.

See the "D-BUS Protocol" section in Desktop Notifications Specification for standard capabilities.

Since:
4.0.12

init

public static boolean init(String applicationName)
Initialize the notification system. This must be called before any Notification methods are used.

Parameters:
applicationName - Name of the application initializing notification system.
Since:
4.0.12

isInitialized

public static boolean isInitialized()
Tests whether notification system is initialized or not.

Since:
4.0.12

uninit

public static void uninit()
Uninitialize the notification system. This should be called when notification is no longer needed (i.e. upon exit).

Since:
4.0.12


java-gnome