org.vigia.test
Class ViewTest

java.lang.Object
  extended by org.vigia.test.ViewTest
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, IRListener, Controller, FrameListener

public class ViewTest
extends java.lang.Object
implements Controller

Testing GUI Panel Class

Version:
1.0 (25/11/08)
Author:
Daniel Hector Stolfi Rosso

Field Summary
private  Panel p
          Panel for testing
 
Constructor Summary
ViewTest()
          Constructor for Testing class
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Simulates controller
static void main(java.lang.String[] args)
          Testing GUI
 void onIREvent(Coordinates c, int xVRes, int yVRes)
          Actions to do when the Wiimote detects a change in the position of the infrared leds.
 void onNewFrame(java.awt.image.BufferedImage frame)
          Receives a frame from the remote camera.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p

private Panel p
Panel for testing

Constructor Detail

ViewTest

public ViewTest()
Constructor for Testing class

Method Detail

main

public static void main(java.lang.String[] args)
Testing GUI

Parameters:
args - Useless

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Simulates controller

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - Event from View

onNewFrame

public void onNewFrame(java.awt.image.BufferedImage frame)
Description copied from interface: FrameListener
Receives a frame from the remote camera.

Specified by:
onNewFrame in interface FrameListener
Parameters:
frame - the frame.
See Also:
FrameListener.onNewFrame(java.awt.image.BufferedImage)

onIREvent

public void onIREvent(Coordinates c,
                      int xVRes,
                      int yVRes)
               throws VigiaClientException
Description copied from interface: IRListener
Actions to do when the Wiimote detects a change in the position of the infrared leds.

Specified by:
onIREvent in interface IRListener
Parameters:
c - the new coordinates of the Wiimote.
xVRes - IR virtual screen x resolution.
yVRes - IR virtual screen y resolution.
Throws:
VigiaClientException - error from the listener.
See Also:
IRListener.onIREvent(org.vigia.client.driver.Coordinates, int, int)