public class Growl extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GROWL_APP_ICON |
static String |
GROWL_APP_NAME |
static String |
GROWL_APP_REGISTRATION |
static String |
GROWL_NOTIFICATION |
static String |
GROWL_NOTIFICATION_APP_ICON |
static String |
GROWL_NOTIFICATION_DESCRIPTION |
static String |
GROWL_NOTIFICATION_ICON |
static String |
GROWL_NOTIFICATION_NAME |
static String |
GROWL_NOTIFICATION_TITLE |
static String |
GROWL_NOTIFICATIONS_ALL |
static String |
GROWL_NOTIFICATIONS_DEFAULT |
Constructor and Description |
---|
Growl(String inAppName,
NSData inImageData)
Convenience method to contruct a growl instance, defers to Growl( String
inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes,
boolean registerNow ) with empty arrays for your notifications.
|
Growl(String inAppName,
NSData inImageData,
NSArray inAllNotes,
NSArray inDefNotes,
boolean registerNow)
Convenience method to contruct a growl instance, defers to Growl( String
inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes,
boolean registerNow ) with empty arrays for your notifications.
|
Growl(String inAppName,
NSImage inImage)
Convenience method to contruct a growl instance, defers to Growl( String
inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes,
boolean registerNow ) with empty arrays for your notifications.
|
Growl(String inAppName,
String[] inAllNotes,
String[] inDefNotes)
Convenience method to contruct a growl instance, defers to Growl( String
inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes,
boolean registerNow ) with the arrays passed here and empty Data for the
icon.
|
Modifier and Type | Method and Description |
---|---|
NSArray |
allowedNotifications()
Accessor for the Array of allowed Notifications returned an NSArray
|
String |
applicationName()
Accessor for The currently set "Application" Name
|
NSArray |
defaultNotifications()
Accessor for the Array of default Notifications returned as an NSArray
|
void |
notifyGrowlOf(String inNotificationName,
NSData inIconData,
String inTitle,
String inDescription,
NSDictionary inExtraInfo)
The fun part is actually sending those notifications we worked so hard for
so here we let growl know about things we think the user would like, and
growl decides if that is the case.
|
void |
notifyGrowlOf(String inNotificationName,
NSImage inImage,
String inTitle,
String inDescription,
NSDictionary inExtraInfo)
Defers to notifyGrowlOf( String inNotificationName, NSData inIconData,
String inTitle, String inDescription, NSDictionary inExtraInfo ) with null
passed for icon and extraInfo arguments
|
void |
notifyGrowlOf(String inNotificationName,
String inTitle,
String inDescription)
Convenienve method that defers to notifyGrowlOf( String inNotificationName,
NSData inIconData, String inTitle, String inDescription, NSDictionary
inExtraInfo ) with null passed for icon and extraInfo arguments
|
void |
notifyGrowlOf(String inNotificationName,
String inImagePath,
String inTitle,
String inDescription)
Convenienve method that defers to notifyGrowlOf( String inNotificationName,
NSData inIconData, String inTitle, String inDescription, NSDictionary
inExtraInfo ) with null passed for extraInfo
|
boolean |
register()
Register all our notifications with Growl, this should only be called once
|
void |
setAllowedNotifications(NSArray inAllNotes)
Set the list of allowed Notifications
|
void |
setApplicationName(String inAppName)
Sets The name of the Application talking to growl
|
void |
setDefaultNotifications(NSArray inDefNotes)
Set the list of Default Notfiications
|
public static final String GROWL_APP_REGISTRATION
public static final String GROWL_APP_NAME
public static final String GROWL_APP_ICON
public static final String GROWL_NOTIFICATIONS_DEFAULT
public static final String GROWL_NOTIFICATIONS_ALL
public static final String GROWL_NOTIFICATION
public static final String GROWL_NOTIFICATION_NAME
public static final String GROWL_NOTIFICATION_TITLE
public static final String GROWL_NOTIFICATION_DESCRIPTION
public static final String GROWL_NOTIFICATION_ICON
public static final String GROWL_NOTIFICATION_APP_ICON
public Growl(String inAppName, NSImage inImage)
inAppName
- -
The Name of your "application"inImage
- -
The NSImage Icon for your ApplicationGrowl(String inAppName, NSData inImageData)
inAppName
- -
The Name of your "Application"inImageData
- -
The NSData for your NSImageGrowl(String inAppName, String[] inAllNotes, String[] inDefNotes)
inAppName
- -
The Name of your "Application"inAllNotes
- -
A String Array with the name of all your notificationsinDefNotes
- -
A String Array with the na,es of the Notifications on by defaultGrowl(String inAppName, NSData inImageData, NSArray inAllNotes, NSArray inDefNotes, boolean registerNow)
inAppName
- -
The Name of your "Application"inImageData
- -
The Data of your "Application"'s iconinAllNotes
- -
The NSArray of Strings of all your NotificationsinDefNotes
- -
The NSArray of Strings of your default NotificationsregisterNow
- -
Since we have all the necessary info we can go ahead and registerpublic boolean register()
public void notifyGrowlOf(String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo) throws Exception
inNotificationName
- -
The name of one of the notifications we told growl about.inIconData
- -
The NSData for the icon for this notification, can be nullinTitle
- -
The Title of our Notification as Growl will show itinDescription
- -
The Description of our Notification as Growl will display itinExtraInfo
- -
Growl is flexible and allows Display Plugins to do as they please
with thier own special keys and values, you may use them here.
These may be ignored by either the user's preferences or the
current Display Plugin. This can be nullException
- When a notification is not knownpublic void notifyGrowlOf(String inNotificationName, String inTitle, String inDescription) throws Exception
inNotificationName
- -
The name of one of the notifications we told growl about.inTitle
- -
The Title of our Notification as Growl will show itinDescription
- -
The Description of our Notification as Growl will display itException
- When a notification is not knownpublic void notifyGrowlOf(String inNotificationName, NSImage inImage, String inTitle, String inDescription, NSDictionary inExtraInfo) throws Exception
inNotificationName
- -
The name of one of the notifications we told growl about.inTitle
- -
The Title of our Notification as Growl will show itinDescription
- -
The Description of our Notification as Growl will display itinExtraInfo
- -
Look above for infoException
- When a notification is not knownpublic void notifyGrowlOf(String inNotificationName, String inImagePath, String inTitle, String inDescription) throws Exception
inNotificationName
- -
The name of one of the notifications we told growl about.inImagePath
- -
Path to the image for this notificationinTitle
- -
The Title of our Notification as Growl will show itinDescription
- -
The Description of our Notification as Growl will display itException
- When a notification is not knownpublic String applicationName()
public NSArray allowedNotifications()
public NSArray defaultNotifications()
public void setApplicationName(String inAppName)
inAppName
- -
The Application Namepublic void setAllowedNotifications(NSArray inAllNotes)
inAllNotes
- -
The array of allowed NotificationsTV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)