Changeset 1134 for trunk


Ignore:
Timestamp:
09/14/18 13:27:23 (6 years ago)
Author:
bln4
Message:

org.expeditee.actions.Debug ->

Added an action that demonstrates the issue with Robot on specific systems (such as David's laptop)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/Debug.java

    r1132 r1134  
    1919package org.expeditee.actions;
    2020
     21import java.awt.AWTException;
     22import java.awt.Robot;
    2123import java.util.List;
     24import java.util.concurrent.TimeUnit;
    2225
    2326import org.expeditee.gio.swing.SwingGraphicsManager;
     
    6568        }
    6669       
     70        public static void RobotTest() {
     71                try {
     72                        final Robot screenWin = new Robot();//SwingInputManager.getInstance()._robot;
     73                        while(true) {
     74                                System.err.println("Sleeping 2 secs");
     75                    TimeUnit.SECONDS.sleep(2);
     76                    System.err.println("Robot move to (100,300)");
     77                    screenWin.mouseMove(100, 300);
     78                        }
     79                } catch (Exception e) {
     80                        e.printStackTrace();
     81                }
     82        }
    6783       
    68         public static void testFastInput() {
     84        public static void TestFastInput() {
    6985                SwingInputManager.getInstance().keyTyped(new java.awt.event.KeyEvent(SwingGraphicsManager.getInstance().getJFrame(), KeyEvent.PRESS, System.currentTimeMillis(), 0, KeyEvent.VK_A, 'A'));
    7086                SwingInputManager.getInstance().keyTyped(new java.awt.event.KeyEvent(SwingGraphicsManager.getInstance().getJFrame(), KeyEvent.PRESS, System.currentTimeMillis(), 0, KeyEvent.VK_B, 'B'));
Note: See TracChangeset for help on using the changeset viewer.