use of sun.awt.SunToolkit in project jdk8u_jdk by JetBrains.
the class bug4220171 method main.
public static void main(String[] args) throws Exception {
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
Robot robot = new Robot();
robot.setAutoDelay(50);
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
createAndShowGUI();
}
});
toolkit.realSync();
clickMouse(robot, 0, 0);
Util.hitKeys(robot, KeyEvent.VK_A, KeyEvent.VK_B, KeyEvent.VK_ENTER);
toolkit.realSync();
checkCell(0, 0);
clickMouse(robot, 0, 1);
Util.hitKeys(robot, KeyEvent.VK_D, KeyEvent.VK_E, KeyEvent.VK_ENTER);
toolkit.realSync();
checkCell(0, 1);
clickMouse(robot, 1, 0);
Util.hitKeys(robot, KeyEvent.VK_1, KeyEvent.VK_2, KeyEvent.VK_ENTER);
toolkit.realSync();
checkCell(1, 0);
clickMouse(robot, 1, 1);
Util.hitKeys(robot, KeyEvent.VK_4, KeyEvent.VK_5, KeyEvent.VK_ENTER);
toolkit.realSync();
checkCell(1, 1);
}
use of sun.awt.SunToolkit in project jdk8u_jdk by JetBrains.
the class Test6968363 method main.
public static void main(String[] args) throws Exception {
SunToolkit toolkit = (SunToolkit) getDefaultToolkit();
Runnable task = new Test6968363();
invokeAndWait(task);
toolkit.realSync(100);
new Robot().keyPress(VK_LEFT);
toolkit.realSync(100);
invokeAndWait(task);
}
use of sun.awt.SunToolkit in project jdk8u_jdk by JetBrains.
the class WrongAltProcessing method sync.
public static void sync() {
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
toolkit.realSync();
}
use of sun.awt.SunToolkit in project jdk8u_jdk by JetBrains.
the class bug8023474 method main.
public static void main(String[] args) throws Exception {
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
Robot robot = new Robot();
robot.setAutoDelay(50);
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
createAndShowGUI();
}
});
toolkit.realSync();
Point point = getRowPointToClick(1);
robot.mouseMove(point.x, point.y);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
toolkit.realSync();
Boolean result = (Boolean) tree.getCellEditor().getCellEditorValue();
if (!result) {
throw new RuntimeException("Test Failed!");
}
}
use of sun.awt.SunToolkit in project jdk8u_jdk by JetBrains.
the class bug5043626 method main.
public static void main(String[] args) throws Exception {
SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
robot = new Robot();
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
createAndShowGUI();
}
});
toolkit.realSync();
Util.hitKeys(robot, KeyEvent.VK_HOME);
Util.hitKeys(robot, KeyEvent.VK_1);
toolkit.realSync();
String test = getText();
if (!"1test".equals(test)) {
throw new RuntimeException("Begin line action set cursor inside <head> tag");
}
Util.hitKeys(robot, KeyEvent.VK_HOME);
Util.hitKeys(robot, KeyEvent.VK_2);
toolkit.realSync();
test = getText();
if (!"21test".equals(test)) {
throw new RuntimeException("Begin action set cursor inside <head> tag");
}
}
Aggregations