Package jexer.backend

Class HeadlessBackend

    • Constructor Detail

      • HeadlessBackend

        public HeadlessBackend()
        Public constructor.
    • Method Detail

      • getSessionInfo

        public final SessionInfo getSessionInfo()
        Getter for sessionInfo.
        Specified by:
        getSessionInfo in interface Backend
        Returns:
        the SessionInfo
      • getScreen

        public Screen getScreen()
        Get a Screen, which displays the text cells to the user.
        Specified by:
        getScreen in interface Backend
        Returns:
        the Screen
      • flushScreen

        public void flushScreen()
        Subclasses must provide an implementation that syncs the logical screen to the physical device.
        Specified by:
        flushScreen in interface Backend
      • hasEvents

        public boolean hasEvents()
        Check if there are events in the queue.
        Specified by:
        hasEvents in interface Backend
        Returns:
        if true, getEvents() has something to return to the application
      • getEvents

        public void getEvents​(java.util.List<TInputEvent> queue)
        Subclasses must provide an implementation to get keyboard, mouse, and screen resize events.
        Specified by:
        getEvents in interface Backend
        Parameters:
        queue - list to append new events to
      • shutdown

        public void shutdown()
        Subclasses must provide an implementation that closes sockets, restores console, etc.
        Specified by:
        shutdown in interface Backend
      • setListener

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

        public void reloadOptions()
        Reload backend options from System properties.
        Specified by:
        reloadOptions in interface Backend
      • isReadOnly

        public boolean isReadOnly()
        Check if backend is read-only. For a HeadlessBackend, this is always false.
        Specified by:
        isReadOnly in interface Backend
        Returns:
        true
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
        Set read-only flag. This does nothing for HeadlessBackend.
        Specified by:
        setReadOnly in interface Backend
        Parameters:
        readOnly - ignored