2
|
1 |
/*
|
5506
|
2 |
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
|
2
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
5506
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
2
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
5506
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
2
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
5506
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
2
|
24 |
*/
|
|
25 |
|
|
26 |
package java.awt.peer;
|
|
27 |
|
1975
|
28 |
import java.awt.SystemTray;
|
|
29 |
import java.awt.TrayIcon;
|
|
30 |
|
|
31 |
/**
|
|
32 |
* The peer interface for the {@link TrayIcon}. This doesn't need to be
|
|
33 |
* implemented if {@link SystemTray#isSupported()} returns false.
|
|
34 |
*/
|
2
|
35 |
public interface TrayIconPeer {
|
1975
|
36 |
|
|
37 |
/**
|
|
38 |
* Disposes the tray icon and releases and resources held by it.
|
|
39 |
*
|
|
40 |
* @see TrayIcon#removeNotify()
|
|
41 |
*/
|
2
|
42 |
void dispose();
|
1975
|
43 |
|
|
44 |
/**
|
|
45 |
* Sets the tool tip for the tray icon.
|
|
46 |
*
|
|
47 |
* @param tooltip the tooltip to set
|
|
48 |
*
|
|
49 |
* @see TrayIcon#setToolTip(String)
|
|
50 |
*/
|
2
|
51 |
void setToolTip(String tooltip);
|
1975
|
52 |
|
|
53 |
/**
|
|
54 |
* Updates the icon image. This is supposed to display the current icon
|
|
55 |
* from the TrayIcon component in the actual tray icon.
|
|
56 |
*
|
|
57 |
* @see TrayIcon#setImage(java.awt.Image)
|
|
58 |
* @see TrayIcon#setImageAutoSize(boolean)
|
|
59 |
*/
|
2
|
60 |
void updateImage();
|
1975
|
61 |
|
|
62 |
/**
|
|
63 |
* Displays a message at the tray icon.
|
|
64 |
*
|
|
65 |
* @param caption the message caption
|
|
66 |
* @param text the actual message text
|
|
67 |
* @param messageType the message type
|
|
68 |
*
|
|
69 |
* @see TrayIcon#displayMessage(String, String, java.awt.TrayIcon.MessageType)
|
|
70 |
*/
|
2
|
71 |
void displayMessage(String caption, String text, String messageType);
|
1975
|
72 |
|
|
73 |
/**
|
|
74 |
* Shows the popup menu of this tray icon at the specified position.
|
|
75 |
*
|
|
76 |
* @param x the X location for the popup menu
|
|
77 |
* @param y the Y location for the popup menu
|
|
78 |
*/
|
2
|
79 |
void showPopupMenu(int x, int y);
|
|
80 |
}
|