Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jeans.trayicon
Class TrayIconPopup

    java.lang.Object
      com.jeans.trayicon.TrayIconPopup

All Implemented Interfaces:
  com.jeans.trayicon.TrayIconPopupItem

public class TrayIconPopup
extends java.lang.Object
implements com.jeans.trayicon.TrayIconPopupItem

Constructor Summary
`TrayIconPopup()` Create main popup menu (use for WindowsTrayIcon.setPopup())
`TrayIconPopup(java.lang.String item)` Create sub menu (use for TrayIconPopup.addMenuItem()) Param item = the name of the new submenu

Method Summary
`void` | `addMenuItem(com.jeans.trayicon.TrayIconPopupItem item)` Add menu item to popup (sub)menu Param item = the item to add (instance of TrayIconPopup/TrayIconPopupSimpleItem/TrayIconPopupCh..)
`int` | `getNbLevels()` Return submenu depth - used by WindowsTrayIcon.setPopup()/initPopup()
`boolean` | `onSelected(int menuId)` Callback when user selects menu item (find it by comparing menu id's) Param menuId = the id of the selected item
`void` | `setTrayIcon(WindowsTrayIcon trayicon, int id, int level)` Create menu in native library - used by WindowsTrayIcon.setPopup() Param trayicon = the owner of this menu Param id = the icon's id Param level = the level (submenu depth)

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TrayIconPopup

    public TrayIconPopup()

  Create main popup menu (use for WindowsTrayIcon.setPopup())

### TrayIconPopup

    public TrayIconPopup(java.lang.String item)

  Create sub menu (use for TrayIconPopup.addMenuItem()) Param item = the name of the new submenu

Method Detail

### addMenuItem

    public void addMenuItem(com.jeans.trayicon.TrayIconPopupItem item)

  Add menu item to popup (sub)menu Param item = the item to add (instance of TrayIconPopup/TrayIconPopupSimpleItem/TrayIconPopupCh..)

### getNbLevels

    public int getNbLevels()

  Return submenu depth - used by WindowsTrayIcon.setPopup()/initPopup()

  Specified by:
    `getNbLevels` in interface `com.jeans.trayicon.TrayIconPopupItem`

### onSelected

    public boolean onSelected(int menuId)

  Callback when user selects menu item (find it by comparing menu id's) Param menuId = the id of the selected item

  Specified by:
    `onSelected` in interface `com.jeans.trayicon.TrayIconPopupItem`

### setTrayIcon

    public void setTrayIcon(WindowsTrayIcon trayicon,
                            int id,
                            int level)

  Create menu in native library - used by WindowsTrayIcon.setPopup() Param trayicon = the owner of this menu Param id = the icon's id Param level = the level (submenu depth)

  Specified by:
    `setTrayIcon` in interface `com.jeans.trayicon.TrayIconPopupItem`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD