Package java.awt

Examples of java.awt.TrayIcon



            // load icon image
            try {
                Image image = ImageIO.read(SystrayListener.class.getResource("systray.png"));
                icon = new TrayIcon(image,"Apache Marmotta",popup);
                icon.setImageAutoSize(true);
                tray.add(icon);

            } catch (IOException e) {
                log.error("SYSTRAY: could not load the logo for system tray",e);
View Full Code Here


        trayMenu.add(trayMenuAutorip);
        trayMenu.addSeparator();
        trayMenu.add(trayMenuExit);
        try {
            mainIcon = ImageIO.read(getClass().getClassLoader().getResource("icon.png"));
            trayIcon = new TrayIcon(mainIcon);
            trayIcon.setToolTip(mainFrame.getTitle());
            trayIcon.setImageAutoSize(true);
            trayIcon.setPopupMenu(trayMenu);
            SystemTray.getSystemTray().add(trayIcon);
            trayIcon.addMouseListener(new MouseAdapter() {
View Full Code Here

        SystemTray tray = SystemTray.getSystemTray();
        if (!SystemTray.isSupported()) {
            throw new RuntimeException("Tray Not Supported");
        }
        trayIcon = new TrayIcon(normal, "Couch Audio Recorder");
        final PopupMenu popup = createMenu();

        trayIcon.setPopupMenu(popup);
        try {
            tray.add(trayIcon);
View Full Code Here

    }

    private static void trySystemTrayIntegration() throws Exception {
        if (SystemTray.isSupported()) {
            SystemTray tray = SystemTray.getSystemTray();
            TrayIcon trayIcon = new TrayIcon(Utils.getImage("/assets/image/Icon.png"));

            trayIcon.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    if (e.getButton() == MouseEvent.BUTTON3) {
                        TRAY_MENU.setInvoker(TRAY_MENU);
                        TRAY_MENU.setLocation(e.getX(), e.getY());
                        TRAY_MENU.setVisible(true);
                    }
                }
            });
            trayIcon.setToolTip("ATLauncher");
            trayIcon.setImageAutoSize(true);

            tray.add(trayIcon);
        }
    }
View Full Code Here

                }
            });
            popup.add(hideItem);
           
           
            trayIcon = new TrayIcon(image, "SystemTray Demo", popup);
            trayIcon.setImageAutoSize(true);
            try {
                tray.add(trayIcon);
            } catch (AWTException ex) {
                Logger.getLogger(ParafiaView.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

    PopupMenu popupMenu = new PopupMenu();
    MenuItem exitItem = new MenuItem("Exit");
    exitItem.addActionListener(exitListener);
    popupMenu.add(exitItem);
   
    TrayIcon trayIcon = new TrayIcon(iconImage, "LFSLCD", popupMenu);
    trayIcon.setImageAutoSize(true);
   
    try {
      sysTray.add(trayIcon);
    }
    catch (AWTException e) {
View Full Code Here

    popupMenu.add(itemAdd);
    popupMenu.add(itemUpdate);
    popupMenu.addSeparator();
    popupMenu.add(itemClose);

    trayIcon = new TrayIcon(iconImage,
        "Приложение Amazon watcher.\nНажмите чтобы открыть.", popupMenu);

    trayIcon.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (isVisible())
View Full Code Here

public static void main(String[] args) throws Exception {
  UIManager.setLookAndFeel("com.jtattoo.plaf.hifi.HiFiLookAndFeel");
  ChatClient.readIni();
 
  icon = new TrayIcon(getIcon(),
        
            "SSTS ��� ������ 1.5", createPopupMenu());

    icon.addActionListener(new ActionListener() {
View Full Code Here

    exitItem.addActionListener(exitListener);
   
    popup.add(restoreItem);
    popup.add(exitItem);
   
    trayIcon = new TrayIcon(image, "StreamTracker", popup);
   
    trayIcon.setImageAutoSize(true);
   
    trayIcon.addMouseListener(new MouseAdapter() {
      @Override
View Full Code Here

                if(SystemTray.isSupported()){
                    SystemTray tray = SystemTray.getSystemTray();
                   
                    String icon = productDefinition.getIcon();
                    Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource(icon));
                    trayIcon = new TrayIcon(image, fullVersionName);
                    // Es redimensiona la imatge per tal que s'adapti a l'espai disponible
                    trayIcon.setImageAutoSize(true);
                    try{
                        tray.add(trayIcon);
                    }
View Full Code Here

TOP

Related Classes of java.awt.TrayIcon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.