Updated readability of the code.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / humaninput / KeyboardFocusStack.java
index 8e9aefb..53202db 100644 (file)
@@ -1,12 +1,7 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- *
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
  */
-
 package eu.svjatoslav.sixth.e3d.gui.humaninput;
 
 import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
@@ -16,16 +11,16 @@ import java.util.Stack;
 public class KeyboardFocusStack {
 
     private final ViewPanel viewPanel;
-    private WorldNavigationUserInputTracker defaultInputHandler = new WorldNavigationUserInputTracker();
-    private Stack<UserInputHandler> inputHandlers = new Stack<>();
-    private UserInputHandler currentUserInputHandler;
+    private final WorldNavigationUserInputTracker defaultInputHandler = new WorldNavigationUserInputTracker();
+    private final Stack<KeyboardInputHandler> inputHandlers = new Stack<>();
+    private KeyboardInputHandler currentUserInputHandler;
 
     public KeyboardFocusStack(final ViewPanel viewPanel) {
         this.viewPanel = viewPanel;
         pushFocusOwner(defaultInputHandler);
     }
 
-    public UserInputHandler getCurrentFocusOwner() {
+    public KeyboardInputHandler getCurrentFocusOwner() {
         return currentUserInputHandler;
     }
 
@@ -40,7 +35,7 @@ public class KeyboardFocusStack {
         currentUserInputHandler.focusReceived(viewPanel);
     }
 
-    public boolean pushFocusOwner(final UserInputHandler newInputHandler) {
+    public boolean pushFocusOwner(final KeyboardInputHandler newInputHandler) {
         boolean updateNeeded = false;
 
         if (currentUserInputHandler == newInputHandler)