private void sendTrayNotification( final String title, final String message, final TrayIcon.MessageType type) { if (clientUI.getTrayIcon() != null) { clientUI.getTrayIcon().displayMessage(title, message, type); } }
mainFrame.toFront(); mainFrame.setAlwaysOnTop(true); trayIcon.displayMessage(mainFrame.getTitle(), "Started ripping " + ripper.getURL().toExternalForm(), MessageType.INFO); mainFrame.setAlwaysOnTop(false);
public void displayMessage(String message) { if (trayIcon != null) { trayIcon.displayMessage("Mage", message, TrayIcon.MessageType.INFO); } } }
trayIcon.displayMessage("Some message.", "Some other message.", TrayIcon.MessageType.INFO);
private void showWelcomeMessage(TrayIcon icon) { String caption = messages.get("First time using Tomighty?"); String message = messages.get("Click on the tomato icon to start using it"); icon.displayMessage(caption, message, MessageType.INFO); }
public class Main { static Image image = Toolkit.getDefaultToolkit().getImage("images/tray.gif"); static TrayIcon trayIcon = new TrayIcon(image, "Tester2"); public static void main(String[] a) throws Exception { if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); trayIcon.setImageAutoSize(true); trayIcon.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.out.println("In here"); trayIcon.displayMessage("Tester!", "Some action performed", TrayIcon.MessageType.INFO); } }); try { tray.add(trayIcon); } catch (AWTException e) { System.err.println("TrayIcon could not be added."); } } } }
trayIcon.displayMessage("Good-bye", "Cruel World", TrayIcon.MessageType.WARNING); timer = new javax.swing.Timer(125, updateCol()); timer.start(); trayIcon.displayMessage(null, " Aplication Loaded ", TrayIcon.MessageType.NONE);
public void actionPerformed(ActionEvent e) { System.out.println("Tray actionPerformed"); trayIcon.displayMessage("Action Event", "An Action Event Has Been Performed!", TrayIcon.MessageType.INFO); } };
public static void createWarning(String message) { if (trayIcon != null) { trayIcon.displayMessage(AgentConstants.APP_PUBLIC_NAME, message, TrayIcon.MessageType.WARNING); } Logger.getLogger(SSHAgent.class.getName()).log(Level.WARNING, message); }
public static void createInfo(String message) { if (trayIcon != null) { trayIcon.displayMessage(AgentConstants.APP_PUBLIC_NAME, message, TrayIcon.MessageType.INFO); } Logger.getLogger(SSHAgent.class.getName()).log(Level.INFO, message); }
trayIcon.displayMessage(title, message, messageType);
/** * Displays a tray icon info message. * * @param title The title to use * @param message The main message text to use */ public void displayInfo(String title, String message) { if (trayIcon != null) { addIcon(); trayIcon.displayMessage(title, message, TrayIcon.MessageType.NONE); } }
SystemTray tray = SystemTray.getSystemTray(); Image image = Toolkit.getDefaultToolkit().getImage("tray.gif"); TrayIcon trayIcon = new TrayIcon(image, "Tray Demo"); tray.add(trayIcon); trayIcon.displayMessage("Hello, World", "notification demo", MessageType.INFO);
@Override public void run() { try { tray.add(icon); icon.displayMessage(title, details, getMessageType(notificationType)); latch.countDown(); } catch (AWTException e) { // don't care, no reporting channel } } });
@Override public boolean displayNotification(NotificationType notificationType, String title, String description) { LOGGER.debug("notificationType="+notificationType+" title="+title+" description="+description); if(!isEnabled()) { LOGGER.debug("Ignoring notification, this notifier is not enabled"); return false; } trayIcon.displayMessage(title, description, MESSAGE_TYPES.get(notificationType)); return true; }
final TrayIcon ti = new TrayIcon(XTPSkin.getInstance().getAppIcon().getImage()); final SystemTray st = SystemTray.getSystemTray(); st.add(ti); ti.displayMessage("foo", "bar", MessageType.INFO);
public static void createError(String message, boolean addLogLinkMessage, Throwable ex) { String message2 = message; if (addLogLinkMessage) { message2 = message.concat("\n").concat(LocalizedLogger.getLocalizedMessage(AgentConstants.LINK_TO_LOG_KEY)); } if (trayIcon != null) { trayIcon.displayMessage(AgentConstants.APP_PUBLIC_NAME, message2, TrayIcon.MessageType.ERROR); } Logger.getLogger(SSHAgent.class.getName()).log(Level.SEVERE, message, ex); }
private String _genStatus() { int pre = _transference_preprocess_global_queue.size(); int prov = _transference_provision_queue.size(); int rem = _transference_remove_queue.size(); int wait = getTransference_waitstart_queue().size(); int run = _transference_running_list.size(); int finish = _transference_finished_queue.size(); if (!_tray_icon_finish && finish > 0 && pre + prov + wait + run == 0 && !_main_panel.getView().isVisible()) { _tray_icon_finish = true; _main_panel.getTrayicon().displayMessage("MegaBasterd says:", "All your transferences have finished", TrayIcon.MessageType.INFO); } return (pre + prov + rem + wait + run + finish > 0) ? "Pre: " + pre + " / Pro: " + prov + " / Wait: " + wait + " / Run: " + run + " / Finish: " + finish + " / Rem: " + rem : ""; }
@Override public void send(Notification notification) { if (!skipNotifications) { icon.setImage(createImage(notification.icon().toByteArray())); icon.displayMessage(notification.title(), notification.message(), toMessageType(notification.level())); } }
@Override public void send(Notification notification) { if (!skipNotifications) { icon.setImage(createImage(notification.icon().toByteArray())); icon.displayMessage(notification.title(), notification.message(), toMessageType(notification.level())); } }