Package com.formdev.flatlaf.ui
Class FlatNativeMacLibrary
- java.lang.Object
-
- com.formdev.flatlaf.ui.FlatNativeMacLibrary
-
public class FlatNativeMacLibrary extends Object
Native methods for macOS.Note: This is private API. Do not use!
Methods that use windows as parameter
For all methods that accept aWindowas parameter, the underlying macOS window must be already created, otherwise the method fails. You can use following to ensure this:
or invoke the method after packing the window. E.g.if( !window.isDisplayable() ) window.addNotify();window.pack();- Since:
- 3.3
-
-
Field Summary
Fields Modifier and Type Field Description static intBUTTONS_SPACING_DEFAULTstatic intBUTTONS_SPACING_LARGEstatic intBUTTONS_SPACING_MEDIUM
-
Constructor Summary
Constructors Constructor Description FlatNativeMacLibrary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RectanglegetWindowButtonsBounds(Window window)static booleanisLoaded()Checks whether native library is loaded/available.static booleanisWindowFullScreen(Window window)static booleansetWindowButtonsSpacing(Window window, int buttonsSpacing)static booleansetWindowRoundedBorder(Window window, float radius, float borderWidth, int borderColor)static booleantoggleWindowFullScreen(Window window)
-
-
-
Field Detail
-
BUTTONS_SPACING_DEFAULT
public static final int BUTTONS_SPACING_DEFAULT
- Since:
- 3.4
- See Also:
- Constant Field Values
-
BUTTONS_SPACING_MEDIUM
public static final int BUTTONS_SPACING_MEDIUM
- Since:
- 3.4
- See Also:
- Constant Field Values
-
BUTTONS_SPACING_LARGE
public static final int BUTTONS_SPACING_LARGE
- Since:
- 3.4
- See Also:
- Constant Field Values
-
-
Method Detail
-
isLoaded
public static boolean isLoaded()
Checks whether native library is loaded/available.Note: It is required to invoke this method before invoking any other method of this class. Otherwise, the native library may not be loaded.
-
setWindowRoundedBorder
public static boolean setWindowRoundedBorder(Window window, float radius, float borderWidth, int borderColor)
-
setWindowButtonsSpacing
public static boolean setWindowButtonsSpacing(Window window, int buttonsSpacing)
- Since:
- 3.4
-
isWindowFullScreen
public static boolean isWindowFullScreen(Window window)
- Since:
- 3.4
-
toggleWindowFullScreen
public static boolean toggleWindowFullScreen(Window window)
- Since:
- 3.4
-
-