Package pvzclone.view.impl
Class SwingViewImpl
java.lang.Object
pvzclone.view.impl.SwingViewImpl
- All Implemented Interfaces:
View
Implementation of the View.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Application Height.static final String
Application Title.static final int
Application Width.static final String
Game Panel's Textual Constraint.static final String
Level Panel's Textual Constraint.static final String
Menu Panel's Textual Constraint. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
The End Game handler.Returns the Application'sController
.getScale()
Returns the scaled X and Y relative to their original dimensions.Returns the actual scene constraint.void
Sets a new Scene.void
update()
Updates the View.
-
Field Details
-
APPLICATION_WIDTH
public static final int APPLICATION_WIDTHApplication Width.- See Also:
-
APPLICATION_HEIGHT
public static final int APPLICATION_HEIGHTApplication Height.- See Also:
-
APPLICATION_TITLE
Application Title.- See Also:
-
MENU_PANEL_CONSTRAINT
Menu Panel's Textual Constraint.- See Also:
-
LEVEL_PANEL_CONSTRAINT
Level Panel's Textual Constraint.- See Also:
-
GAME_PANEL_CONSTRAINT
Game Panel's Textual Constraint.- See Also:
-
-
Constructor Details
-
SwingViewImpl
View Implementation Constructor.- Parameters:
controller
- the Application's Controller.
-
-
Method Details
-
getController
Returns the Application'sController
.- Specified by:
getController
in interfaceView
- Returns:
- the Application's
Controller
.
-
setScene
Sets a new Scene. -
getSceneConstraint
Returns the actual scene constraint.- Specified by:
getSceneConstraint
in interfaceView
- Returns:
- the current scene constraint.
-
update
public void update()Updates the View. -
endGame
Description copied from interface:View
The End Game handler. -
getScale
Description copied from interface:View
Returns the scaled X and Y relative to their original dimensions. If the window dimension was not modified, their value should be both 1.
-