com.mucommander.ui.notifier
Class GrowlNotifier

java.lang.Object
  extended by com.mucommander.ui.notifier.AbstractNotifier
      extended by com.mucommander.ui.notifier.GrowlNotifier
All Implemented Interfaces:
NotificationTypes

public class GrowlNotifier
extends AbstractNotifier

GrowlNotifier implements a notifier that uses the Growl notification system.

Growl is a third party notification system for Mac OS X, which allows Growl-enabled applications to display small, unintrusive popup notifications to inform the user of noteworthy events. Growl can be found at: http://growl.info.

This class communicates with Growl using AppleScript. More information about the AppleScript syntax can be found here. The Growl Java library part of the Growl SDK was previously used but it relied on the Cocoa-Java library which has been deprecated by Apple since then.

.

Author:
Maxence Bernard

Field Summary
 
Fields inherited from interface com.mucommander.ui.notifier.NotificationTypes
NOTIFICATION_TYPE_JOB_COMPLETED, NOTIFICATION_TYPE_JOB_ERROR
 
Method Summary
 boolean displayNotification(int notificationType, java.lang.String title, java.lang.String description)
          Displays a notification with the specified type, title and description and returns true if the notification could be displayed.
 java.lang.String getPrettyName()
          Returns a pretty name for the underlying notification system that can be displayed to the end user.
 boolean isEnabled()
          Returns true if this notifier is enabled and ready to display notifications.
 boolean setEnabled(boolean enabled)
          Enables/disables this notifier and returns true if the operation succeeded.
 
Methods inherited from class com.mucommander.ui.notifier.AbstractNotifier
displayBackgroundNotification, getNotifier, isAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPrettyName

public java.lang.String getPrettyName()
Description copied from class: AbstractNotifier
Returns a pretty name for the underlying notification system that can be displayed to the end user.

Specified by:
getPrettyName in class AbstractNotifier
Returns:
a pretty name for the underlying notification system

setEnabled

public boolean setEnabled(boolean enabled)
Description copied from class: AbstractNotifier
Enables/disables this notifier and returns true if the operation succeeded. A typical case for returning false, is when the underlying notification system (e.g. Growl under Mac OS X) could not be reached.

Specified by:
setEnabled in class AbstractNotifier
Parameters:
enabled - true to enable this notifier, false to disable it
Returns:
true if the operation succeeded

isEnabled

public boolean isEnabled()
Description copied from class: AbstractNotifier
Returns true if this notifier is enabled and ready to display notifications.

Specified by:
isEnabled in class AbstractNotifier
Returns:
true if this notifier is enabled and ready to display notifications

displayNotification

public boolean displayNotification(int notificationType,
                                   java.lang.String title,
                                   java.lang.String description)
Description copied from class: AbstractNotifier
Displays a notification with the specified type, title and description and returns true if the notification could be displayed. Unlike AbstractNotifier.displayBackgroundNotification(int, String, String), the notification will be attempted for display even if muCommander is currently in the foreground.

Returns true if the notification could be displayed, false if:

Specified by:
displayNotification in class AbstractNotifier
Parameters:
notificationType - one of the available notification types, see NotificationTypes for possible values
title - the title of the notification to display
description - the description of the notification to display
Returns:
true if the notification was properly sent, false otherwise


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard