de.mud.terminal
Class VDU

java.lang.Object
  |
  +--java.awt.Component
        |
        +--de.mud.terminal.VDU
All Implemented Interfaces:
java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
Direct Known Subclasses:
vt320

public class VDU
extends java.awt.Component
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Video Display Unit emulation. This class implements all necessary features of a character display unit, but not the actual terminal emulation. It can be used as the base for terminal emulations of any kind.

This is a lightweight component. It will render very badly if used in standard AWT components without overloaded update() method. The update() method must call paint() immediately without clearing the components graphics context or parts of the screen will simply disappear.

Maintainer: Matthias L. Jugel

Version:
$Id: VDU.java,v 2.50 2002/03/01 15:30:17 leo Exp $
Author:
Matthias L. Jugel, Marcus Meißner
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int BOLD
          Make character bold.
static int COLOR
           
static int COLOR_0
           
static int COLOR_1
           
static int COLOR_2
           
static int COLOR_3
           
static int COLOR_4
           
static int COLOR_5
           
static int COLOR_6
           
static int COLOR_7
           
static int COLOR_BG
           
static int COLOR_BOLD
           
static int COLOR_FG
           
static int COLOR_INVERT
           
static int debug
          Enable debug messages.
static java.lang.String ID
          The current version id tag
static int INVERT
          Invert character.
static int LOW
          Lower intensity character.
static int NORMAL
          Make character normal.
static int RESIZE_FONT
          Resize the font to the new screen size.
static int RESIZE_NONE
          Do nothing when the component is resized.
static int RESIZE_SCREEN
          Resize the width and height of the character screen.
static boolean SCROLL_DOWN
          Scroll down when inserting a line.
static boolean SCROLL_UP
          Scroll up when inserting a line.
static int UNDERLINE
          Underline character.
 
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
VDU()
          Create a display unit with size 80x24 and Font "Monospaced", size 12.
VDU(java.awt.Font font)
          Create a display with the font passed and size 80x24.
VDU(int width, int height)
          Create a display unit with specific size, Font is "Monospaced", size 12.
VDU(int width, int height, java.awt.Font font)
          Create a new video display unit with the passed width and height in characters using a special font and font size.
 
