API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. TrayIcon View Source
Author(s)
Bino George
Denis Mikhalkin
Sharon Zakhour
Anton Tarasov
Since
1.6
Version
Serial
Hierarchy
 Object
      TrayIcon
Implements
Subclasses
Description
public class TrayIcon
  A TrayIcon object represents a tray icon that can be added to the system tray.
Constructors
private TrayIcon () throws UnsupportedOperationException HeadlessException SecurityException
public TrayIcon (Image image)
  Creates a TrayIcon with the specified image.
public TrayIcon (Image image, String tooltip)
  Creates a TrayIcon with the specified image and tooltip text.
public TrayIcon (Image image, String tooltip, PopupMenu popup)
  Creates a TrayIcon with the specified image, tooltip and popup menu.
Methods
Hide/Show inherited methods
publicsynchronized void addActionListener (ActionListener listener)
  Adds the specified action listener to receive ActionEvents from this TrayIcon.
publicsynchronized void addMouseListener (MouseListener listener)
  Adds the specified mouse listener to receive mouse events from this TrayIcon.
publicsynchronized void addMouseMotionListener (MouseMotionListener listener)
  Adds the specified mouse listener to receive mouse-motion events from this TrayIcon.
pack-private void addNotify () throws AWTException
pack-private void dispatchEvent (AWTEvent e)
public void displayMessage (String caption, String text, MessageType messageType)
  Displays a popup message near the tray icon.
public String getActionCommand ()
  Returns the command name of the action event fired by this tray icon.
publicsynchronized ActionListener getActionListeners ()
  Returns an array of all the action listeners registered on this TrayIcon.
pack-private int getID ()
public Image getImage ()
  Returns the current image used for this TrayIcon.
pack-private T getListeners (Class< T> listenerType)
publicsynchronized MouseListener getMouseListeners ()
  Returns an array of all the mouse listeners registered on this TrayIcon.
publicsynchronized MouseMotionListener getMouseMotionListeners ()
  Returns an array of all the mouse-motion listeners registered on this TrayIcon.
public PopupMenu getPopupMenu ()
  Returns the popup menu associated with this TrayIcon.
public Dimension getSize ()
  Returns the size, in pixels, of the space that the tray icon occupies in the system tray.
public String getToolTip ()
  Returns the tooltip string associated with this TrayIcon.
public boolean isImageAutoSize ()
  Returns the value of the auto-size property.
pack-private void processActionEvent (ActionEvent e)
pack-private void processEvent (AWTEvent e)
pack-private void processMouseEvent (MouseEvent e)
pack-private void processMouseMotionEvent (MouseEvent e)
publicsynchronized void removeActionListener (ActionListener listener)
  Removes the specified action listener.
publicsynchronized void removeMouseListener (MouseListener listener)
  Removes the specified mouse listener.
publicsynchronized void removeMouseMotionListener (MouseMotionListener listener)
  Removes the specified mouse-motion listener.
pack-private void removeNotify ()
public void setActionCommand (String command)
  Sets the command name for the action event fired by this tray icon.
pack-private void setID (int id)
public void setImage (Image image)
  Sets the image for this TrayIcon.
public void setImageAutoSize (boolean autosize)
  Sets the auto-size property.
public void setPopupMenu (PopupMenu popup)
  Sets the popup menu for this TrayIcon.
public void setToolTip (String tooltip)
  Sets the tooltip string for this TrayIcon.
Fields
Hide/Show inherited fields
pack-privatetransient ActionListener actionListener
pack-privatetransient MouseListener mouseListener
pack-privatetransient MouseMotionListener mouseMotionListener
Nested Classes
  TrayIcon.MessageType
The message type determines which icon will be displayed in the caption of the message, and a possible system sound a message may generate upon showing.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar