dustinkredmond / FXTrayIcon

Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.
MIT License
324 stars 25 forks source link

Support for RadioMenuItems #51

Closed azplanlos closed 1 year ago

azplanlos commented 2 years ago

It would be very nice to have support for CheckMenuItem and RadioMenuItem to allow users to toggle select in the tray icon menu.

EasyG0ing1 commented 2 years ago

@azplanlos - This is an interesting suggestion ... however, this won't work, and here is why...

JavaFX MenuItems are CONVERTED over to an AWT framework before they are added to the FXTrayIcon popup menu. And since they technically are not rendered as JavaFX objects, there is no hope of implementing a full-flavored JavaFX object within FXTray Icon.

Maybe one day, JavaFX will actually support the System Tray, but until that day comes, this is the best we got.

azplanlos commented 2 years ago

I implemented a version supporting CheckMenuItems and will create a pull request shortly.


Von: Michael Sims @.> Gesendet: Wednesday, May 11, 2022 4:01:17 PM An: dustinkredmond/FXTrayIcon @.> Cc: Andreas Zöllner @.>; Mention @.> Betreff: Re: [dustinkredmond/FXTrayIcon] Support for RadioMenuItems (Issue #51)

@azplanloshttps://github.com/azplanlos - This is an interesting suggestion ... however, this won't work, and here is why...

JavaFX MenuItems are CONVERTED over to an AWT framework before they are added to the FXTrayIcon popup menu. And since they technically are not rendered as JavaFX objects, there is no hope of implementing a full-flavored JavaFX object within FXTray Icon.

Maybe one day, JavaFX will actually support the System Tray, but until that day comes, this is the best we got.

— Reply to this email directly, view it on GitHubhttps://github.com/dustinkredmond/FXTrayIcon/issues/51#issuecomment-1123802516, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARE55UFMXDB4P5Z7WG5R3TVJO4S3ANCNFSM5VO2W24Q. You are receiving this because you were mentioned.Message ID: @.***>

EasyG0ing1 commented 2 years ago

@azplanlos - can't wait to see how you did it ... my experience with AWT is about on par with my lifetime skydiving hours ... which equates to about 20 minutes ... ☺

dustinkredmond commented 2 years ago

@azplanlos , I'm with @EasyG0ing1, I'm fairly versed with JavaFX, but my prior experience with AWT going into the development of this library leaves much to be desired. I look forward to your pull request, and am eager to see your new development. Thank you tons for your contribution!

EasyG0ing1 commented 2 years ago

@azplanlos

I implemented a version supporting CheckMenuItems and will create a pull request shortly.

How is that PR coming along?

azplanlos commented 2 years ago

Sorry, I have been busy with some other stuff. PR is on it's way.

dustinkredmond commented 1 year ago

Thanks all for the efforts to support CheckMenuItems, this looks great! Closing this issue for now since changes were merged to main.