org.jzy3d.junit.replay
Class EventRecorder

java.lang.Object
  extended by org.jzy3d.junit.replay.Timestamped
      extended by org.jzy3d.junit.replay.EventRecorder
All Implemented Interfaces:
ComponentListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, WindowListener, EventListener

public class EventRecorder
extends Timestamped
implements MouseListener, MouseMotionListener, MouseWheelListener, KeyListener, ComponentListener, WindowListener


Field Summary
protected  Component awt
           
protected  Chart chart
           
protected  int nScreenshot
           
protected  Scenario scenario
           
 
Fields inherited from class org.jzy3d.junit.replay.Timestamped
t
 
Constructor Summary
EventRecorder(String scenario, Component awt)
           
EventRecorder(String scenario, Component awt, Frame frame)
           
EventRecorder(String scenario, Component awt, Frame frame, Chart chart)
           
 
Method Summary
protected  void addListeners(Component awt)
           
protected  void addWindowListeners(Frame frame)
           
 void componentHidden(ComponentEvent e)
           
 void componentMoved(ComponentEvent e)
           
 void componentResized(ComponentEvent e)
           
 void componentShown(ComponentEvent e)
           
protected  int getButton(MouseEvent e)
           
 Chart getChart()
           
protected  boolean isExit(KeyEvent e)
           
protected  boolean isScreenshotKey(KeyEvent e)
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void mouseClicked(MouseEvent e)
           
 void mouseDragged(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void mouseWheelMoved(MouseWheelEvent e)
           
protected  void onExit()
           
protected  void register(IEventLog event)
           
protected  void screenshot(Chart chart, String filename)
           
protected  String screenshotFile(int n)
           
 void setChart(Chart chart)
           
 void windowActivated(WindowEvent arg0)
           
 void windowClosed(WindowEvent e)
           
 void windowClosing(WindowEvent e)
           
 void windowDeactivated(WindowEvent arg0)
           
 void windowDeiconified(WindowEvent arg0)
           
 void windowIconified(WindowEvent arg0)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class org.jzy3d.junit.replay.Timestamped
debugMs, debugMs, elapsedMs, elapsedMs, elapsedMs, now, since, since, start, startup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

awt

protected Component awt

scenario

protected Scenario scenario

chart

protected Chart chart

nScreenshot

protected int nScreenshot
Constructor Detail

EventRecorder

public EventRecorder(String scenario,
                     Component awt)

EventRecorder

public EventRecorder(String scenario,
                     Component awt,
                     Frame frame)

EventRecorder

public EventRecorder(String scenario,
                     Component awt,
                     Frame frame,
                     Chart chart)
Method Detail

addListeners

protected void addListeners(Component awt)

addWindowListeners

protected void addWindowListeners(Frame frame)

register

protected void register(IEventLog event)

onExit

protected void onExit()

getChart

public Chart getChart()

setChart

public void setChart(Chart chart)

isScreenshotKey

protected boolean isScreenshotKey(KeyEvent e)

isExit

protected boolean isExit(KeyEvent e)

screenshotFile

protected String screenshotFile(int n)

screenshot

protected void screenshot(Chart chart,
                          String filename)
                   throws IOException
Throws:
IOException

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface MouseWheelListener

mouseDragged

public void mouseDragged(MouseEvent e)
Specified by:
mouseDragged in interface MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener

getButton

protected int getButton(MouseEvent e)

componentHidden

public void componentHidden(ComponentEvent e)
Specified by:
componentHidden in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Specified by:
componentMoved in interface ComponentListener

componentResized

public void componentResized(ComponentEvent e)
Specified by:
componentResized in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Specified by:
componentShown in interface ComponentListener

keyTyped

public void keyTyped(KeyEvent e)
Specified by:
keyTyped in interface KeyListener

keyPressed

public void keyPressed(KeyEvent e)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Specified by:
keyReleased in interface KeyListener

windowClosing

public void windowClosing(WindowEvent e)
Specified by:
windowClosing in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Specified by:
windowClosed in interface WindowListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

windowActivated

public void windowActivated(WindowEvent arg0)
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent arg0)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent arg0)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent arg0)
Specified by:
windowIconified in interface WindowListener


Copyright © 2013. All rights reserved.