Module com.googlecode.lanterna
Package com.googlecode.lanterna.gui2
Interface BasePaneListener<T extends BasePane>
-
- All Known Subinterfaces:
WindowListener
- All Known Implementing Classes:
WindowListenerAdapter
public interface BasePaneListener<T extends BasePane>
Base listener interface having callback methods for events relating toBasePane
(andWindow
, which extendsBasePane
) so that you can be notified by a callback when certain events happen. Assume it is the GUI thread that will call these methods. You typically use this throughWindowListener
and callingWindow.addWindowListener(WindowListener)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onInput(T basePane, KeyStroke keyStroke, java.util.concurrent.atomic.AtomicBoolean deliverEvent)
Called when a user input is about to be delivered to the focusedInteractable
inside theBasePane
, but before it is actually delivered.void
onUnhandledInput(T basePane, KeyStroke keyStroke, java.util.concurrent.atomic.AtomicBoolean hasBeenHandled)
Called when a user entered some input which wasn't handled by the focused component.
-
-
-
Method Detail
-
onInput
void onInput(T basePane, KeyStroke keyStroke, java.util.concurrent.atomic.AtomicBoolean deliverEvent)
Called when a user input is about to be delivered to the focusedInteractable
inside theBasePane
, but before it is actually delivered. You can catch it and prevent it from being passed into the component by using thedeliverEvent
parameter and setting it tofalse
.- Parameters:
basePane
- Base pane that got the input eventkeyStroke
- The actual input eventdeliverEvent
- Set totrue
automatically, if you change it tofalse
it will prevent the GUI from passing the input event on to the focusedInteractable
-
-