Package java.awt

Examples of java.awt.Point.move()


    }
   
    public static Point getRelativeLocation(Point locationOnScreen, Component component) {
        Point componentLocation = component.getLocationOnScreen();
        Point relativeLocation = locationOnScreen.getLocation();
        relativeLocation.move(
                (int) (locationOnScreen.getX() - componentLocation.getX()),
                (int) (locationOnScreen.getY() - componentLocation.getY()));
        return relativeLocation;
    }
View Full Code Here


  public static Configuration open()
  {
    if (instance == null)
      instance = new Configuration();
    Point p = Harlequin.getInstance().getLocation();
    p.move(p.x + 10, p.y + 52);
    instance.setLocation(p);
    instance.setVisible(true);
    instance.setAlwaysOnTop(true);
    return instance;
  }
View Full Code Here

    final ProgressPanel panel = new ProgressPanel(1, 3, "Shutting down");
    progressWindow.getContentPane().add(panel);
    progressWindow.pack();

    Point p = new Point(getLocation());
    p.move((int) getSize().getWidth() >> 1, (int) getSize().getHeight() >> 1);
    progressWindow.setLocation(p);
    progressWindow.setVisible(true);

    Runnable runnable =
      new Runnable() {
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)     
  {
    Point p = new Point();
    p.move(4, 5);
    harness.check(p.x, 4);
    harness.check(p.y, 5);
  }


View Full Code Here

    final ProgressPanel panel = new ProgressPanel(1, 3, "Shutting down");
    progressWindow.getContentPane().add(panel);
    progressWindow.pack();

    Point p = new Point(getLocation());
    p.move((int) getSize().getWidth() >> 1, (int) getSize().getHeight() >> 1);
    progressWindow.setLocation(p);
    progressWindow.setVisible(true);

    Runnable runnable =
      new Runnable() {
View Full Code Here

        SwingUtilities.invokeAndWait(new Runnable()
        {
          public void run()
          {
            Visualiser v=new Visualiser();v.update(null, lowerGraph);
            Point newLoc = visFrame.getLocation();newLoc.move(0, visFrame.getHeight());v.setLocation(newLoc);
          }
        });
      } catch (InterruptedException e) {
        // cannot do much about this
        e.printStackTrace();
View Full Code Here

        SwingUtilities.invokeAndWait(new Runnable()
        {
          public void run()
          {
            Visualiser v=new Visualiser();v.update(null, lowerGraph);
            Point newLoc = visFrame.getLocation();newLoc.move(0, visFrame.getHeight());v.setLocation(newLoc);
          }
        });
      } catch (InterruptedException e) {
        // cannot do much about this
        e.printStackTrace();
View Full Code Here

    GuiActionRunner.execute(new GuiTask() {
      @Override
      protected void executeInEDT() throws Throwable {
        Point locOnScreen = buttonFrame.getLocationOnScreen();
        locOnScreen.move(10, 20);
        robot().moveMouse(locOnScreen);
      }
    });
  }
View Full Code Here

    GuiActionRunner.execute(new GuiTask() {
      @Override
      protected void executeInEDT() throws Throwable {
        Point locOnScreen = buttonFrame.getLocationOnScreen();
        locOnScreen.move(10, 20);
        robot().moveMouse(locOnScreen);
      }
    });
  }
View Full Code Here

    GuiActionRunner.execute(new GuiTask() {
      @Override
      protected void executeInEDT() throws Throwable {
        Point locOnScreen = buttonFrame.getLocationOnScreen();
        locOnScreen.move(10, 20);
        robot().moveMouse(locOnScreen);
      }
    });
  }
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.