Interface BasePaneListener<T extends BasePane>

    • 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 focused Interactable inside the BasePane, 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 focused Interactable inside the BasePane, but before it is actually delivered. You can catch it and prevent it from being passed into the component by using the deliverEvent parameter and setting it to false.
        Parameters:
        basePane - Base pane that got the input event
        keyStroke - The actual input event
        deliverEvent - Set to true automatically, if you change it to false it will prevent the GUI from passing the input event on to the focused Interactable
      • onUnhandledInput

        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. This allows you to catch it at a BasePane (or Window) level and prevent it from being reported to the TextGUI as an unhandled input event.
        Parameters:
        basePane - BasePane that got the input event
        keyStroke - The unhandled input event
        hasBeenHandled - Initially set to false, if you change it to true then the event will not be reported as an unhandled input to the TextGUI