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 isImagesOverText()
      Check if backend will support incomplete image fragments over text display.
      boolean isPixelMouse()
      Check if backend is reporting pixel-based mouse position.
      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 setMouseStyle​(java.lang.String mouseStyle)
      Set the mouse pointer (cursor) style.
      void setPixelMouse​(boolean pixelMouse)
      Set request for backend to report pixel-based mouse position.
      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
      • isImagesOverText

        boolean isImagesOverText()
        Check if backend will support incomplete image fragments over text display.
        Returns:
        true if images can partially obscure text
      • isPixelMouse

        boolean isPixelMouse()
        Check if backend is reporting pixel-based mouse position.
        Returns:
        true if single-pixel mouse movements are reported
      • setPixelMouse

        void setPixelMouse​(boolean pixelMouse)
        Set request for backend to report pixel-based mouse position.
        Parameters:
        pixelMouse - if true, single-pixel mouse movements will be reported, if the backend supports it
      • setMouseStyle

        void setMouseStyle​(java.lang.String mouseStyle)
        Set the mouse pointer (cursor) style.
        Parameters:
        mouseStyle - the pointer style string, one of: "default", "none", "hand", "text", "move", or "crosshair"