com.mindbright.terminal
Interface TerminalInputListener

All Known Implementing Classes:
LineReaderTerminal, SSHInteractiveClient, SSHStdIO, TerminalInputAdapter, TerminalInputChaff

public interface TerminalInputListener

Interface for classes listening on input events in a terminal window. That is the actions performed by the user on the terminal window are signalled using this interface.

See Also:
TerminalWindow

Method Summary
 void sendBreak()
          Called when the user sends a break to the terminal
 void sendBytes(byte[] b)
          May be called when the user pastes data.
 void signalTermTypeChanged(java.lang.String newTermType)
          Called when the terminal type has changed.
 void signalWindowChanged(int rows, int cols, int vpixels, int hpixels)
          Called when the size of the terminal window has changed.
 void typedChar(byte[] b)
          Called when the user types a character
 void typedChar(char c)
          Called when the user types a character
 

Method Detail

typedChar

public void typedChar(char c)
Called when the user types a character

Parameters:
c - typed character

typedChar

public void typedChar(byte[] b)
Called when the user types a character

Parameters:
b - byte code representation fo the character encoded in the current encoding.

sendBytes

public void sendBytes(byte[] b)
May be called when the user pastes data. It may also be called by some external entity whishing to simulate multiple key presses.

Parameters:
b - array of bytes representing characters to input

signalWindowChanged

public void signalWindowChanged(int rows,
                                int cols,
                                int vpixels,
                                int hpixels)
Called when the size of the terminal window has changed.

Parameters:
rows - new number of rows
cols - new number of columns
vpixels - new number of vertical pixels
hpixels - new number of horizontal pixels

signalTermTypeChanged

public void signalTermTypeChanged(java.lang.String newTermType)
Called when the terminal type has changed. That is when the user has changed which terminal type this terminal window should emulate.

Parameters:
newTermType - new terminal type to emulate

sendBreak

public void sendBreak()
Called when the user sends a break to the terminal