com.mindbright.terminal
Interface TerminalInputListener

All Known Implementing Classes:
LineReaderTerminal, ModuleTelnetImpl.ChaffedTelnet, SSH2TerminalAdapterImpl, SSHInteractiveClient, SSHStdIO, TelnetTerminalAdapter, TerminalFrameTitle, 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 sendBytesDirect(byte[] b)
          Send some bytes directly to the host.
 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

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

Parameters:
c - typed character

typedChar

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

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

sendBytesDirect

void sendBytesDirect(byte[] b)
Send some bytes directly to the host. This does not echo the characters and bypasses any line buffering. This is typically used when replying to some query from the host.

Parameters:
b - array of bytes representing characters to send

signalWindowChanged

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

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

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