1 /*
2 * DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway
3 * Copyright (C) 2009 Mickael Guessant
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 package davmail.ui.tray;
20
21 import org.apache.log4j.Level;
22
23 import java.awt.*;
24
25 /**
26 * Gateway tray interface common to SWT and pure java implementations
27 */
28 public interface DavGatewayTrayInterface {
29 /**
30 * Switch tray icon between active and standby icon.
31 */
32 void switchIcon();
33
34 /**
35 * Reset tray icon to standby
36 */
37 void resetIcon();
38
39 /**
40 * Set tray icon to inactive (network down)
41 */
42 void inactiveIcon();
43
44 /**
45 * Check if current tray status is inactive (network down).
46 *
47 * @return true if inactive
48 */
49 boolean isActive();
50
51 /**
52 * Return AWT Image icon for frame title.
53 *
54 * @return frame icon
55 */
56 java.util.List<Image> getFrameIcons();
57
58 /**
59 * Display balloon message for log level.
60 *
61 * @param message text message
62 * @param level log level
63 */
64 void displayMessage(String message, Level level);
65
66 /**
67 * Create tray icon and register frame listeners.
68 */
69 void init();
70
71 /**
72 * destroy frames
73 */
74 void dispose();
75 }