Method Summary
 void addFocusListener(java.awt.event.FocusListener listener)
           
 void addKeyListener(java.awt.event.KeyListener listener)
          Add a key listener to the VDU.
 void addMouseListener(java.awt.event.MouseListener listener)
          Add a mouse listener to the VDU.
 void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
          Add a mouse motion listener to the VDU.
 void clearSelection()
           
 void deleteArea(int c, int l, int w, int h)
          Delete a rectangular portion of the screen.
 void deleteArea(int c, int l, int w, int h, int curAttr)
          Delete a rectangular portion of the screen.
 void deleteChar(int c, int l)
          Delete a character at a given position on the screen.
 void deleteLine(int l)
          Delete a line at a specific position.
 int getAttributes(int c, int l)
          Get the attributes for the specified position.
 int getBottomMargin()
          Get the bottom scroll margin.
 int getBufferSize()
          Retrieve current scrollback buffer size.
 char getChar(int c, int l)
          Get the character at the specified position.
 java.awt.Color[] getColorSet()
           
 int getColumns()
          Get amount of columns on the screen.
 java.awt.Dimension getCursorPosition()
          Get the current cursor position.
 java.awt.Insets getInsets()
          The insets of the character display define the border.
 int getMaxBufferSize()
          Retrieve maximum buffer Size.
 java.awt.Dimension getPreferredSize()
          Return the preferred Size of the character display.
 int getRows()
          Get amount of rows on the screen.
 java.awt.Dimension getScreenSize()
          Get the screen size in rows and columns.
 java.lang.String getSelection()
           
 java.awt.Dimension getSize()
          Return the real size in points of the character display.
 int getTopMargin()
          Get the top scroll margin.
 int getWindowBase()
          Get the current window base.
 void insertChar(int c, int l, char ch, int attributes)
          Insert a character at a specific position on the screen.
 void insertLine(int l)
          Insert a blank line at a specific position.
 void insertLine(int l, boolean scrollDown)
          Insert a blank line at a specific position.
 void insertLine(int l, int n)
          Insert blank lines at a specific position.
 void insertLine(int l, int n, boolean scrollDown)
          Insert blank lines at a specific position.
 void markLine(int l, int n)
          Mark lines to be updated with redraw().
 void mouseClicked(java.awt.event.MouseEvent evt)
           
 void mouseDragged(java.awt.event.MouseEvent evt)
           
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 java.awt.Point mouseGetPos(java.awt.Point evtpt)
          Convert Mouse Event coordinates into character cell coordinates
 void mouseMoved(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
          Handle mouse pressed events for copy & paste.
 void mouseReleased(java.awt.event.MouseEvent evt)
          Handle mouse released events for copy & paste.
 void paint(java.awt.Graphics g)
          Paint the current screen using the backing store image.
 void print(java.awt.Graphics g)
           
 void processFocusEvent(java.awt.event.FocusEvent evt)
           
 void processKeyEvent(java.awt.event.KeyEvent evt)
          Process key events for this component.
 void processMouseEvent(java.awt.event.MouseEvent evt)
          Process mouse events for this component.
 void processMouseMotionEvent(java.awt.event.MouseEvent evt)
          Process mouse motion events for this component.
 void putChar(int c, int l, char ch)
          Put a character on the screen with normal font and outline.
 void putChar(int c, int l, char ch, int attributes)
          Put a character on the screen with specific font and outline.
 void putString(int c, int l, java.lang.String s)
          Put a String at a specific position.
 void putString(int c, int l, java.lang.String s, int attributes)
          Put a String at a specific position giving all characters the same attributes.
 void redraw()
          Redraw marked lines.
protected  void redraw(java.awt.Graphics g)
           
 void removeFocusListener(java.awt.event.FocusListener listener)
           
 void removeKeyListener(java.awt.event.KeyListener listener)
          Remove key listener from the VDU.
 void removeMouseListener(java.awt.event.MouseListener listener)
          Remove a mouse listener to the VDU.
 void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
          Remove a mouse motion listener to the VDU.
 void setBorder(int thickness, boolean raised)
          Set the border thickness and the border type.
 void setBottomMargin(int l)
          Set the bottom scroll margin for the screen.
 void setBounds(int x, int y, int w, int h)
          Reshape character display according to resize strategy.
 void setBufferSize(int amount)
          Set scrollback buffer size.
 void setColorPrinting(boolean colorPrint)
          Set default for printing black&white or colorized as displayed on screen.
 void setColorSet(java.awt.Color[] colorset)
           
 void setCursorColors(java.awt.Color fg, java.awt.Color bg)
          Set cursor FG and BG colors
 void setCursorPosition(int c, int l)
          Puts the cursor at the specified position.
 void setFont(java.awt.Font font)
          Set the font to be used for rendering the characters on screen.
 void setResizeStrategy(int strategy)
          Set the strategy when window is resized.
 void setScreenSize(int width, int height)
          Change the size of the screen.
 void setScrollbar(java.awt.Scrollbar scrollBar)
          Connect a scrollbar to the VDU.
 void setTopMargin(int l)
          Set the top scroll margin for the screen.
 void setWindowBase(int line)
          Set the current window base.
 void showCursor(boolean doshow)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, processComponentEvent, processEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
The current version id tag

debug

public static final int debug
Enable debug messages.

COLOR_0

public static final int COLOR_0

COLOR_1

public static final int COLOR_1

COLOR_2

public static final int COLOR_2

COLOR_3

public static final int COLOR_3

COLOR_4

public static final int COLOR_4

COLOR_5

public static final int COLOR_5

COLOR_6

public static final int COLOR_6

COLOR_7

public static final int COLOR_7

COLOR_BOLD

public static final int COLOR_BOLD

COLOR_INVERT

public static final int COLOR_INVERT

COLOR

public static final int COLOR

COLOR_FG

public static final int COLOR_FG

COLOR_BG

public static final int COLOR_BG

SCROLL_UP

public static final boolean SCROLL_UP
Scroll up when inserting a line.

SCROLL_DOWN

public static final boolean SCROLL_DOWN
Scroll down when inserting a line.

RESIZE_NONE

public static final int RESIZE_NONE
Do nothing when the component is resized.

RESIZE_SCREEN

public static final int RESIZE_SCREEN
Resize the width and height of the character screen.

RESIZE_FONT

public static final int RESIZE_FONT
Resize the font to the new screen size.

NORMAL

public static final int NORMAL
Make character normal.

BOLD

public static final int BOLD
Make character bold.

UNDERLINE

public static final int UNDERLINE
Underline character.

INVERT

public static final int INVERT
Invert character.

LOW

public static final int LOW
Lower intensity character.
Constructor Detail

VDU

public VDU(int width,
           int height,
           java.awt.Font font)
Create a new video display unit with the passed width and height in characters using a special font and font size. These features can be set independently using the appropriate properties.
Parameters:
width - the length of the character lines
height - the amount of lines on the screen
font - the font to be used (usually Monospaced)

VDU

public VDU(int width,
           int height)
Create a display unit with specific size, Font is "Monospaced", size 12.
Parameters:
width - the length of the character lines
height - the amount of lines on the screen

VDU

public VDU(java.awt.Font font)
Create a display with the font passed and size 80x24.
Parameters:
font - the font to be used (usually Monospaced)

VDU

public VDU()
Create a display unit with size 80x24 and Font "Monospaced", size 12.
Method Detail

setColorSet

public void setColorSet(java.awt.Color[] colorset)

getColorSet

public java.awt.Color[] getColorSet()

putChar

public void putChar(int c,
                    int l,
                    char ch)
Put a character on the screen with normal font and outline. The character previously on that position will be overwritten. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
ch - the character to show on the screen
See Also:
insertChar(int, int, char, int), deleteChar(int, int), redraw()

putChar

public void putChar(int c,
                    int l,
                    char ch,
                    int attributes)
Put a character on the screen with specific font and outline. The character previously on that position will be overwritten. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
ch - the character to show on the screen
attributes - the character attributes
See Also:
BOLD, UNDERLINE, INVERT, NORMAL, insertChar(int, int, char, int), deleteChar(int, int), redraw()

getChar

public char getChar(int c,
                    int l)
Get the character at the specified position.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
See Also:
putChar(int, int, char)

getAttributes

public int getAttributes(int c,
                         int l)
Get the attributes for the specified position.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
See Also:
putChar(int, int, char)

insertChar

public void insertChar(int c,
                       int l,
                       char ch,
                       int attributes)
Insert a character at a specific position on the screen. All character right to from this position will be moved one to the right. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
ch - the character to insert
attributes - the character attributes
See Also:
BOLD, UNDERLINE, INVERT, NORMAL, putChar(int, int, char), deleteChar(int, int), redraw()

deleteChar

public void deleteChar(int c,
                       int l)
Delete a character at a given position on the screen. All characters right to the position will be moved one to the left. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
See Also:
putChar(int, int, char), insertChar(int, int, char, int), redraw()

putString

public void putString(int c,
                      int l,
                      java.lang.String s)
Put a String at a specific position. Any characters previously on that position will be overwritten. You need to call redraw() for screen update.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
s - the string to be shown on the screen
See Also:
BOLD, UNDERLINE, INVERT, NORMAL, putChar(int, int, char), insertLine(int), deleteLine(int), redraw()

putString

public void putString(int c,
                      int l,
                      java.lang.String s,
                      int attributes)
Put a String at a specific position giving all characters the same attributes. Any characters previously on that position will be overwritten. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (line)
s - the string to be shown on the screen
attributes - character attributes
See Also:
BOLD, UNDERLINE, INVERT, NORMAL, putChar(int, int, char), insertLine(int), deleteLine(int), redraw()

insertLine

public void insertLine(int l)
Insert a blank line at a specific position. The current line and all previous lines are scrolled one line up. The top line is lost. You need to call redraw() to update the screen.
Parameters:
l - the y-coordinate to insert the line
See Also:
deleteLine(int), redraw()

insertLine

public void insertLine(int l,
                       int n)
Insert blank lines at a specific position. You need to call redraw() to update the screen
Parameters:
l - the y-coordinate to insert the line
n - amount of lines to be inserted
See Also:
deleteLine(int), redraw()

insertLine

public void insertLine(int l,
                       boolean scrollDown)
Insert a blank line at a specific position. Scroll text according to the argument. You need to call redraw() to update the screen
Parameters:
l - the y-coordinate to insert the line
scrollDown - scroll down
See Also:
deleteLine(int), SCROLL_UP, SCROLL_DOWN, redraw()

insertLine

public void insertLine(int l,
                       int n,
                       boolean scrollDown)
Insert blank lines at a specific position. The current line and all previous lines are scrolled one line up. The top line is lost. You need to call redraw() to update the screen.
Parameters:
l - the y-coordinate to insert the line
n - number of lines to be inserted
scrollDown - scroll down
See Also:
deleteLine(int), SCROLL_UP, SCROLL_DOWN, redraw()

deleteLine

public void deleteLine(int l)
Delete a line at a specific position. Subsequent lines will be scrolled up to fill the space and a blank line is inserted at the end of the screen.
Parameters:
l - the y-coordinate to insert the line
See Also:
deleteLine(int)

deleteArea

public void deleteArea(int c,
                       int l,
                       int w,
                       int h,
                       int curAttr)
Delete a rectangular portion of the screen. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (row)
w - with of the area in characters
h - height of the area in characters
curAttr - attribute to fill
See Also:
deleteChar(int, int), deleteLine(int), redraw

deleteArea

public void deleteArea(int c,
                       int l,
                       int w,
                       int h)
Delete a rectangular portion of the screen. You need to call redraw() to update the screen.
Parameters:
c - x-coordinate (column)
l - y-coordinate (row)
w - with of the area in characters
h - height of the area in characters
See Also:
deleteChar(int, int), deleteLine(int), redraw

setCursorPosition

public void setCursorPosition(int c,
                              int l)
Puts the cursor at the specified position.
Parameters:
c - column
l - line

showCursor

public void showCursor(boolean doshow)

getCursorPosition

public java.awt.Dimension getCursorPosition()
Get the current cursor position.
See Also:
Dimension

setTopMargin

public void setTopMargin(int l)
Set the top scroll margin for the screen. If the current bottom margin is smaller it will become the top margin and the line will become the bottom margin.
Parameters:
l - line that is the margin

getTopMargin

public int getTopMargin()
Get the top scroll margin.

setBottomMargin

public void setBottomMargin(int l)
Set the bottom scroll margin for the screen. If the current top margin is bigger it will become the bottom margin and the line will become the top margin.
Parameters:
l - line that is the margin

getBottomMargin

public int getBottomMargin()
Get the bottom scroll margin.

setBufferSize

public void setBufferSize(int amount)
Set scrollback buffer size.
Parameters:
amount - new size of the buffer

getBufferSize

public int getBufferSize()
Retrieve current scrollback buffer size.
See Also:
setBufferSize(int)

getMaxBufferSize

public int getMaxBufferSize()
Retrieve maximum buffer Size.
See Also:
getBufferSize()

setWindowBase

public void setWindowBase(int line)
Set the current window base. This allows to view the scrollback buffer.
Parameters:
line - the line where the screen window starts
See Also:
setBufferSize, getBufferSize

getWindowBase

public int getWindowBase()
Get the current window base.
See Also:
setWindowBase

setFont

public void setFont(java.awt.Font font)
Set the font to be used for rendering the characters on screen.
Overrides:
setFont in class java.awt.Component
Parameters:
font - the new font to be used.

setScreenSize

public void setScreenSize(int width,
                          int height)
Change the size of the screen. This will include adjustment of the scrollback buffer.
Parameters:
columns - width of the screen
columns - height of the screen

getScreenSize

public java.awt.Dimension getScreenSize()
Get the screen size in rows and columns.

setResizeStrategy

public void setResizeStrategy(int strategy)
Set the strategy when window is resized. RESIZE_FONT is default.
Parameters:
strategy - the strategy
See Also:
RESIZE_NONE, RESIZE_FONT, RESIZE_SCREEN

getRows

public int getRows()
Get amount of rows on the screen.

getColumns

public int getColumns()
Get amount of columns on the screen.

setBorder

public void setBorder(int thickness,
                      boolean raised)
Set the border thickness and the border type.
Parameters:
thickness - border thickness in pixels, zero means no border
raised - a boolean indicating a raised or embossed border

setScrollbar

public void setScrollbar(java.awt.Scrollbar scrollBar)
Connect a scrollbar to the VDU. This should be done differently using a property change listener.
Parameters:
scrollBar - the scroll bar

markLine

public void markLine(int l,
                     int n)
Mark lines to be updated with redraw().
Parameters:
l - starting line
n - amount of lines to be updated
See Also:
redraw()

redraw

public void redraw()
Redraw marked lines.
See Also:
markLine(int, int)

redraw

protected void redraw(java.awt.Graphics g)

paint

public void paint(java.awt.Graphics g)
Paint the current screen using the backing store image.
Overrides:
paint in class java.awt.Component

setColorPrinting

public void setColorPrinting(boolean colorPrint)
Set default for printing black&white or colorized as displayed on screen.
Parameters:
name - colorPrint true = print in full color, default b&w only

print

public void print(java.awt.Graphics g)
Overrides:
print in class java.awt.Component

mouseGetPos

public java.awt.Point mouseGetPos(java.awt.Point evtpt)
Convert Mouse Event coordinates into character cell coordinates
Parameters:
the - mouse point to be converted
Returns:
Character cell coordinate of passed point

setCursorColors

public void setCursorColors(java.awt.Color fg,
                            java.awt.Color bg)
Set cursor FG and BG colors
Parameters:
fg - foreground color or null
bg - background color or null

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Reshape character display according to resize strategy.
Overrides:
setBounds in class java.awt.Component
See Also:
setResizeStrategy(int)

getSize

public java.awt.Dimension getSize()
Return the real size in points of the character display.
Overrides:
getSize in class java.awt.Component
Returns:
Dimension the dimension of the display
See Also:
Dimension

getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the preferred Size of the character display. This turns out to be the actual size.
Overrides:
getPreferredSize in class java.awt.Component
Returns:
Dimension dimension of the display
See Also:
size

getInsets

public java.awt.Insets getInsets()
The insets of the character display define the border.
Returns:
Insets border thickness in pixels

clearSelection

public void clearSelection()

getSelection

public java.lang.String getSelection()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Handle mouse pressed events for copy & paste.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
evt - the event that occured
See Also:
MouseEvent

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Handle mouse released events for copy & paste.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
evt - the mouse event

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Add a mouse listener to the VDU. This is the implementation for the lightweight event handling.
Overrides:
addMouseListener in class java.awt.Component
Parameters:
listener - the new mouse listener

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Remove a mouse listener to the VDU. This is the implementation for the lightweight event handling.
Overrides:
removeMouseListener in class java.awt.Component
Parameters:
listener - the mouse listener to remove

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
Add a mouse motion listener to the VDU. This is the implementation for the lightweight event handling.
Overrides:
addMouseMotionListener in class java.awt.Component
Parameters:
listener - the mouse motion listener

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
Remove a mouse motion listener to the VDU. This is the implementation for the lightweight event handling.
Overrides:
removeMouseMotionListener in class java.awt.Component
Parameters:
listener - the mouse motion listener to remove

processMouseEvent

public void processMouseEvent(java.awt.event.MouseEvent evt)
Process mouse events for this component. It will call the methods (mouseClicked() etc) in the added mouse listeners.
Overrides:
processMouseEvent in class java.awt.Component
Parameters:
evt - the dispatched mouse event

processMouseMotionEvent

public void processMouseMotionEvent(java.awt.event.MouseEvent evt)
Process mouse motion events for this component. It will call the methods (mouseDragged() etc) in the added mouse motion listeners.
Overrides:
processMouseMotionEvent in class java.awt.Component
Parameters:
evt - the dispatched mouse event

addKeyListener

public void addKeyListener(java.awt.event.KeyListener listener)
Add a key listener to the VDU. This is necessary to be able to receive keyboard input from this component. It is a prerequisite for a lightweigh component.
Overrides:
addKeyListener in class java.awt.Component
Parameters:
listener - the key listener

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener listener)
Remove key listener from the VDU. It is a prerequisite for a lightweigh component.
Overrides:
removeKeyListener in class java.awt.Component
Parameters:
listener - the key listener to remove

processKeyEvent

public void processKeyEvent(java.awt.event.KeyEvent evt)
Process key events for this component.
Overrides:
processKeyEvent in class java.awt.Component
Parameters:
evt - the dispatched key event

addFocusListener

public void addFocusListener(java.awt.event.FocusListener listener)
Overrides:
addFocusListener in class java.awt.Component

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener listener)
Overrides:
removeFocusListener in class java.awt.Component

processFocusEvent

public void processFocusEvent(java.awt.event.FocusEvent evt)
Overrides:
processFocusEvent in class java.awt.Component