|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component com.jniwrapper.win32.shell.TrayIcon
public class TrayIcon
TrayIcon class enables to add/modify a tray icon and its properties such as hint, icon, tooltip, callout.
You can register TrayIcon listeners for receiving mouse events (WM_MOUSEMOVE, WM_LBUTTONDOWN etc.)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
WM_RESTORE_TRAY
|
static int |
WM_TRAY
|
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
TrayIcon()
|
|
TrayIcon(Icon icon)
Creates an instance of TrayIcon with a specified icon. |
Method Summary | |
---|---|
void |
addTrayListener(BalloonListener listener)
Adds a balloon events listener for the specified tray icon. |
void |
addTrayListener(java.awt.event.MouseListener listener)
Adds a standard mouse listener for the tray icon. |
void |
addTrayListener(TrayIconListener listener)
Adds a specified tray icon listener. |
void |
dispose()
Disposes a tray icon. |
javax.swing.JPopupMenu |
getPopupMenu()
Returns the set popup menu for the tray icon or null if it is not present. |
void |
removePopupMenu()
Removes the tray icon popup menu. |
void |
removeTrayListener(BalloonListener listener)
Removes specified balloon events listener. |
void |
removeTrayListener(java.awt.event.MouseListener listener)
Removes specified mouse listener. |
void |
removeTrayListener(TrayIconListener listener)
Removes a specified listener. |
void |
setIcon(Icon icon)
Sets an icon in the system tray. |
void |
setPopupMenu(javax.swing.JPopupMenu popupMenu)
Sets up a popup menu for the tray icon. |
void |
setToolTip(java.lang.String tip)
Sets up a tooltip for the tray icon. |
void |
setVisible(boolean visible)
Shows or hides an icon in the system tray. |
void |
showMessage(TrayMessage value)
Sets and shows a balloon message. |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int WM_TRAY
public static final int WM_RESTORE_TRAY
Constructor Detail |
---|
public TrayIcon()
public TrayIcon(Icon icon)
icon
- Method Detail |
---|
public void setIcon(Icon icon)
icon
- public void showMessage(TrayMessage value)
value
- is a container of the ballon message attributes.public void dispose()
public void setToolTip(java.lang.String tip)
tip
- is a message to be shown in the tooltip.public void setPopupMenu(javax.swing.JPopupMenu popupMenu)
popupMenu
- the popup menu to be set up.public javax.swing.JPopupMenu getPopupMenu()
public void removePopupMenu()
public void addTrayListener(TrayIconListener listener)
listener
- public void addTrayListener(java.awt.event.MouseListener listener)
listener
- public void addTrayListener(BalloonListener listener)
listener
- public void removeTrayListener(TrayIconListener listener)
listener
- public void removeTrayListener(java.awt.event.MouseListener listener)
listener
- public void removeTrayListener(BalloonListener listener)
listener
- public void setVisible(boolean visible)
setVisible
in class java.awt.Component
visible
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |