|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rococoa.contrib.growl.Growl
public final class Growl
A class that encapsulates the work of talking to Growl.
Field Summary | |
---|---|
static String |
GROWL_APP_ICON
Ticket key for the application icon. |
static String |
GROWL_APP_NAME
Ticket key for the application name. |
static String |
GROWL_APP_REGISTRATION
The name of the growl registration notification for DNC. |
static String |
GROWL_NOTIFICATION
The name of the growl notification for DNC. |
static String |
GROWL_NOTIFICATION_APP_ICON
Notification key for the application icon. |
static String |
GROWL_NOTIFICATION_DESCRIPTION
Notification key for the description. |
static String |
GROWL_NOTIFICATION_ICON
Notification key for the icon. |
static String |
GROWL_NOTIFICATION_IDENTIFIER
Notification key for the identifier. |
static String |
GROWL_NOTIFICATION_NAME
Notification key for the name. |
static String |
GROWL_NOTIFICATION_STICKY
Notification key for the sticky flag. |
static String |
GROWL_NOTIFICATION_TITLE
Notification key for the title. |
static String |
GROWL_NOTIFICATIONS_ALL
Ticket key for all notifactions. |
static String |
GROWL_NOTIFICATIONS_DEFAULT
Ticket key for the default notifactions. |
Constructor Summary | |
---|---|
Growl(String inAppName,
List<String> inAllNotes,
List<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. |
|
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,
NSImage inImage,
List<String> inAllNotes,
List<String> 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. |
Method Summary | |
---|---|
List<String> |
allowedNotifications()
Accessor for the Array of allowed Notifications returned an NSArray |
String |
applicationName()
Accessor for The currently set "Application" Name |
List<String> |
defaultNotifications()
Accessor for the Array of default Notifications returned as an NSArray |
void |
postNotification(String inNotificationName,
NSImage inIcon,
String inTitle,
String inDescription,
NSDictionary inExtraInfo)
Convenience method that defers to postNotificationGrowlOf(String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky, String inIdentifier). |
void |
postNotification(String inNotificationName,
NSImage inIcon,
String inTitle,
String inDescription,
NSDictionary inExtraInfo,
boolean inSticky)
Convenience method that defers to postNotificationGrowlOf(String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky, String inIdentifier). |
void |
postNotification(String inNotificationName,
NSImage inIcon,
String inTitle,
String inDescription,
NSDictionary inExtraInfo,
boolean inSticky,
String inIdentifier)
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 |
postNotification(String inNotificationName,
String inTitle,
String inDescription)
Convenienve method that defers to postNotificationGrowlOf(String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky, String inIdentifier) with null passed for icon, extraInfo and identifier arguments |
void |
postNotification(String inNotificationName,
String inTitle,
String inDescription,
boolean inSticky)
Convenience method that defers to postNotificationGrowlOf(String inNotificationName, NSData inIconData, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky) with null passed for icon and extraInfo arguments. |
boolean |
register()
Register all our notifications with Growl, this should only be called once. |
void |
setAllowedNotifications(List<String> inAllNotes)
Set the list of allowed Notifications |
void |
setApplicationName(String inAppName)
Sets The name of the Application talking to growl |
void |
setDefaultNotifications(List<String> inDefNotes)
Set the list of Default Notfiications |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 static final String GROWL_NOTIFICATION_STICKY
public static final String GROWL_NOTIFICATION_IDENTIFIER
Constructor Detail |
---|
public Growl(String inAppName, NSImage inImage)
inAppName
- The Name of your "application"inImage
- The NSImage Icon for your Applicationpublic Growl(String inAppName, List<String> inAllNotes, List<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 defaultpublic Growl(String inAppName, NSImage inImage, List<String> inAllNotes, List<String> inDefNotes, boolean registerNow)
inAppName
- The Name of your "Application"inImage
- Your "Application"'s icon, or null
to use your application's default application icon.inAllNotes
- 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 registerMethod Detail |
---|
public final boolean register()
true
.public void postNotification(String inNotificationName, NSImage inIcon, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky, String inIdentifier)
inNotificationName
- The name of one of the notifications we told growl
about.inIcon
- The NSImage 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 nullinSticky
- Whether the Growl notification should be stickyinIdentifier
- Notification identifier for coalescing. This can be null.
IllegalArgumentException
- When a notification is not knownpublic void postNotification(String inNotificationName, NSImage inIcon, String inTitle, String inDescription, NSDictionary inExtraInfo, boolean inSticky)
inNotificationName
- The name of one of the notifications we told growl
about.inIcon
- 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 their 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 null.inSticky
- Whether the Growl notification should be sticky.
IllegalArgumentException
- When a notification is not knownpublic void postNotification(String inNotificationName, NSImage inIcon, String inTitle, String inDescription, NSDictionary inExtraInfo)
inNotificationName
- The name of one of the notifications we told growl
about.inIcon
- 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 their 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 null.
IllegalArgumentException
- When a notification is not knownpublic void postNotification(String inNotificationName, String inTitle, String inDescription)
null
passed for icon, extraInfo and identifier arguments
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 it
IllegalArgumentException
- When a notification is not knownpublic void postNotification(String inNotificationName, String inTitle, String inDescription, boolean inSticky)
null
passed for icon and extraInfo arguments.
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 itinSticky
- Whether our notification should be sticky
IllegalArgumentException
- When a notification is not knownpublic String applicationName()
public List<String> allowedNotifications()
public List<String> defaultNotifications()
public void setApplicationName(String inAppName)
inAppName
- The Application Name
IllegalStateException
- if already registeredpublic void setAllowedNotifications(List<String> inAllNotes)
inAllNotes
- The array of allowed Notifications
IllegalStateException
- if already registeredpublic void setDefaultNotifications(List<String> inDefNotes)
inDefNotes
- The default Notifications
IllegalArgumentException
- when an element of the array is not in the
allowedNotifications
IllegalStateException
- if already registered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |