Class CustomCaption
java.lang.Object
net.yetihafen.javafx.customcaption.CustomCaption
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
removeCustomization
(@NotNull javafx.stage.Stage stage) removes all customizations that were previously addedstatic boolean
setBorderColor
(javafx.stage.Stage stage, javafx.scene.paint.Color color) static boolean
setCaptionColor
(javafx.stage.Stage stage, javafx.scene.paint.Color color) Sets the Caption Color of the specified Stage to the specified Color this does only work since Win 11 Build 22000static boolean
setImmersiveDarkMode
(javafx.stage.Stage stage, boolean enabled) Enables/disables the Immersive Dark Mode for a specified stage officially only supported (documented) since Win 11 Build 22000static void
useForStage
(@NotNull javafx.stage.Stage stage) same asuseForStage(Stage, CaptionConfiguration)
but uses the default config (CaptionConfiguration.DEFAULT_CONFIG
)static void
useForStage
(@NotNull javafx.stage.Stage stage, @NotNull CaptionConfiguration config) Applies the custom caption with specified properties
-
Constructor Details
-
CustomCaption
public CustomCaption()
-
-
Method Details
-
useForStage
public static void useForStage(@NotNull @NotNull javafx.stage.Stage stage, @NotNull @NotNull CaptionConfiguration config) Applies the custom caption with specified properties- Parameters:
stage
- the Stage to apply the configconfig
- the configuration to apply
-
useForStage
public static void useForStage(@NotNull @NotNull javafx.stage.Stage stage) same asuseForStage(Stage, CaptionConfiguration)
but uses the default config (CaptionConfiguration.DEFAULT_CONFIG
)- Parameters:
stage
- the stage to apply the custom caption
-
removeCustomization
public static void removeCustomization(@NotNull @NotNull javafx.stage.Stage stage) removes all customizations that were previously added- Parameters:
stage
- the stage to remove the customizations
-
setCaptionColor
public static boolean setCaptionColor(javafx.stage.Stage stage, javafx.scene.paint.Color color) Sets the Caption Color of the specified Stage to the specified Color this does only work since Win 11 Build 22000- Parameters:
stage
- the Stage to change the Caption Colorcolor
- the Color to use- Returns:
- if the change was successful
-
setImmersiveDarkMode
public static boolean setImmersiveDarkMode(javafx.stage.Stage stage, boolean enabled) Enables/disables the Immersive Dark Mode for a specified stage officially only supported (documented) since Win 11 Build 22000- Parameters:
stage
- the stage to enable the Dark mode forenabled
- if immersive dark mod should be enabled- Returns:
- if Immersive Dark Mode could be enabled successfully
-
setBorderColor
public static boolean setBorderColor(javafx.stage.Stage stage, javafx.scene.paint.Color color)
-