org.jzy3d.chart.controllers.keyboard.screenshot
Class AWTScreenshotKeyController

java.lang.Object
  extended by org.jzy3d.chart.controllers.AbstractController
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jzy3d.chart.controllers.keyboard.screenshot.IScreenshotKeyController
IScreenshotKeyController.IScreenshotEventListener
 
Field Summary
protected  Chart chart
           
protected  List<IScreenshotKeyController.IScreenshotEventListener> listeners
           
protected  String outputFile
           
 
Fields inherited from class org.jzy3d.chart.controllers.AbstractController
controllerListeners, targets
 
Constructor Summary
AWTScreenshotKeyController(Chart chart, String outputFile)
           
 
Method Summary
 void addListener(IScreenshotKeyController.IScreenshotEventListener listener)
           
 void dispose()
           
protected  void fireDone(String file)
           
protected  void fireError(String file, Exception e)
           
 void keyPressed(KeyEvent e)
           
 void keyReleased(KeyEvent e)
           
 void keyTyped(KeyEvent e)
           
 void register(Chart chart)
           
 void screenshot(Chart chart, String filename)
           
 
Methods inherited from class org.jzy3d.chart.controllers.AbstractController
addControllerEventListener, chart, fireControllerEvent, removeControllerEventListener, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chart

protected Chart chart

outputFile

protected String outputFile

listeners

protected List<IScreenshotKeyController.IScreenshotEventListener> listeners
Constructor Detail

AWTScreenshotKeyController

public AWTScreenshotKeyController(Chart chart,
                                  String outputFile)
Method Detail

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.