MailsterSWTTrayItem.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:Mailster 作者:
public static void showTrayItemTooltipMessage(final TrayItem trayItem, final String title, final String message)
{
    final Shell sShell = MailsterSWT.getInstance().getShell();
    Display.getDefault().asyncExec(new Thread() {
        public void run()
        {
            final ToolTip tip = new ToolTip(sShell, SWT.BALLOON | SWT.ICON_INFORMATION);
            tip.setMessage(message);
            tip.setText(title);

            if (Display.getDefault().getSystemTray() != null)
                trayItem.setToolTip(tip);
            else
                tip.setLocation(sShell.getLocation());

            tip.setVisible(true);
            tip.setAutoHide(ConfigurationManager.CONFIG_STORE.getBoolean(ConfigurationManager.AUTO_HIDE_NOTIFICATIONS_KEY));
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号