Class MacUtilities

java.lang.Object
org.tentackle.fx.MacUtilities

@Service(MacUtilities.class) public class MacUtilities extends Object
Utilities for Mac OS X.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the MacUtilities.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javafx.scene.image.ImageView
    createImageView(org.kordamp.ikonli.javafx.FontIcon fontIcon)
    Creates an ImageView from a FontIcon.
    The singleton.
    protected void
    toSystemMenu(javafx.scene.control.Menu menu)
    Converts FontIcons to ImageViews.
    void
    toSystemMenuBar(javafx.scene.control.MenuBar menuBar)
    Installs a menubar as a system menu bar.
    Used on macOS to convert FontIcons to ImageViews since font icons cannot be displayed in the system menu.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MacUtilities

      public MacUtilities()
      Creates the MacUtilities.
  • Method Details

    • getInstance

      public static MacUtilities getInstance()
      The singleton.
      Returns:
      the singleton
    • toSystemMenuBar

      public void toSystemMenuBar(javafx.scene.control.MenuBar menuBar)
      Installs a menubar as a system menu bar.
      Used on macOS to convert FontIcons to ImageViews since font icons cannot be displayed in the system menu.
    • toSystemMenu

      protected void toSystemMenu(javafx.scene.control.Menu menu)
      Converts FontIcons to ImageViews.
      Parameters:
      menu - the menu
    • createImageView

      protected javafx.scene.image.ImageView createImageView(org.kordamp.ikonli.javafx.FontIcon fontIcon)
      Creates an ImageView from a FontIcon.
      Parameters:
      fontIcon - the font icon
      Returns:
      the image view