Class WindowListenerAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onInput​(Window 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 onMoved​(Window window, TerminalPosition oldPosition, TerminalPosition newPosition)
      Called whenever the window's position has changed, no matter if it was done by the window manager or the user
      void onResized​(Window window, TerminalSize oldSize, TerminalSize newSize)
      Called whenever the window's size has changed, no matter if it was done by the window manager or the user
      void onUnhandledInput​(Window basePane, KeyStroke keyStroke, java.util.concurrent.atomic.AtomicBoolean hasBeenHandled)
      Called when a user entered some input which wasn't handled by the focused component.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WindowListenerAdapter

        public WindowListenerAdapter()
    • Method Detail

      • onResized

        public void onResized​(Window window,
                              TerminalSize oldSize,
                              TerminalSize newSize)
        Description copied from interface: WindowListener
        Called whenever the window's size has changed, no matter if it was done by the window manager or the user
        Specified by:
        onResized in interface WindowListener
        Parameters:
        window - Window that was resized
        oldSize - Previous size of the window
        newSize - New size of the window
      • onMoved

        public void onMoved​(Window window,
                            TerminalPosition oldPosition,
                            TerminalPosition newPosition)
        Description copied from interface: WindowListener
        Called whenever the window's position has changed, no matter if it was done by the window manager or the user
        Specified by:
        onMoved in interface WindowListener
        Parameters:
        window - Window that was repositioned
        oldPosition - Previous position of the window
        newPosition - New position of the window
      • onInput

        public void onInput​(Window basePane,
                            KeyStroke keyStroke,
                            java.util.concurrent.atomic.AtomicBoolean deliverEvent)
        Description copied from interface: BasePaneListener
        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.
        Specified by:
        onInput in interface BasePaneListener<Window>
        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

        public void onUnhandledInput​(Window basePane,
                                     KeyStroke keyStroke,
                                     java.util.concurrent.atomic.AtomicBoolean hasBeenHandled)
        Description copied from interface: BasePaneListener
        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.
        Specified by:
        onUnhandledInput in interface BasePaneListener<Window>
        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