Package dev.prozilla.pine.core
Class ApplicationBuilder
java.lang.Object
dev.prozilla.pine.core.ApplicationBuilder
Utility class for building applications.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new application.Creates a new application and runs it.setDefaultFont
(String fontPath) setEnableLogs
(boolean enableLogs) setFullscreen
(boolean fullscreen) Sets the icons of the application's window.setInitialScene
(Scene scene) Sets the initial scene of the application.setShowWindowDecorations
(boolean showWindowDecorations) setTargetFps
(int targetFps) Sets the target frames per second of the application.Sets the title of the application's window.setWindowHeight
(int height) Sets the default height of the application's window.setWindowSize
(int width, int height) Sets the default width and height of the application's window.setWindowWidth
(int width) Sets the default width of the application's window.
-
Constructor Details
-
ApplicationBuilder
public ApplicationBuilder()
-
-
Method Details
-
setTitle
Sets the title of the application's window. The default value is"Untitled"
. -
setWindowSize
Sets the default width and height of the application's window. The default value is800x600
. -
setWindowWidth
Sets the default width of the application's window. The default value is800
. -
setWindowHeight
Sets the default height of the application's window. The default value is600
. -
setInitialScene
Sets the initial scene of the application. -
setTargetFps
Sets the target frames per second of the application. The default value is60
. Value0
disables the fps cap.- Parameters:
targetFps
- Frames per second
-
unsetTargetFps
-
setIcons
Sets the icons of the application's window.- Parameters:
icons
- String paths of the icons relative to the resources directory.
-
setDefaultFont
-
setFullscreen
-
setShowWindowDecorations
-
setEnableLogs
-
build
Creates a new application. -
buildAndRun
Creates a new application and runs it.
-