test/java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java

Print this page




  25 import java.awt.Robot;
  26 import java.awt.event.InputEvent;
  27 import java.awt.event.MouseAdapter;
  28 import java.awt.event.MouseEvent;
  29 import javax.swing.JButton;
  30 import javax.swing.JDesktopPane;
  31 import javax.swing.JFrame;
  32 import javax.swing.JInternalFrame;
  33 import test.java.awt.regtesthelpers.Util;
  34 
  35 /**
  36  * AWT/Swing overlapping test for {@link javax.swing.JInternalFrame } component during move.
  37  * <p>See <a href="http://monaco.sfbay.sun.com/detail.jsf?cr=6985399">CR6768230</a> for details and base class for test info.
  38  */
  39 /*
  40  * @test
  41  * @key headful
  42  * @bug 6985399
  43  * @summary Overlapping test for javax.swing.JScrollPane
  44  * @author sergey.grinev@oracle.com: area=awt.mixing
  45  * @library ../../regtesthelpers
  46  * @modules java.desktop/sun.awt
  47  *          java.desktop/java.awt.peer

  48  * @build Util
  49  * @run main JInternalFrameMoveOverlapping
  50  */
  51 public class JInternalFrameMoveOverlapping extends OverlappingTestBase {
  52 
  53     private boolean lwClicked = true;
  54     private Point locTopFrame;
  55     private Point locTarget;
  56 
  57     protected boolean performTest() {
  58         // run robot
  59         Robot robot = Util.createRobot();
  60         robot.setAutoDelay(ROBOT_DELAY);
  61 
  62         robot.mouseMove(locTopFrame.x + 25, locTopFrame.y + 25);
  63         robot.mousePress(InputEvent.BUTTON1_MASK);
  64         try {
  65             Thread.sleep(500);
  66         } catch (InterruptedException ex) {
  67         }




  25 import java.awt.Robot;
  26 import java.awt.event.InputEvent;
  27 import java.awt.event.MouseAdapter;
  28 import java.awt.event.MouseEvent;
  29 import javax.swing.JButton;
  30 import javax.swing.JDesktopPane;
  31 import javax.swing.JFrame;
  32 import javax.swing.JInternalFrame;
  33 import test.java.awt.regtesthelpers.Util;
  34 
  35 /**
  36  * AWT/Swing overlapping test for {@link javax.swing.JInternalFrame } component during move.
  37  * <p>See <a href="http://monaco.sfbay.sun.com/detail.jsf?cr=6985399">CR6768230</a> for details and base class for test info.
  38  */
  39 /*
  40  * @test
  41  * @key headful
  42  * @bug 6985399
  43  * @summary Overlapping test for javax.swing.JScrollPane
  44  * @author sergey.grinev@oracle.com: area=awt.mixing
  45  * @library /java/awt/patchlib  ../../regtesthelpers
  46  * @modules java.desktop/sun.awt
  47  *          java.desktop/java.awt.peer
  48  * @build java.desktop/java.awt.Helper
  49  * @build Util
  50  * @run main JInternalFrameMoveOverlapping
  51  */
  52 public class JInternalFrameMoveOverlapping extends OverlappingTestBase {
  53 
  54     private boolean lwClicked = true;
  55     private Point locTopFrame;
  56     private Point locTarget;
  57 
  58     protected boolean performTest() {
  59         // run robot
  60         Robot robot = Util.createRobot();
  61         robot.setAutoDelay(ROBOT_DELAY);
  62 
  63         robot.mouseMove(locTopFrame.x + 25, locTopFrame.y + 25);
  64         robot.mousePress(InputEvent.BUTTON1_MASK);
  65         try {
  66             Thread.sleep(500);
  67         } catch (InterruptedException ex) {
  68         }