All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.clients.tv.EventDisplay

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----calypso.clients.tv.EventDisplay

public class EventDisplay
extends Frame
implements RemoteControlListener, ActionListener
A class that helps to display the RemoteControl events. A class that listens to the RemoteControl and prints commands on textareas and starts a window for imagecanvas.

Author:
Kim Lahti / TCM laboratory / HUT
See Also:
ImageCanvas

Variable Index

 o button
Button Object for implementing the exiting property in this window.
 o command
Variable holding command string of the last RemoteControlKeyDownEvent.
 o gridbag
Object holding the layout of this Frame.
 o image
Image object holding the remote control image.
 o imagecanvas
Canvas object holding the remote control picture.
 o panel1
AWT Panel Object needed in event displaying window.
 o panel2
AWT Panel Object needed in event displaying window.
 o panel3
AWT Panel Object needed in event displaying window.
 o rC
Reference to the remote control based event generating object.
 o state
Variable holding state of the last RemoteControlStateEvent.
 o textarea1
AWT TextArea object of event displaying window.
 o textarea2
AWT TextArea object of event displaying window.

Constructor Index

 o EventDisplay(String, RemoteControl)
The constructor that creates two textareas and an instance of ImageCanvas.

Method Index

 o actionPerformed(ActionEvent)
Implements an ActionListener method.
 o constrain(Container, Component, int, int, int, int, int, int, double, double, int, int, int, int)
Constrain for the gridbag layout.
 o remoteControlKeyDown(RemoteControlKeyDownEvent)
Implements a RemoteControlListener method.
 o remoteControlState(RemoteControlStateEvent)
Implements a RemoteControlListener method.

Variables

 o command
 protected String command
Variable holding command string of the last RemoteControlKeyDownEvent.

 o state
 protected int state
Variable holding state of the last RemoteControlStateEvent.

 o textarea1
 protected TextArea textarea1
AWT TextArea object of event displaying window.

 o textarea2
 protected TextArea textarea2
AWT TextArea object of event displaying window.

 o imagecanvas
 protected ImageCanvas imagecanvas
Canvas object holding the remote control picture.

 o image
 protected Image image
Image object holding the remote control image.

 o panel1
 protected Panel panel1
AWT Panel Object needed in event displaying window.

 o panel2
 protected Panel panel2
AWT Panel Object needed in event displaying window.

 o panel3
 protected Panel panel3
AWT Panel Object needed in event displaying window.

 o gridbag
 protected GridBagLayout gridbag
Object holding the layout of this Frame.

 o button
 protected Button button
Button Object for implementing the exiting property in this window.

 o rC
 protected RemoteControl rC
Reference to the remote control based event generating object.

Constructors

 o EventDisplay
 public EventDisplay(String title_,
                     RemoteControl rC_)
The constructor that creates two textareas and an instance of ImageCanvas. The constructor inserts two textareas in one panel, an imagecanvas in another panel and a quit button in a third. It arranges the panels with gridbag layout.

Parameters:
title_ - The window title text.
rC_ - A reference to the remote control object instance.

Methods

 o constrain
 public void constrain(Container container,
                       Component component,
                       int grid_x,
                       int grid_y,
                       int grid_width,
                       int grid_height,
                       int fill,
                       int anchor,
                       double weight_x,
                       double weight_y,
                       int top,
                       int left,
                       int bottom,
                       int right)
Constrain for the gridbag layout.

 o remoteControlKeyDown
 public void remoteControlKeyDown(RemoteControlKeyDownEvent rce_)
Implements a RemoteControlListener method. Method that is invoked every time that RemoteControl notifies an remoteControlKeyDown event. It prints button command in textarea, and gives command to imagecanvas buttonPressed method.

Parameters:
rce_ - The notified RemoteControlKeyDownEvent.
 o remoteControlState
 public void remoteControlState(RemoteControlStateEvent rcs_)
Implements a RemoteControlListener method. Method that is invoked when RemoteControl notifies an remoteControlState event.

Parameters:
rcs_ - The received RemoteControlStateEvent.
 o actionPerformed
 public void actionPerformed(ActionEvent e_)
Implements an ActionListener method. When the button is pressed, the listeners are removed and the frame is closed.

Parameters:
e_ - The received ActionEvent.

All Packages  Class Hierarchy  This Package  Previous  Next  Index