用 Java 制作 Windows 任务栏跳转列表

发布于 2024-09-24 09:07:23 字数 494 浏览 8 评论 0原文

我知道以下内容,并且想知道是否可以将它们组合起来使 Java 在 Windows 中使用跳转列表:

  1. 当右键单击任务栏图标时,Windows 显示支持程序的跳转列表
  2. C++、C#、F# 和 VB 支持此功能本机(如此处所示)
  3. Java 可以使用 JNA 导入本机功能(如此处所示)

任何人都可以借用经验来帮助我为Java应用程序?

J7Goodies 库将无法工作,因为它不再存在。

I know the following things, and was wondering if they can be combined to make Java use jump-lists in Windows:

  1. Windows displays Jump-Lists for supporting programs when a taskbar icon is right-clicked
  2. C++, C#, F#, and VB support this natively (as shown here)
  3. Java can import native capabilities using the JNA (as shown here)

Anybody have experience they can lend to help me create a jump-list for a Java app?

The J7Goodies library won't work, as it no longer exists.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

末が日狂欢 2024-10-01 09:07:23

“本机”这个词有点夸大了情况。 WPF 提供跳转列表支持。这与 C# 提供的不同。 (对于 Windows 窗体用户,有 Code Pack,它是一组托管包装器。)MFC 提供跳转列表支持,这与 C++ 提供的支持不同。无论如何,这里发生了两件事。一种是将您最近打开的文件添加到该跳转列表中,在某些情况下您可以免费获得。另一种是将任意文件(通常是起点模板等)添加到跳转列表中。

要将文件添加到最近/频繁列表中,请调用 SHAddToRecentDocs,尽管您可能不必这样做,例如,您使用通用文件对话框控件打开文件,和/或用户双击文件来启动您的应用程序并打开它们(您的文件类型为已注册。)很多人建议为了安全起见无论如何都要调用它。要将任何旧内容添加到跳转列表,请参阅 http:// /msdn.microsoft.com/en-us/library/dd378402(v=VS.85).aspx

我忘记了如何从 Java 中调用它们,但我希望它们可以帮助您入门。

The word "natively" is overstating the case a bit. WPF provides jump list support. That's not the same as C# providing it. (For Windows Forms people there's the Code Pack which is a set of managed wrappers.) And MFC provides jump list support which is also not the same as C++ providing it. Anyway, there are two things going on here. One is adding files you opened recently to that jumplist, which under some circumstances you can get for free. The other is adding arbitrary files (typically starting point templates etc) to the jumplist.

To add a file to the recent/frequent list, you call SHAddToRecentDocs, though you may not have to if, for example, you use the Common File Dialog control to open files, and/or the user double-clicks files to launch your app and open them (you have the file type registered.) Lots of folks suggest calling it anyway to be on the safe side. To add any old thing to the jumplist see http://msdn.microsoft.com/en-us/library/dd378402(v=VS.85).aspx.

How to call those from Java, I forget, but I hope they get you started.

沉睡月亮 2024-10-01 09:07:23

有一个 Java 库为 Java 提供了新的 Windows 7 功能。它被称为 J7Goodies,由 Strix 代码。您可以用它创建自己的跳转列表。

There is a Java library providing the new Windows 7 features for Java. It's called J7Goodies by Strix Code. You can create your own jump lists with it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文