APIdia Launch Partner
Top Description Methods
java.awt.peer

public Interface TrayIconPeer

Known Direct Implementers
sun.awt.X11.XTrayIconPeer
Imports
java.awt.SystemTray, .TrayIcon

The peer interface for the TrayIcon. This doesn't need to be implemented if SystemTray#isSupported() returns false.

Method Summary

Modifier and TypeMethod and Description
public void
displayMessage(String
the message caption
caption
,
String
the actual message text
text
,
String
the message type
messageType
)

Displays a message at the tray icon.

public void
dispose()

Disposes the tray icon and releases and resources held by it.

public void
setToolTip(String
the tooltip to set
tooltip
)

Sets the tool tip for the tray icon.

public void
showPopupMenu(int
the X location for the popup menu
x
,
int
the Y location for the popup menu
y
)

Shows the popup menu of this tray icon at the specified position.

public void
updateImage()

Updates the icon image.

Method Detail

displayMessageback to summary
public void displayMessage(String caption, String text, String messageType)

Displays a message at the tray icon.

Parameters
caption:String

the message caption

text:String

the actual message text

messageType:String

the message type

See Also
TrayIcon#displayMessage(String, String, java.awt.TrayIcon.MessageType)
disposeback to summary
public void dispose()

Disposes the tray icon and releases and resources held by it.

See Also
TrayIcon#removeNotify()
setToolTipback to summary
public void setToolTip(String tooltip)

Sets the tool tip for the tray icon.

Parameters
tooltip:String

the tooltip to set

See Also
TrayIcon#setToolTip(String)
showPopupMenuback to summary
public void showPopupMenu(int x, int y)

Shows the popup menu of this tray icon at the specified position.

Parameters
x:int

the X location for the popup menu

y:int

the Y location for the popup menu

updateImageback to summary
public void updateImage()

Updates the icon image. This is supposed to display the current icon from the TrayIcon component in the actual tray icon.

See Also
TrayIcon#setImage(java.awt.Image), TrayIcon#setImageAutoSize(boolean)