Examples of Robot


Examples of abbot.tester.Robot

    protected void fixtureSetUp() throws Throwable {
        super.fixtureSetUp();

        helper = new AWTFixtureHelper();

        robot = new Robot();
        tracker = WindowTracker.getTracker();

        robot.reset();
        if (Bugs.hasMultiClickFrameBug())
            robot.delay(500);
View Full Code Here

Examples of com.cos399.LineFollower.Robot

   *
   */
 
  public static void main(String[] args) throws Exception{
       
    Robot robot = new Robot();
    LCD.drawString("Line Follower", 0, 0);
    LCD.drawString("Select Type: ", 0, 1);
    LCD.drawString("L button: Pilot", 0, 2);
    LCD.drawString("R button: Direct", 0, 3);

View Full Code Here

Examples of components.robot.Robot

      robotsHash  = new Hashtable(23, 0.75f);
      robotNames  = new String[Simulation.getCurrent().getRobotArray().size()];
      for (int i=0; i<Simulation.getCurrent().getRobotArray().size(); i++)
      {
        Robot robot = (Robot) Simulation.getCurrent().getRobotArray().get(i);
        robotsHash.put( robot.getName() , robot );
        robotNames[i] = new String( robot.getName() );
        robot.setVisible( false );
      }
     
      dialogShell.open();
      Display display = dialogShell.getDisplay();
     
View Full Code Here

Examples of de.nordakademie.nxtsimulation.gui.representation.Robot

    canArena = new Canvas(this, SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED);
    FillLayout compArenaLayoutData = new FillLayout(
        org.eclipse.swt.SWT.HORIZONTAL);
    canArena.setLayout(compArenaLayoutData);

    robot = new Robot();

    canArena.addPaintListener(new PaintListener() {

      public void paintControl(PaintEvent e) {
View Full Code Here

Examples of java.awt.Robot

  public static Robot createRobot(final Component component) {
    try {
      return AccessController.doPrivileged(new PrivilegedExceptionAction<Robot>() {
        public Robot run() throws Exception {
          return new Robot(component.getGraphicsConfiguration().getDevice());
        }
      });
    } catch (PrivilegedActionException e) {
      LWJGLUtil.log("Got exception while creating robot: " + e.getCause());
      return null;
View Full Code Here

Examples of java.awt.Robot

        Rectangle windowRect = getBounds();
        splashBufferedImage = new BufferedImage(width , height + extra, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g2 = (Graphics2D) splashBufferedImage.getGraphics();

        try {
            Robot robot = new Robot(getGraphicsConfiguration().getDevice());
            BufferedImage capture = robot.createScreenCapture(new Rectangle(windowRect.x, windowRect.y, windowRect.width + extra, windowRect.height + extra));
            g2.drawImage(capture, null, 0, 0);
        } catch (AWTException e) { }

        g2.drawImage(image, 0, 0, this);
    }
View Full Code Here

Examples of java.awt.Robot

      System.err.println(e);
  }
  //size = Toolkit.getDefaultToolkit().getScreenSize();
  size = new Dimension(width, height);
  try {
      robot = new Robot();
  } catch (AWTException awe) {
      throw new RuntimeException("");
  }
  maxDataLength = size.width * size.height * 3;
  rgbFormat = new RGBFormat(size, maxDataLength,
View Full Code Here

Examples of java.awt.Robot

        splash = new BufferedImage(width + extra, height + extra,
                BufferedImage.TYPE_INT_ARGB);
        Graphics2D g2 = (Graphics2D) splash.getGraphics();

        try {
            Robot robot = new Robot(getGraphicsConfiguration().getDevice());
            BufferedImage capture = robot.createScreenCapture(new Rectangle(
                    windowRect.x, windowRect.y, windowRect.width + extra,
                    windowRect.height + extra));
            g2.drawImage(capture, null, 0, 0);
        } catch (AWTException e) {
        }
View Full Code Here

Examples of java.awt.Robot

      // Instead of using off screen images that may cause some problems
      // use Robot to capture canvas 3D image instead of
      Point canvas3DOrigin = new Point();
      SwingUtilities.convertPointToScreen(canvas3DOrigin, this.canvas3D);
     
      Robot robot = new Robot();
      // Render scene with a white background
      if (this.iconImageLock != null) {
        synchronized (this.iconImageLock) {
          setBackground(Color.WHITE);
          try {
            this.iconImageLock.wait(maxWaitingDelay / 2);
          } catch (InterruptedException ex) {
            ex.printStackTrace();
          }
        }
      }
      imageWithWhiteBackgound = robot.createScreenCapture(
          new Rectangle(canvas3DOrigin, this.canvas3D.getSize()));
     
      // Render scene with a black background
      if (this.iconImageLock != null) {
        synchronized (this.iconImageLock) {
          setBackground(Color.BLACK);
          try {
            this.iconImageLock.wait(maxWaitingDelay / 2);
          } catch (InterruptedException ex) {
            ex.printStackTrace();
          }
        }
      }
      imageWithBlackBackgound = robot.createScreenCapture(
          new Rectangle(canvas3DOrigin, this.canvas3D.getSize()));
    } catch (AWTException ex) {
      throw new RuntimeException(ex);
    } finally {
      this.iconImageLock = null;
View Full Code Here

Examples of java.awt.Robot

   
    public robot() {
        tk = Toolkit.getDefaultToolkit();
        screenRect = new Rectangle(tk.getScreenSize());
        try {              
            rt = new Robot();
        }
        catch (AWTException awte) {
            awte.getStackTrace();
        }    
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.