com.mucommander.ui.notifier
Class SystemTrayNotifier

java.lang.Object
  extended by com.mucommander.ui.notifier.AbstractNotifier
      extended by com.mucommander.ui.notifier.SystemTrayNotifier
All Implemented Interfaces:
NotificationTypes, java.awt.event.ActionListener, java.util.EventListener

public class SystemTrayNotifier
extends AbstractNotifier
implements java.awt.event.ActionListener

SystemTrayNotifier implements a notifier that uses the System Tray to display notifications. When enabled, this notifier displays an icon in the systrem tray that recalls the current MainFrame when double-clicked, or shows a popup menu with additional actions ('Bring all to front', 'Quit') when right-clicked.

This notifier is available only with Java 1.6 and up.

Author:
Maxence Bernard

Field Summary
 
Fields inherited from interface com.mucommander.ui.notifier.NotificationTypes
NOTIFICATION_TYPE_JOB_COMPLETED, NOTIFICATION_TYPE_JOB_ERROR
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
           
 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.
protected  void finalize()
           
 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

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

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvent)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


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