org.jzy3d.chart.controllers.keyboard.camera
Class ScreenshotKeyListener
java.lang.Object
org.jzy3d.chart.controllers.keyboard.camera.ScreenshotKeyListener
- All Implemented Interfaces:
- KeyListener, EventListener
public class ScreenshotKeyListener
- extends Object
- implements KeyListener
Saves a screenshot in PNG format once key S is pressed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chart
protected Chart chart
outputFile
protected String outputFile
listeners
protected List<ScreenshotKeyListener.IScreenshotEventListener> listeners
ScreenshotKeyListener
public ScreenshotKeyListener(Chart chart,
String outputFile)
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interface KeyListener
screenshot
public void screenshot(Chart chart,
String filename)
throws IOException
- Throws:
IOException
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interface KeyListener
keyPressed
public void keyPressed(KeyEvent e)
- Specified by:
keyPressed
in interface KeyListener
fireDone
protected void fireDone(String file)
addListener
public void addListener(ScreenshotKeyListener.IScreenshotEventListener listener)
fireError
protected void fireError(String file,
Exception e)