2 * Sixth 3D engine. Author: Svjatoslav Agejenko.
3 * This project is released under Creative Commons Zero (CC0) license.
5 package eu.svjatoslav.sixth.e3d.gui.humaninput;
7 import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
9 import java.awt.event.KeyEvent;
12 * This is the process:
14 * 1. Component receives focus, perhaps because user clicked on it with the mouse.
15 * 2. Now component will receive user key press and release events from the keyboard.
16 * 3. Component loses focus. Perhaps user chose another component to interact with.
18 public interface KeyboardInputHandler {
21 * @return <code>true</code> if view needs to be re-rendered.
23 boolean focusLost(ViewPanel viewPanel);
26 * @return <code>true</code> if view needs to be re-rendered.
28 boolean focusReceived(ViewPanel viewPanel);
31 * @return <code>true</code> if view needs to be re-rendered.
33 boolean keyPressed(KeyEvent event, ViewPanel viewPanel);
36 * @return <code>true</code> if view needs to be re-rendered.
38 boolean keyReleased(KeyEvent event, ViewPanel viewPanel);