Package com.ribomation.droidAtScreen.dev

Examples of com.ribomation.droidAtScreen.dev.ScreenImage


  class Retriever extends TimerTask {
    @Override
    public void run() {
      long start = System.currentTimeMillis();
      ScreenImage image = device.getScreenImage();
      long elapsed = System.currentTimeMillis() - start;
      infoPane.setElapsed(elapsed, image);
      infoPane.setStatus(device.getState().name().toUpperCase());
      //      log.debug(String.format("Got screenshot %s, elapsed %d ms", image, elapsed));
View Full Code Here


    setTooltip("Takes a screen-shot and saves it to a file");
  }

  @Override
  protected void doExecute(Application app, DeviceFrame device) {
    ScreenImage image = device.getLastScreenshot().copy();

    if (app.getSettings().isAskBeforeScreenshot()) {
      JFileChooser chooser = createChooser(app.getSettings().getImageDirectory(), suggestFilename(app), app.getSettings().getImageFormats());
      if (chooser.showSaveDialog(app.getAppFrame()) == JFileChooser.APPROVE_OPTION) {
        File file = chooser.getSelectedFile();
View Full Code Here

  @Override
  public void run() {
    final StatusBar statusBar = getApplication().getAppFrame().getStatusBar();
    try {
      do {
        ScreenImage image = images.take();
        File file = nextName();
        ImageIO.write(image.toBufferedImage(), format, file);
        getLog().info("Screenshot saved " + file);
        statusBar.message("Saved %s", file.getName());
      } while (capturing.get());
    } catch (InterruptedException ignore) {
    } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.ribomation.droidAtScreen.dev.ScreenImage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.