flexo: robotpeer -> robot

This commit is contained in:
Zeruth
2019-08-02 17:40:17 -04:00
parent 11f3b74687
commit 0307a692a6

View File

@@ -65,7 +65,7 @@ public class Flexo extends Robot
public static int minDelay = 45; public static int minDelay = 45;
public static MouseMotionFactory currentMouseMotionFactory; public static MouseMotionFactory currentMouseMotionFactory;
public boolean pausedIndefinitely = false; public boolean pausedIndefinitely = false;
private RobotPeer peer; private Robot peer;
public Flexo() throws AWTException public Flexo() throws AWTException
{ {
@@ -82,10 +82,10 @@ public class Flexo extends Robot
Toolkit toolkit = Toolkit.getDefaultToolkit(); Toolkit toolkit = Toolkit.getDefaultToolkit();
if (toolkit instanceof ComponentFactory) if (toolkit instanceof ComponentFactory)
{ {
peer = ((ComponentFactory) toolkit).createRobot(this, screen); peer = new Robot();
RobotDisposer disposer = new RobotDisposer(peer); return;
sun.java2d.Disposer.addRecord(anchor, disposer);
} }
client.getLogger().error("Flexo not supported on this system configuration.");
} }
private transient Object anchor = new Object(); private transient Object anchor = new Object();
@@ -313,10 +313,9 @@ public class Flexo extends Robot
} }
@Override
public Color getPixelColor(int x, int y) public Color getPixelColor(int x, int y)
{ {
return new Color(peer.getRGBPixel(x, y)); return peer.getPixelColor(x, y);
} }
@Override @Override