com.sshtools.terminal.awt
Class AWTComponentTerminalComponentAdapter

java.lang.Object
  extended by com.sshtools.terminal.awt.AWTComponentTerminalComponentAdapter
All Implemented Interfaces:
VirtualSessionComponent

public class AWTComponentTerminalComponentAdapter
extends java.lang.Object
implements VirtualSessionComponent

Implementation of a VirtualSessionComponent that wraps an AWT component so it can be added to a VirtualSessionManagerUI.

This could be used for example to add a Label to a terminal displaying some text

AWTComponentTerminalComponentAdapter adapter = new AWTComponentTerminalComponentAdapter( new Label("Your are currently connected to foo.3sp.com")); terminal.addTerminalComponent(adapter, BorderLayout.NORTH, 0);

Author:
$Author: james $

Constructor Summary
AWTComponentTerminalComponentAdapter(java.awt.Component component)
          Construct a new AWTComponentTerminalComponentAdapter given a Component to wrap
 
Method Summary
 java.awt.Component getComponent()
          Return the AWT / Swing component this terminal component provides.
 VirtualSessionManagerUI getTerminalDisplay()
          Return the TerminalDisplay this componet has been added to.
 void init(VirtualSessionManagerUI display)
          Invoked when the terminal adds the component to its UI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTComponentTerminalComponentAdapter

public AWTComponentTerminalComponentAdapter(java.awt.Component component)
Construct a new AWTComponentTerminalComponentAdapter given a Component to wrap

Parameters:
component -
Method Detail

init

public void init(VirtualSessionManagerUI display)
Description copied from interface: VirtualSessionComponent
Invoked when the terminal adds the component to its UI.

Specified by:
init in interface VirtualSessionComponent
Parameters:
display - display implementation

getTerminalDisplay

public VirtualSessionManagerUI getTerminalDisplay()
Description copied from interface: VirtualSessionComponent
Return the TerminalDisplay this componet has been added to. Before init(TerminalDisplay) is called this method should return null.

Specified by:
getTerminalDisplay in interface VirtualSessionComponent
Returns:
terminal display

getComponent

public java.awt.Component getComponent()
Description copied from interface: VirtualSessionComponent
Return the AWT / Swing component this terminal component provides. If the terminal component is not visual it will just return null

Specified by:
getComponent in interface VirtualSessionComponent
Returns:
component


Copyright © 2003-2009 SSHTOOLS LTD. All Rights Reserved.