Package com.iizigo.term.internal
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 SummaryModifier and TypeMethodDescription- booleanThe insert mode can be read using this method.- booleanChecks if disconnected, used e.g.- boolean- isLocked()Checks for lock state in case status bar is not present.- booleanChecks if marking is allowed, i.e.- boolean- onActivateMenu- (boolean isPopup) Handles display of the pop-up window or activation of the menu bar.- voidCalled when the mark changes.- boolean- onPopup- (int x, int y) Handles display of the pop-up window.- void- sendCharacter- (char ch) Sends a character to the terminal.- void- sendHostKey- (int key) Sends a key to the terminal.- void- sendKey- (HostKeyEvent event) Sends a KeyEvent to the terminal.- boolean- setCursor- (int x, int y) Sets the cursor position to X/Y.
- Method Details- sendKeySends a KeyEvent to the terminal.- Parameters:
- event- The Host Key Event.
 
- sendHostKeyvoid sendHostKey- (int key) Sends a key to the terminal.- Parameters:
- key- The key to send.
 
- sendCharactervoid sendCharacter- (char ch) Sends a character to the terminal.- Parameters:
- ch- The character to send.
 
- setCursorboolean 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).
 
- onPopupboolean 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).
 
- onActivateMenuboolean 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).
 
- onMarkChangevoid onMarkChange()Called when the mark changes.
- isDisconnectedboolean isDisconnected()Checks if disconnected, used e.g. to paint the cursor.- Returns:
- true if disconnected.
 
- isMarkAllowedboolean isMarkAllowed()Checks if marking is allowed, i.e. connected.- Returns:
- Mark allowed.
 
- isLockedboolean isLocked()Checks for lock state in case status bar is not present.- Returns:
- true if locked.
 
- inInsertModeboolean inInsertMode()The insert mode can be read using this method.- Returns:
- true if insert mode, false = overwrite.