com.jpackages.jtray
Interface JTrayListener


public interface JTrayListener

This interface defines methods called when mouse clicks in a JTrayIcon are detected or if the taskbar has been created.

JTrayListeners are added to a JTrayIcon.

It is recommended to only use left click or left double click but not both because for each left double click there are also two left clicks.

Copyright (c) 2001-2008

Author:
JPackages.com

Method Summary
 void mouseClickLeft(JTrayIcon icon, java.awt.Point location)
          A left mouse click has occurred.
 void mouseClickRight(JTrayIcon icon, java.awt.Point location)
          A right mouse click has occurred.
 void mouseDoubleClickLeft(JTrayIcon icon, java.awt.Point location)
          A left mouse double click has occurred.
 void mouseDoubleClickRight(JTrayIcon icon, java.awt.Point location)
          A right mouse double click has occurred.
 void taskbarCreated()
          The taskbar has just been created.
 

Method Detail

taskbarCreated

void taskbarCreated()

The taskbar has just been created. This could be caused by a user logging on or explorer crashing and restarting. In either case, icons that failed to display when there was no taskbar should now be reattempted.

JTrayIcons that were successfully displayed previously will be redisplayed automatically.

This event only works on Windows 2000 and XP. It will not work on any older operating systems.


mouseClickLeft

void mouseClickLeft(JTrayIcon icon,
                    java.awt.Point location)

A left mouse click has occurred.

Parameters:
icon - The JTrayIcon that this mouse click has occurred on.
location - The point (x,y) that was clicked.

mouseDoubleClickLeft

void mouseDoubleClickLeft(JTrayIcon icon,
                          java.awt.Point location)

A left mouse double click has occurred.

Parameters:
icon - The JTrayIcon that this mouse click has occurred on.
location - The point (x,y) that was clicked.

mouseClickRight

void mouseClickRight(JTrayIcon icon,
                     java.awt.Point location)

A right mouse click has occurred.

Parameters:
icon - The JTrayIcon that this mouse click has occurred on.
location - The point (x,y) that was clicked.

mouseDoubleClickRight

void mouseDoubleClickRight(JTrayIcon icon,
                           java.awt.Point location)

A right mouse double click has occurred.

Parameters:
icon - The JTrayIcon that this mouse click has occurred on.
location - The point (x,y) that was clicked.