Package com.ribomation.droidAtScreen.gui

Examples of com.ribomation.droidAtScreen.gui.StatusBar


    setTooltip("Tries to restart the ADB server. Unplug your device(s) first.");
  }

  @Override
  protected void doExecute(final Application app) {
    final StatusBar statusBar = app.getAppFrame().getStatusBar();
    statusBar.message("Restarting ADB...");

    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        app.disconnectAll();
        boolean succeeded = app.getDeviceManager().restartADB();
        statusBar.message("ADB restart " + (succeeded ? "succeeded" : "failed"));
      }
    });
  }
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) {
      getLog().warn("Failed to save image: " + e);
    } finally {
      device.setRecordingListener(null);
      capturing.set(false);
      images.clear();
      runner = null;
      images = null;
      device = null;
      SwingUtilities.invokeLater(new Runnable() {
        @Override
        public void run() {
          setIcon("record");
          statusBar.message("Recording stopped. %d images saved.", next.get());
        }
      });
    }
  }
View Full Code Here

TOP

Related Classes of com.ribomation.droidAtScreen.gui.StatusBar

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.