Class Controller
java.lang.Object
java.awt.event.KeyAdapter
nz.ac.vuw.ecs.swen225.gp6.app.utilities.Controller
- All Implemented Interfaces:
KeyListener,EventListener
Package-private class for Controller class for the App class. Handles all the controllable key
actions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe key object that represents the key pressed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidupdate()Updates the key bindings to the current setting.Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
-
Constructor Details
-
Controller
Constructor for the Controller class. Initializes the actions and key bindings.- Parameters:
app- The App object that the controller will be controlling.
-
-
Method Details
-
update
public void update()Updates the key bindings to the current setting. -
keyPressed
- Specified by:
keyPressedin interfaceKeyListener- Overrides:
keyPressedin classKeyAdapter
-