org.jzy3d.chart.controllers.keyboard.screenshot
Class AWTScreenshotKeyController
java.lang.Object
org.jzy3d.chart.controllers.AbstractController
org.jzy3d.chart.controllers.keyboard.screenshot.AWTScreenshotKeyController
- All Implemented Interfaces:
- KeyListener, EventListener, IScreenshotKeyController
public class AWTScreenshotKeyController
- extends AbstractController
- implements KeyListener, IScreenshotKeyController
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<IScreenshotKeyController.IScreenshotEventListener> listeners
AWTScreenshotKeyController
public AWTScreenshotKeyController(Chart chart,
String outputFile)
register
public void register(Chart chart)
- Overrides:
register
in class AbstractController
dispose
public void dispose()
- Overrides:
dispose
in class AbstractController
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interface KeyListener
screenshot
public void screenshot(Chart chart,
String filename)
throws IOException
- Specified by:
screenshot
in interface IScreenshotKeyController
- 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(IScreenshotKeyController.IScreenshotEventListener listener)
- Specified by:
addListener
in interface IScreenshotKeyController
fireError
protected void fireError(String file,
Exception e)
Copyright © 2013. All rights reserved.