Java Code Examples for sun.awt.OSInfo.OSType#SOLARIS
The following examples show how to use
sun.awt.OSInfo.OSType#SOLARIS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: bug8024061.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 2
Source File: bug8024061.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 3
Source File: bug8024061.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 4
Source File: bug8024061.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 5
Source File: bug8024061.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 6
Source File: bug8024061.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 7
Source File: bug8024061.java From hottub with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 8
Source File: bug8024061.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 9
Source File: bug8024061.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }
Example 10
Source File: bug8024061.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException { OSType type = OSInfo.getOSType(); if (type != OSType.LINUX && type != OSType.SOLARIS) { System.out.println("This test is for Linux and Solaris only... " + "skipping!"); return; } final bug8024061[] dnd = {null}; SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { dnd[0] = new bug8024061(); } }); final Robot robot = new Robot(); robot.setAutoDelay(10); SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit(); toolkit.realSync(); JFrame frame = dnd[0].frame; Point point = frame.getLocationOnScreen(); Point here = new Point(point.x + 35, point.y + 45); Point there = new Point(point.x + 120, point.y + 45); here.x += 25; robot.mouseMove(here.x, here.y); robot.mousePress(InputEvent.BUTTON1_MASK); while (here.x < there.x) { here.x += 20; robot.mouseMove(here.x, here.y); System.out.println("x = " + here.x); } robot.mouseRelease(InputEvent.BUTTON1_MASK); toolkit.realSync(); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); System.out.println("finished"); try { if (lock.await(5, TimeUnit.SECONDS)) { if (dragEnterException == null) { System.out.println("Test passed."); } else { System.out.println("Test failed."); dragEnterException.printStackTrace(); throw new RuntimeException(dragEnterException); } } else { System.out.println("Test failed. Timeout reached"); throw new RuntimeException("Timed out waiting for dragEnter()"); } } finally { frame.dispose(); } }