Java Code Examples for org.eclipse.swt.widgets.Display#getSystemTray()

The following examples show how to use org.eclipse.swt.widgets.Display#getSystemTray() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: logbook   File:    License: MIT License 5 votes vote down vote up
 * トレイアイコンを追加します
 * @param display
 * @return
private TrayItem addTrayItem(final Display display) {
    // トレイアイコンを追加します
    Tray tray = display.getSystemTray();
    TrayItem item = new TrayItem(tray, SWT.NONE);
    Image image = display.getSystemImage(SWT.ICON_INFORMATION);
    item.setToolTipText(AppConstants.NAME + AppConstants.VERSION);
    item.addListener(SWT.Selection, new TraySelectionListener(;
    item.addMenuDetectListener(new TrayItemMenuListener(this.getShell()));
    return item;
Example 2
Source Project: BiglyBT   File:    License: GNU General Public License v2.0 4 votes vote down vote up
public TraySWT(Display display) {
	tray = display.getSystemTray();