Java RCP / SWT – Eclipse RCP中的“Android Toast like”对话框
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Java RCP / SWT – Eclipse RCP中的“Android Toast like”对话框,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1157字,纯文字阅读大概需要2分钟。
内容图文
有没有人知道是否存在一些弹出窗口的实现,比如Android:TOAST?
解决方法:
通知是Mylyn commons的一部分.
要集成它们,请将http://download.eclipse.org/mylyn/releases/latest中的Mylyn Commons Notifications功能添加到目标平台定义中.相关的捆绑包是
> org.eclipse.mylyn.commons.notifications.ui
> org.eclipse.mylyn.commons.notifications.core.
您可以将类别和事件添加到通知扩展点,如下所示:
</extension>
<extension
point="org.eclipse.mylyn.commons.notifications.ui.notifications">
<category
icon="icons/obj16/repository.gif"
id="myNotificationCategory"
label="My Category">
</category>
<event
categoryId="myNotificationCategory"
icon="icons/obj16/some-image.gif"
id="myEvent"
label="Hello World">
<defaultHandler
sinkId="org.eclipse.mylyn.commons.notifications.sink.Popup">
</defaultHandler>
<description>
This is the description of the event.
</description>
</event>
</extension>
要触发通知,请使用NotificationService,如下所示:
AbstractUiNotification notification = ...
NotificationsUi.getService().notify( asList( notification ) );
通知必须是AbstractUiNotification的子类,其中传递给构造函数的eventId必须与扩展名中的eventId匹配.
通知插件还会在General>下添加首选项页面.允许用户选择应显示哪些通知的通知.
内容总结
以上是互联网集市为您收集整理的Java RCP / SWT – Eclipse RCP中的“Android Toast like”对话框全部内容,希望文章能够帮你解决Java RCP / SWT – Eclipse RCP中的“Android Toast like”对话框所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。