Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a Windows Taskbar Jump-List in Java

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.

like image 370
Ky. Avatar asked Sep 23 '10 20:09

Ky.


People also ask

How do I show the taskbar icon jump list?

On the right pane, Start features a few options. Focus on the last one, Show recently opened items in Jump Lists on Start or Taskbar. Toggle it to On. Right-click on an opened program on Taskbar to check if the jump lists now appear.

How do you display a jump list?

To open a Jump List, right-click on any pinned program in the taskbar or the Start Menu. The list of recently opened files that shows up is a Jump List. In addition to files, Jump Lists may also show program-specific tasks and functions.

How do I create a jump list in Windows 10?

Step 1: Open the Settings app. Navigate to Personalization > Start. Step 2: Turn on or off Show recently opened items in Jump Lists on Start or taskbar option to enable or disable Jump Lists on Start and taskbar.

How do I increase the number of jump lists in Windows 11?

Right-click the Advanced key and select New > DWORD (32-bit) Value. Name the new DWORD value as JumpListItems_Maximum. Double-click JumpListItems_Maximum and change the Base value to Decimal. Enter the number of jump list items you want to appear in the Value data box.


1 Answers

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.

like image 116
Kate Gregory Avatar answered Oct 20 '22 15:10

Kate Gregory