Package com.iizigo.term.internal
Interface TerminalWindowListener
- All Known Implementing Classes:
- Terminal
 - public interface TerminalWindowListenerThis 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 Type - Method - Description - boolean- inInsertMode()The insert mode can be read using this method.- boolean- isDisconnected()Checks if disconnected, used e.g.- boolean- isLocked()Checks for lock state in case status bar is not present.- boolean- isMarkAllowed()Checks if marking is allowed, i.e.- boolean- onActivateMenu(boolean isPopup)Handles display of the pop-up window or activation of the menu bar.- void- onMarkChange()Called 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 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.