Interface TerminalWindowListener

  • All Known Implementing Classes:
    Terminal

    public interface TerminalWindowListener
    This class listens to the terminal window display changes in terms of entering character data and pressing send keys.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      booleaninInsertMode()
      The insert mode can be read using this method.
      booleanisDisconnected()
      Checks if disconnected, used e.g.
      booleanisLocked()
      Checks for lock state in case status bar is not present.
      booleanisMarkAllowed()
      Checks if marking is allowed, i.e.
      booleanonActivateMenu​(boolean isPopup)
      Handles display of the pop-up window or activation of the menu bar.
      voidonMarkChange()
      Called when the mark changes.
      booleanonPopup​(int x, int y)
      Handles display of the pop-up window.
      voidsendCharacter​(char ch)
      Sends a character to the terminal.
      voidsendHostKey​(int key)
      Sends a key to the terminal.
      voidsendKey​(HostKeyEvent event)
      Sends a KeyEvent to the terminal.
      booleansetCursor​(int x, int y)
      Sets the cursor position to X/Y.
    • Method Detail

      • sendKey

        void sendKey​(HostKeyEvent event)
        Sends a KeyEvent to the terminal.
        Parameters:
        event - The Host Key Event.
      • sendHostKey

        void sendHostKey​(int key)
        Sends a key to the terminal.
        Parameters:
        key - The key to send.
      • sendCharacter

        void sendCharacter​(char ch)
        Sends a character to the terminal.
        Parameters:
        ch - The character to send.
      • setCursor

        boolean setCursor​(int x,
                          int y)
        Sets the cursor position to X/Y.
        Parameters:
        x - The X position.
        y - The Y position.
        Returns:
        false for failure (or not supported).
      • onPopup

        boolean onPopup​(int x,
                        int y)
        Handles display of the pop-up window.
        Parameters:
        x - The mouse position in X relative the terminal container.
        y - The mouse position in Y relative the terminal container.
        Returns:
        true if handled (i.e. menu is displayed).
      • onActivateMenu

        boolean onActivateMenu​(boolean isPopup)
        Handles display of the pop-up window or activation of the menu bar.
        Parameters:
        isPopup - Flag indicating it's a pop-up that should be activated, as opposed to the menu bar.
        Returns:
        true if handled (i.e. menu is displayed).
      • onMarkChange

        void onMarkChange()
        Called when the mark changes.
      • isDisconnected

        boolean isDisconnected()
        Checks if disconnected, used e.g. to paint the cursor.
        Returns:
        true if disconnected.
      • isMarkAllowed

        boolean isMarkAllowed()
        Checks if marking is allowed, i.e. connected.
        Returns:
        Mark allowed.
      • isLocked

        boolean isLocked()
        Checks for lock state in case status bar is not present.
        Returns:
        true if locked.
      • inInsertMode

        boolean inInsertMode()
        The insert mode can be read using this method.
        Returns:
        true if insert mode, false = overwrite.