Package jexer.backend

Interface TerminalReader

  • All Known Implementing Classes:
    ECMA48Terminal, SwingTerminal

    public interface TerminalReader
    TerminalReader provides keyboard and mouse events.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void closeTerminal()
      Classes must provide an implementation that closes sockets, restores console, etc.
      void getEvents​(java.util.List<TInputEvent> queue)
      Classes must provide an implementation to get keyboard, mouse, and screen resize events.
      boolean hasEvents()
      Check if there are events in the queue.
      void reloadOptions()
      Reload options from System properties.
      void setListener​(java.lang.Object listener)
      Set listener to a different Object.
    • Method Detail

      • hasEvents

        boolean hasEvents()
        Check if there are events in the queue.
        Returns:
        if true, getEvents() has something to return to the backend
      • getEvents

        void getEvents​(java.util.List<TInputEvent> queue)
        Classes must provide an implementation to get keyboard, mouse, and screen resize events.
        Parameters:
        queue - list to append new events to
      • closeTerminal

        void closeTerminal()
        Classes must provide an implementation that closes sockets, restores console, etc.
      • setListener

        void setListener​(java.lang.Object listener)
        Set listener to a different Object.
        Parameters:
        listener - the new listening object that run() wakes up on new input
      • reloadOptions

        void reloadOptions()
        Reload options from System properties.