Package view
Class MainWindow
java.lang.Object
view.MainWindow
Implementation of the game's main window.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Dimension
Returns the dimensions of the main window.boolean
Checks if the given value is a number.static void
repack()
Repacks the windowsstatic void
setDimension
(Dimension dimension) Sets the dimensions of the main window.void
Starts a new Map editorvoid
Starts a new Gamestatic void
startMainMenu
(JFrame frame) Starts main menu.
-
Constructor Details
-
MainWindow
public MainWindow()Constructs a MainWindow instance.
-
-
Method Details
-
startMainMenu
Starts main menu.- Parameters:
frame
- the parent frame
-
startGame
public void startGame()Starts a new Game -
isNumeric
Checks if the given value is a number.- Parameters:
strNum
- the string to check- Returns:
- true if the string is a number
-
startEditor
public void startEditor()Starts a new Map editor -
repack
public static void repack()Repacks the windows -
getDimension
Returns the dimensions of the main window.- Returns:
- the dimensions of the main window
-
setDimension
Sets the dimensions of the main window.- Parameters:
dimension
- the dimensions of the main window
-