com.sshtools.terminal.awt
Class AWTTerminal

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.sshtools.terminal.awt.AWTTerminal
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, Terminal, VirtualSessionManager

public class AWTTerminal
extends java.awt.Panel
implements Terminal

AWT implementation of a Terminal.

Version:
$Revision: 1.1 $
Author:
$Author: richard $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AWTTerminal()
          Construct a new AWTTerminal
 
Method Summary
 void addTerminalComponent(TerminalComponent component, java.lang.String position, int ring)
          Add a component to this terminal.
 void addVirtualSession(VirtualSession vt)
          Add a new VirtualSession to this manager.
 void addVirtualSessionManagerListener(VirtualSessionManagerListener listener)
          Add a VirtualSessionManagerListener to the list that should receive events about changes in the state of the virtual sessions managed by this virtual session manager.
 int getRingCount()
          This terminal implementation allows components to be added to one panel in a "ring" of nested panels each with a border layout and the child panel being in the center.
 VirtualSession getSelectedVirtualSession()
          Return the currently selected virtual session
 int getSelectedVirtualSessionIndex()
          Return the currently selected virtual index
 VirtualSession getVirtualSession(int i)
          Return the virtual session at the specified index
 int getVirtualSessionCount()
          Return the number of virtual sessions.
 void removeVirtualSession(VirtualSession vt)
          Remove a VirtualSession from this terminal
 void removeVirtualSessionManagerListener(VirtualSessionManagerListener listener)
          Removes a VirtualSessionManagerListener from the list that should receive events about changes in the state of the virtual sessions managed by this virtual session manager.
 void setSelectedVirtualSession(VirtualSession vt)
          Make the provided virtual session the selected one
 java.util.Enumeration virtualSessions()
          Return an enumeration of virtual sessions
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AWTTerminal

public AWTTerminal()
Construct a new AWTTerminal

Method Detail

getVirtualSession

public VirtualSession getVirtualSession(int i)
Description copied from interface: VirtualSessionManager
Return the virtual session at the specified index

Specified by:
getVirtualSession in interface VirtualSessionManager
Parameters:
i - index
Returns:
virtual terminal

setSelectedVirtualSession

public void setSelectedVirtualSession(VirtualSession vt)
Description copied from interface: VirtualSessionManager
Make the provided virtual session the selected one

Specified by:
setSelectedVirtualSession in interface VirtualSessionManager
Parameters:
vt - virtual session to select

addTerminalComponent

public void addTerminalComponent(TerminalComponent component,
                                 java.lang.String position,
                                 int ring)
Description copied from interface: Terminal

Add a component to this terminal. The position field should be one of

This terminal implementation should allow components to be added to one panel in a "ring" of nested panels each with a border layout and the child panel being in the center. The very innermost ring contains the actual terminal display.

The ring number should be the index of the ring from 0 up to getRingCount()

The Terminal will also invoke TerminalComponent.init(Terminal) to initialise the component (adding of listeners etc should be done here)

Specified by:
addTerminalComponent in interface Terminal
Parameters:
component - component to add
position - border position
ring - ring number

getRingCount

public int getRingCount()
Description copied from interface: Terminal

This terminal implementation allows components to be added to one panel in a "ring" of nested panels each with a border layout and the child panel being in the center. The very innermost ring contains the actual terminal display.

This method returns the number of rings that are available for use

Specified by:
getRingCount in interface Terminal
Returns:
number of available rings

getSelectedVirtualSession

public VirtualSession getSelectedVirtualSession()
Description copied from interface: VirtualSessionManager
Return the currently selected virtual session

Specified by:
getSelectedVirtualSession in interface VirtualSessionManager
Returns:
selected session

addVirtualSession

public void addVirtualSession(VirtualSession vt)
Description copied from interface: VirtualSessionManager
Add a new VirtualSession to this manager.

Specified by:
addVirtualSession in interface VirtualSessionManager
Parameters:
vt - virtual session to add

removeVirtualSession

public void removeVirtualSession(VirtualSession vt)
Description copied from interface: VirtualSessionManager
Remove a VirtualSession from this terminal

Specified by:
removeVirtualSession in interface VirtualSessionManager
Parameters:
vt - virtual session to remove

getSelectedVirtualSessionIndex

public int getSelectedVirtualSessionIndex()
Description copied from interface: VirtualSessionManager
Return the currently selected virtual index

Specified by:
getSelectedVirtualSessionIndex in interface VirtualSessionManager
Returns:
selected terminal index

getVirtualSessionCount

public int getVirtualSessionCount()
Description copied from interface: VirtualSessionManager
Return the number of virtual sessions.

Specified by:
getVirtualSessionCount in interface VirtualSessionManager
Returns:
virtual sessions

virtualSessions

public java.util.Enumeration virtualSessions()
Description copied from interface: VirtualSessionManager
Return an enumeration of virtual sessions

Specified by:
virtualSessions in interface VirtualSessionManager
Returns:
enumeration of virtual session

addVirtualSessionManagerListener

public void addVirtualSessionManagerListener(VirtualSessionManagerListener listener)
Description copied from interface: VirtualSessionManager
Add a VirtualSessionManagerListener to the list that should receive events about changes in the state of the virtual sessions managed by this virtual session manager.

Specified by:
addVirtualSessionManagerListener in interface VirtualSessionManager
Parameters:
listener - listener to add

removeVirtualSessionManagerListener

public void removeVirtualSessionManagerListener(VirtualSessionManagerListener listener)
Description copied from interface: VirtualSessionManager
Removes a VirtualSessionManagerListener from the list that should receive events about changes in the state of the virtual sessions managed by this virtual session manager.

Specified by:
removeVirtualSessionManagerListener in interface VirtualSessionManager
Parameters:
listener - listener to remove


Copyright © 2003-2004 3SP LTD. All Rights Reserved.