public class WindowAdapter extends Object implements WindowListener
WindowListener
and provides an implementation for all
the methods that does nothing. By extending this class, you can provide your own implementation
to only the events you care about.WindowListener
Constructor and Description |
---|
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 . |
public void onWindowInvalidated(Window window)
WindowListener
onWindowInvalidated
in interface WindowListener
window
- Window that was invalidatedpublic void onWindowClosed(Window window)
WindowListener
GUIScreen
.onWindowClosed
in interface WindowListener
window
- Window that was closed and removedpublic void onWindowShown(Window window)
WindowListener
GUIScreen
.onWindowShown
in interface WindowListener
window
- Window that has been displayedpublic void onUnhandledKeyboardInteraction(Window window, Key key)
WindowListener
onUnhandledKeyboardInteraction
in interface WindowListener
window
- Window that recieved the input eventkey
- Key that couldn't be handledpublic void onFocusChanged(Window window, Interactable fromComponent, Interactable toComponent)
WindowListener
onFocusChanged
in interface WindowListener
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.