Package jexer.backend

Interface Backend

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void flushScreen()
      Classes must provide an implementation that syncs the logical screen to the physical device.
      void getEvents​(java.util.List<TInputEvent> queue)
      Classes must provide an implementation to get keyboard, mouse, and screen resize events.
      Screen getScreen()
      Get a Screen, which displays the text cells to the user.
      SessionInfo getSessionInfo()
      Get a SessionInfo, which exposes text width/height, language, username, and other information from the communication stack.
      boolean hasEvents()
      Check if there are events in the queue.
      boolean isReadOnly()
      Check if backend is read-only.
      void reloadOptions()
      Reload backend options from System properties.
      void setListener​(java.lang.Object listener)
      Set listener to a different Object.
      void setReadOnly​(boolean readOnly)
      Set read-only flag.
      void setTitle​(java.lang.String title)
      Classes must provide an implementation that sets the window title.
      void shutdown()
      Classes must provide an implementation that closes sockets, restores console, etc.
    • Method Detail

      • getSessionInfo

        SessionInfo getSessionInfo()
        Get a SessionInfo, which exposes text width/height, language, username, and other information from the communication stack.
        Returns:
        the SessionInfo
      • getScreen

        Screen getScreen()
        Get a Screen, which displays the text cells to the user.
        Returns:
        the Screen
      • flushScreen

        void flushScreen()
        Classes must provide an implementation that syncs the logical screen to the physical device.
      • hasEvents

        boolean hasEvents()
        Check if there are events in the queue.
        Returns:
        if true, getEvents() has something to return to the application
      • 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
      • shutdown

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

        void setTitle​(java.lang.String title)
        Classes must provide an implementation that sets the window title.
        Parameters:
        title - the new title
      • 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 backend options from System properties.
      • isReadOnly

        boolean isReadOnly()
        Check if backend is read-only.
        Returns:
        true if user input events from the backend are discarded
      • setReadOnly

        void setReadOnly​(boolean readOnly)
        Set read-only flag.
        Parameters:
        readOnly - if true, then input events will be discarded