Class NameInputController
java.lang.Object
ch.ladestation.connectncharge.controller.pagecontroller.end.NameInputController
- All Implemented Interfaces:
PageController,ViewMixin<Game,,ControllerBase<Game>> javafx.fxml.Initializable
public class NameInputController
extends Object
implements javafx.fxml.Initializable, ViewMixin<Game,ControllerBase<Game>>, PageController
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.ladestation.connectncharge.util.mvcbase.ViewMixin
ViewMixin.ActionTrigger<V>, ViewMixin.Converter<V>, ViewMixin.Updater<V,P> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringvoidgoBackToEndScreen(javafx.scene.input.MouseEvent mouseEvent) voidgoToHighscoreScreen(javafx.event.ActionEvent actionEvent) voidvoidinitialize(URL url, ResourceBundle resourceBundle) voiddefault voidEverything that needs to be done to initialize the UI-part itself.voidkeyPressed(javafx.event.ActionEvent actionEvent) voidthe method name says it allvoidsetController(ApplicationController controller) static voidsetCurrentName(String currentNameParam) default voidsetupModelToUiBindings(Game model) Whenever an 'ObservableValue' in 'model' changes, the UI must be updated.default voidsetupUiToActionBindings(ControllerBase<Game> controller) Triggering some action on Controller if the user interacts with the UI.voiddefault voidstartUp(ControllerBase<Game> controller) At the Startup, this method gets called.voidtoggleCapsLock(javafx.event.ActionEvent actionEvent) voidtoggleDelete(javafx.event.ActionEvent actionEvent) voidtoggleSpace(javafx.event.ActionEvent actionEvent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.ladestation.connectncharge.util.mvcbase.ViewMixin
addStylesheetFiles, init, loadFonts, onChangeOf, onChangeOf, onChangeOf, onChangeOf
-
Constructor Details
-
NameInputController
public NameInputController()
-
-
Method Details
-
goBackToEndScreen
- Throws:
IOException
-
initialize
- Specified by:
initializein interfacejavafx.fxml.Initializable
-
goToHighscoreScreen
- Throws:
IOException
-
keyPressed
public void keyPressed(javafx.event.ActionEvent actionEvent) -
toggleCapsLock
public void toggleCapsLock(javafx.event.ActionEvent actionEvent) -
toggleDelete
public void toggleDelete(javafx.event.ActionEvent actionEvent) -
toggleSpace
public void toggleSpace(javafx.event.ActionEvent actionEvent) -
showKeyboard
public void showKeyboard() -
hideKeyboard
public void hideKeyboard() -
setController
- Specified by:
setControllerin interfacePageController
-
initializeParts
public void initializeParts() -
layoutParts
public void layoutParts()Description copied from interface:ViewMixinthe method name says it all- Specified by:
layoutPartsin interfaceViewMixin<Game,ControllerBase<Game>>
-
getStylesheets
- Specified by:
getStylesheetsin interfaceViewMixin<Game,ControllerBase<Game>>
-
getCurrentName
-
setCurrentName
-
initializeSelf
default void initializeSelf()Everything that needs to be done to initialize the UI-part itself.For GUIs loading stylesheet-files or additional fonts are typical examples.
-
setupUiToActionBindings
Triggering some action on Controller if the user interacts with the UI.There's no need to have access to model for this task.
All EventHandlers will call a single method on the Controller.
If you are about to call more than one method, you should introduce a new method on Controller.
-
setupModelToUiBindings
Whenever an 'ObservableValue' in 'model' changes, the UI must be updated.There's no need to have access to controller for this task.
Register all necessary observers here.
-
startUp
At the Startup, this method gets called.Perfect, if a function in the controller or in the pui needs to be run exactly once.
-