Package pvzclone.view.impl
Class SwingViewImpl
java.lang.Object
pvzclone.view.impl.SwingViewImpl
- All Implemented Interfaces:
View
Implementation of the View.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intApplication Height.static final StringApplication Title.static final intApplication Width.static final StringGame Panel's Textual Constraint.static final StringLevel Panel's Textual Constraint.static final StringMenu Panel's Textual Constraint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe End Game handler.Returns the Application'sController.getScale()Returns the scaled X and Y relative to their original dimensions.Returns the actual scene constraint.voidSets a new Scene.voidupdate()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:
getControllerin interfaceView- Returns:
- the Application's
Controller.
-
setScene
Sets a new Scene. -
getSceneConstraint
Returns the actual scene constraint.- Specified by:
getSceneConstraintin interfaceView- Returns:
- the current scene constraint.
-
update
public void update()Updates the View. -
endGame
Description copied from interface:ViewThe End Game handler. -
getScale
Description copied from interface:ViewReturns the scaled X and Y relative to their original dimensions. If the window dimension was not modified, their value should be both 1.
-