While planning AquaFX we found a way how to access Mac OS specific icons without using any closed APIs or Mac OS related classes. We wrapped this in a simple util class. While using this on a Mac you will receive images by the underlying OS. On any other OS the function will return “null”. We currently discuss if this should be part of AquaFX because this will be a part that is (under the hood) OS specific. All control skins of AquaFX are cross-platform. So you can skin your JavaFX application on Windows like a native Mac OS application (if you want :D ). Because we currently don’t know if this sources will ever be part of AquaFX I simple will post them here:
This enum contains all fetch able images that we found:
And here is the loader class:
Here is a overview of all icons that we have found:
If anyone knows more icon names that can be loaded by Mac OS please let us know ;)
Author
Hendrik Ebbers is a co-founder of Karakun AG and lives in Dortmund, Germany. He is the founder and leader of the Java User Group Dortmund and gives talks and presentations in user groups and conferences. His JavaFX book "Mastering JavaFX 8 Controls" was released 2014 by Oracle press. Hendrik is JavaOne Rockstar, JSR expert group member and Java Champion.