开发者

SWT on OS X: how to add badges to the dock icon

开发者 https://www.devze.com 2023-03-21 04:00 出处:网络
IntelliJ IDEA, a Swing based application, for example, can show a progress indicator on the dock icon when compiling and checkmark when finishes. How can t开发者_高级运维his be done for the dock icon

IntelliJ IDEA, a Swing based application, for example, can show a progress indicator on the dock icon when compiling and checkmark when finishes. How can t开发者_高级运维his be done for the dock icon of an SWT application?


Have a look at the TaskBar and TaskItem classes of SWT.

It's basically:

display.getSystemTaskBar().getItem(shell).setProgress(66);

where display is the current display and shell is the window associated with the dock icon.

There's also a code snippet for how to access the task bar.

0

精彩评论

暂无评论...
验证码 换一张
取 消