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
-
button
- Button Object for implementing the exiting property in this window.
-
command
- Variable holding command string of the last RemoteControlKeyDownEvent.
-
gridbag
- Object holding the layout of this Frame.
-
image
- Image object holding the remote control image.
-
imagecanvas
- Canvas object holding the remote control picture.
-
panel1
- AWT Panel Object needed in event displaying window.
-
panel2
- AWT Panel Object needed in event displaying window.
-
panel3
- AWT Panel Object needed in event displaying window.
-
rC
- Reference to the remote control based event generating object.
-
state
- Variable holding state of the last RemoteControlStateEvent.
-
textarea1
- AWT TextArea object of event displaying window.
-
textarea2
- AWT TextArea object of event displaying window.
-
EventDisplay(String, RemoteControl)
-
The constructor that creates two textareas and an instance of ImageCanvas.
-
actionPerformed(ActionEvent)
- Implements an ActionListener method.
-
constrain(Container, Component, int, int, int, int, int, int, double, double, int, int, int, int)
- Constrain for the gridbag layout.
-
remoteControlKeyDown(RemoteControlKeyDownEvent)
- Implements a RemoteControlListener method.
-
remoteControlState(RemoteControlStateEvent)
-
Implements a RemoteControlListener method.
command
protected String command
- Variable holding command string of the last RemoteControlKeyDownEvent.
state
protected int state
- Variable holding state of the last RemoteControlStateEvent.
textarea1
protected TextArea textarea1
- AWT TextArea object of event displaying window.
textarea2
protected TextArea textarea2
- AWT TextArea object of event displaying window.
imagecanvas
protected ImageCanvas imagecanvas
- Canvas object holding the remote control picture.
image
protected Image image
- Image object holding the remote control image.
panel1
protected Panel panel1
- AWT Panel Object needed in event displaying window.
panel2
protected Panel panel2
- AWT Panel Object needed in event displaying window.
panel3
protected Panel panel3
- AWT Panel Object needed in event displaying window.
gridbag
protected GridBagLayout gridbag
- Object holding the layout of this Frame.
button
protected Button button
- Button Object for implementing the exiting property in this window.
rC
protected RemoteControl rC
- Reference to the remote control based event generating object.
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.
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.
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.
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.
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