Code refactoring
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / humaninput / KeyboardFocusStack.java
index 7690bab..9a1cd6d 100644 (file)
@@ -1,12 +1,7 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2018, 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;
@@ -17,15 +12,15 @@ public class KeyboardFocusStack {
 
     private final ViewPanel viewPanel;
     private WorldNavigationUserInputTracker defaultInputHandler = new WorldNavigationUserInputTracker();
-    private Stack<UserInputHandler> inputHandlers = new Stack<>();
-    private UserInputHandler currentUserInputHandler;
+    private 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)