de.mud.jta.plugin

Class Terminal

Implemented Interfaces:
ClipboardOwner, FilterPlugin, Runnable, VisualPlugin, VisualTransferPlugin

public class Terminal
extends Plugin
implements FilterPlugin, VisualTransferPlugin, ClipboardOwner, Runnable

The terminal plugin represents the actual terminal where the data will be displayed and the gets the keyboard input to sent back to the remote host.

Maintainer: Matthias L. Jugel

Version:
$Id: Terminal.java 510 2005-10-28 06:46:44Z marcus $
Author:
Matthias L. Jugel, Marcus Mei???ner

Field Summary

protected SoundRequest
audioBeep
if we have a url to an audioclip use it as ping
protected vt320
emulation
protected String
encoding
The default encoding is ISO 8859-1 (western).
protected JMenu
menu
holds the terminal menu
protected FilterPlugin
source
protected JPanel
tPanel
the terminal panel that is displayed on-screen
protected SwingTerminal
terminal
holds the actual terminal emulation

Fields inherited from class de.mud.jta.Plugin

bus, id

Constructor Summary

Terminal(PluginBus bus, String id)
Create a new terminal plugin and initialize the terminal emulation.

Method Summary

void
copy(Clipboard clipboard)
Copy currently selected text into the clipboard.
FilterPlugin
getFilterSource()
JMenu
getPluginMenu()
Get the menu entry for this component.
JComponent
getPluginVisual()
Get the visible components from the plugin.
void
lostOwnership(Clipboard clipboard, Transferable contents)
void
paste(Clipboard clipboard)
Paste text from clipboard to the plugin.
int
read(byte[] b)
void
run()
Continuously read from our back end and display the data on screen.
void
setFilterSource(FilterPlugin source)
void
write(byte[] b)

Methods inherited from class de.mud.jta.Plugin

error, getId

Field Details

audioBeep

protected SoundRequest audioBeep
if we have a url to an audioclip use it as ping

emulation

protected vt320 emulation

encoding

protected String encoding
The default encoding is ISO 8859-1 (western). However, as you see the value is set to latin1 which is a value that is not even documented and thus incorrect, but it forces the default behaviour for western encodings. The correct value does not work in most available browsers.

menu

protected JMenu menu
holds the terminal menu

source

protected FilterPlugin source

tPanel

protected JPanel tPanel
the terminal panel that is displayed on-screen

terminal

protected SwingTerminal terminal
holds the actual terminal emulation

Constructor Details

Terminal

public Terminal(PluginBus bus,
                String id)
Create a new terminal plugin and initialize the terminal emulation.

Method Details

copy

public void copy(Clipboard clipboard)
Copy currently selected text into the clipboard.
Specified by:
copy in interface VisualTransferPlugin
Parameters:
clipboard - the clipboard

getFilterSource

public FilterPlugin getFilterSource()
Specified by:
getFilterSource in interface FilterPlugin

getPluginMenu

public JMenu getPluginMenu()
Get the menu entry for this component.
Specified by:
getPluginMenu in interface VisualPlugin
Returns:
a menu that can be used to change the plugin state

getPluginVisual

public JComponent getPluginVisual()
Get the visible components from the plugin.
Specified by:
getPluginVisual in interface VisualPlugin
Returns:
a component that represents the plugin

lostOwnership

public void lostOwnership(Clipboard clipboard,
                          Transferable contents)

paste

public void paste(Clipboard clipboard)
Paste text from clipboard to the plugin.
Specified by:
paste in interface VisualTransferPlugin
Parameters:
clipboard - the clipboard

read

public int read(byte[] b)
            throws IOException
Specified by:
read in interface FilterPlugin

run

public void run()
Continuously read from our back end and display the data on screen.

setFilterSource

public void setFilterSource(FilterPlugin source)
Specified by:
setFilterSource in interface FilterPlugin

write

public void write(byte[] b)
            throws IOException
Specified by:
write in interface FilterPlugin