public class CustomStageBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.awt.Dimension |
DIMENSION |
Constructor and Description |
---|
CustomStageBuilder() |
Modifier and Type | Method and Description |
---|---|
CustomStage |
build()
Produces the CustomStage object as for the definitions given by the user
|
CustomStageBuilder |
removeNavigationPane()
Deprecated.
this method does not need to be called from this builder class after v1.1.0
Removes the left navigation pane of the window
|
CustomStageBuilder |
setActionIcons(javafx.scene.image.Image close,
javafx.scene.image.Image minimize,
javafx.scene.image.Image maximize,
javafx.scene.image.Image restore)
Changes the default icons for the action buttons on Title-bar
|
CustomStageBuilder |
setButtonColor(java.lang.String color)
Changes the color of the close, minimize and maximize/restore buttons
|
CustomStageBuilder |
setButtonHoverColor(java.lang.String color)
Changes the color of the minimize and maximize/restore buttons on hover (close button's color won't change)
|
CustomStageBuilder |
setDimensions(double minWidth,
double minHeight,
double maxWidth,
double maxHeight)
Sets the maximum and minimum resizing values for the window.
|
CustomStageBuilder |
setIcon(java.lang.String path)
The icon for the window to be showed on taskbar
|
CustomStageBuilder |
setNavigationPane(NavigationType type,
javafx.scene.layout.Pane navigationPane)
Sets a static navigation pane (to the pointed location) attaching the pane given
|
CustomStageBuilder |
setNavigationPane(Style style,
NavigationType type,
javafx.scene.layout.Pane navigationPane)
Sets a static/dynamic navigation pane (to the pointed location) attaching the pane given
|
CustomStageBuilder |
setNavigationPane(Style style,
NavigationType type,
javafx.scene.layout.Pane navigationPane,
double verticalSpace,
double horizontalSpace,
boolean isSpaceDivided)
Sets the given navigationPane to the CustomStage as per its definitions (parameters).
|
CustomStageBuilder |
setStyleSheet(java.net.URL path)
Style the CustomStage as to the user given stylesheet
|
CustomStageBuilder |
setTitleColor(java.lang.String color)
Changes the color of the color in title-bar
|
CustomStageBuilder |
setWindowColor(java.lang.String color)
Changes the color of the window
|
CustomStageBuilder |
setWindowTitle(java.lang.String title)
Sets the title of the title-bar
|
public CustomStageBuilder() throws java.io.IOException
java.io.IOException
public CustomStageBuilder setWindowTitle(java.lang.String title)
title
- title for the windowpublic CustomStageBuilder setIcon(java.lang.String path)
path
- path of the imagepublic CustomStageBuilder setWindowColor(java.lang.String color)
color
- name/hex/rgb/rgba value of the colorpublic CustomStageBuilder setTitleColor(java.lang.String color)
color
- name/hex/rgb/rgba value of the colorpublic CustomStageBuilder setButtonColor(java.lang.String color)
color
- name/hex/rgb/rgba value of the colorpublic CustomStageBuilder setButtonHoverColor(java.lang.String color)
color
- name/hex/rgb/rgba value of the colorpublic CustomStageBuilder setActionIcons(@Nullable javafx.scene.image.Image close, @Nullable javafx.scene.image.Image minimize, @Nullable javafx.scene.image.Image maximize, @Nullable javafx.scene.image.Image restore)
close
- Icon for close buttonminimize
- Icon for minimize buttonmaximize
- Window maximize (maximize button) iconrestore
- Window restore (maximize button) iconpublic CustomStageBuilder setDimensions(double minWidth, double minHeight, double maxWidth, double maxHeight)
minWidth
- Minimum width of windowminHeight
- Minimum height of windowmaxWidth
- Maximum width of windowmaxHeight
- Maximum height of windowpublic CustomStageBuilder setStyleSheet(java.net.URL path)
path
- URL of the stylesheetpublic CustomStageBuilder removeNavigationPane()
public CustomStageBuilder setNavigationPane(NavigationType type, javafx.scene.layout.Pane navigationPane)
type
- where the navigationPane should be placed on the window (LEFT/RIGHT/TOP/BOTTOM)navigationPane
- root pane of the navigation (fxml file)public CustomStageBuilder setNavigationPane(Style style, NavigationType type, javafx.scene.layout.Pane navigationPane)
style
- whether the navigationPane is dynamic or statictype
- where the navigationPane should be placed on the window (LEFT/RIGHT/TOP/BOTTOM)navigationPane
- root pane of the navigation (fxml file)public CustomStageBuilder setNavigationPane(Style style, NavigationType type, javafx.scene.layout.Pane navigationPane, double verticalSpace, double horizontalSpace, boolean isSpaceDivided)
Sets the given navigationPane to the CustomStage as per its definitions (parameters). If the Style is Style.STATIC then the usual built-in static navigationPane would be generated and also, verticalSpace, horizontalSpace and isSpaceDivided values will be ignored.
If the Style is Style.STATIC then all the values are taken and will generate a dynamic navigationPane as for its given definitions.
style
- whether the navigationPane is a dynamic or statictype
- The location where the navigationPane should be placed (top/bottom/left/right) on the window.navigationPane
- The root pane which should be used as the navigationPaneverticalSpace
- This value states that, if the navigationPane is given as NavigationType.LEFT / NavigationType.RIGHT and
some space is required to be left without consuming the full height of the window (If the NavigationType
is set to be TOP/BOTTOM then this value is ignored). verticalSpace = 0 means the navigationPane will consume
the full height of the window.horizontalSpace
- This value states that, if the navigationPane is given as NavigationType.TOP / NavigationType.BOTTOM and
some space is required to be left without consuming the full width of the window (If the NavigationType
is set to be LEFT/RIGHT then this value is ignored). horizontalSpace = 0 means the navigationPane will consume
the full width of the window.isSpaceDivided
- States whether the given verticalSpace/horizontalSpace needs to be divided from top/bottom (for LEFT and RIGHT
NavigationType) or from left/right (for TOP and BOTTOM NavigationType). isSpaceDivided = false , states that
for LEFT/RIGHT NavigationType, the given verticalSpace will be allocated from the top only;
for TOP/BOTTOM NavigationType, the given horizontalSpace will only be allocated from left.public CustomStage build()