public interface WindowListener
Window
. If you want to
listen to window events but don't care about all the different event types, you can extend
the WindowAdapter
class instead.Window
,
WindowAdapter
Modifier and Type | Method and Description |
---|---|
void |
onFocusChanged(Window window,
Interactable fromComponent,
Interactable toComponent)
Called by the window whenever the input focus has changed from one component to another
|
void |
onUnhandledKeyboardInteraction(Window window,
Key key)
Called by the window when there was a keyboard input event that no component could handle
|
void |
onWindowClosed(Window window)
Called by the window when it has been closed and removed from the
GUIScreen . |
void |
onWindowInvalidated(Window window)
Called when a window has been internally modified and needs to be repainted by the GUI system.
|
void |
onWindowShown(Window window)
Called by the window when it has been added and showed up on a
GUIScreen . |
void onWindowInvalidated(Window window)
window
- Window that was invalidatedvoid onWindowShown(Window window)
GUIScreen
.window
- Window that has been displayedvoid onWindowClosed(Window window)
GUIScreen
.window
- Window that was closed and removedvoid onUnhandledKeyboardInteraction(Window window, Key key)
window
- Window that recieved the input eventkey
- Key that couldn't be handledvoid onFocusChanged(Window window, Interactable fromComponent, Interactable toComponent)
window
- Window that switched input focusfromComponent
- Component that lost focus, or null
if no component was previously focusedtoComponent
- Component that received focus, or null
if no component has focusCopyright © 2015. All Rights Reserved.