Implementing Tray Icons
by, 03-04-2012 at 11:39 AM (484 Views)
One or more than one instances could be added of java.awt.TrayIcon to the System Tray. Removal or addition methods are used to add/remove the Traylcons. Presentation of tray icon is basically the Traylcon which can be removed or added, from any SystemTray. The functionality of the Traylcon is more as compared to what has been shown in tray. Following can be present in it.
- AWT “popup menu”
- Set of listeners associated
- Text tooltip
Many MouseEvenets are generated by the Traylcon. For example:
Event listeners might get notifications along with the support to handle such events. All received coordinates by mouse events shall be considered relative to a screen. In programming, special care shall be taken to handle them. They are not found to in relevance with tray. By traylcon, events that are processed are given as following:
- Click right at tray icon. A menu will be popped up.
- At the mouse over tooltip will be displayed.