This removes all menu entries from the tray icon menu AND removes the tray icon from the system tray! You will need to recreate ALL parts of the menu to see the tray icon + menu again!
()
| 176 | * You will need to recreate ALL parts of the menu to see the tray icon + menu again! |
| 177 | */ |
| 178 | @Override |
| 179 | public |
| 180 | void remove() { |
| 181 | super.remove(); |
| 182 | |
| 183 | // we have to tell our parent that we have been removed. |
| 184 | // This is HERE instead of inside the tray implementations because of visibility requirements. |
| 185 | |
| 186 | // This is internal and should NEVER be called by someone else or ANYWHERE else! |
| 187 | // this will run on the event dispatch |
| 188 | onRemoveEvent.run(); |
| 189 | } |
| 190 | } |