Class ApplicationBuilder

java.lang.Object
dev.prozilla.pine.core.ApplicationBuilder

public final class ApplicationBuilder extends Object
Utility class for building applications.
See Also:
  • Constructor Details

    • ApplicationBuilder

      public ApplicationBuilder()
  • Method Details

    • setTitle

      public ApplicationBuilder setTitle(String title)
      Sets the title of the application's window. The default value is "Untitled".
    • setWindowSize

      public ApplicationBuilder setWindowSize(int width, int height)
      Sets the default width and height of the application's window. The default value is 800x600.
    • setWindowWidth

      public ApplicationBuilder setWindowWidth(int width)
      Sets the default width of the application's window. The default value is 800.
    • setWindowHeight

      public ApplicationBuilder setWindowHeight(int height)
      Sets the default height of the application's window. The default value is 600.
    • setInitialScene

      public ApplicationBuilder setInitialScene(Scene scene)
      Sets the initial scene of the application.
    • setTargetFps

      public ApplicationBuilder setTargetFps(int targetFps)
      Sets the target frames per second of the application. The default value is 60. Value 0 disables the fps cap.
      Parameters:
      targetFps - Frames per second
    • unsetTargetFps

      public ApplicationBuilder unsetTargetFps()
    • setIcons

      public ApplicationBuilder setIcons(String... icons)
      Sets the icons of the application's window.
      Parameters:
      icons - String paths of the icons relative to the resources directory.
    • setDefaultFont

      public ApplicationBuilder setDefaultFont(String fontPath)
    • setFullscreen

      public ApplicationBuilder setFullscreen(boolean fullscreen)
    • setShowWindowDecorations

      public ApplicationBuilder setShowWindowDecorations(boolean showWindowDecorations)
    • setEnableLogs

      public ApplicationBuilder setEnableLogs(boolean enableLogs)
    • build

      public Application build()
      Creates a new application.
    • buildAndRun

      public Application buildAndRun()
      Creates a new application and runs it.