Class WindowBuilder
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.ui.WindowBuilder
-
public class WindowBuilder extends Object
A class for building windows. Each window builder can only build one window.- Author:
- Tim Neumann
-
-
Constructor Summary
Constructors Constructor Description WindowBuilder()
Create a new WindowBuilder.WindowBuilder(double dpiScale)
Create a new WindowBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildWindow()
Actually build the window.GameWindow
getBuiltWindow()
Get the window that was built.boolean
hasBuiltWindow()
Get whether the window has been built.void
setGraphicsSettings(boolean useDoubleBuffering, boolean syncToScreen)
Set the graphics settings of the playfield drawer.void
setTitle(String title)
Set the title of the new window.
-
-
-
Method Detail
-
setTitle
public void setTitle(String title)
Set the title of the new window.This method can only be called before building the window. To change the title after building the window, call
GameWindow.setWindowTitle(String)
on the resulting window.- Parameters:
title
- The title to set
-
setGraphicsSettings
public void setGraphicsSettings(boolean useDoubleBuffering, boolean syncToScreen)
Set the graphics settings of the playfield drawer.This method can only be called before building the window. To change the title after building the window, call
PlayfieldDrawer.setDoubleBuffering(boolean)
andPlayfieldDrawer.setSyncToScreen(boolean)
on the resulting window's playfield drawer.- Parameters:
useDoubleBuffering
- true (default) uses doubleBuffering when rendering changes on the playfield.syncToScreen
- true (default) actively tries to sync the updated graphics to the screen after rendering changes on the playfield.
-
buildWindow
public void buildWindow()
Actually build the window.This can only be called once for each window builder.
-
hasBuiltWindow
public boolean hasBuiltWindow()
Get whether the window has been built.- Returns:
- true if and only if the window has been built
-
getBuiltWindow
public GameWindow getBuiltWindow()
Get the window that was built.This method can only be called after
buildWindow()
.- Returns:
- The created
GameWindow
-
-