org.sikuli.script
Class Screen

java.lang.Object
  extended by org.sikuli.script.Region
      extended by org.sikuli.script.Screen
All Implemented Interfaces:
IScreen, Observer
Direct Known Subclasses:
UnionScreen

public class Screen
extends Region
implements Observer, IScreen


Field Summary
protected  GraphicsDevice _curGD
           
protected  int _curID
           
protected  ScreenHighlighter _overlay
           
protected static int _primaryScreen
           
protected  CapturePrompt _prompt
           
protected  boolean _waitPrompt
           
 
Fields inherited from class org.sikuli.script.Region
_autoWaitTimeout, _defaultFindFailedResponse, _evtMgr, _lastMatch, _lastMatches, _lastScreenImage, _observing, _throwException, h, w, x, y
 
Constructor Summary
Screen()
           
Screen(int id)
           
 
Method Summary
 ScreenImage capture()
           
 ScreenImage capture(int x, int y, int w, int h)
           
 ScreenImage capture(Rectangle rect)
           
 ScreenImage capture(Region reg)
           
 Rectangle getBounds()
           
static Rectangle getBounds(int id)
           
 GraphicsDevice getGraphicsDevice()
           
 int getID()
           
static int getNumberScreens()
           
static int getPrimaryId()
           
 IRobot getRobot()
           
static IRobot getRobot(int id)
           
protected  void initBounds()
           
 Region newRegion(Rectangle rect)
           
 Region selectRegion()
           
 Region selectRegion(String msg)
           
 void showClick(Location loc)
          Show the click
 void showDropTarget(Location loc)
           
 void showMove(Location loc)
           
 void showTarget(Location loc)
           
 void showTarget(Location loc, double secs)
           
 String toString()
           
 void update(Subject s)
           
 ScreenImage userCapture()
           
 ScreenImage userCapture(String msg)
           
 
Methods inherited from class org.sikuli.script.Region
above, above, below, below, click, click, create, create, create, create, doubleClick, doubleClick, drag, dragDrop, dragDrop, dropAt, dropAt, exists, exists, find, findAll, findAllNow, findNow, getAutoWaitTimeout, getBottomLeft, getBottomRight, getCenter, getEventManager, getFindFailedResponse, getH, getLastMatch, getLastMatches, getLocationFromPSRML, getRect, getRegionFromPSRM, getROI, getScreen, getThrowException, getTopLeft, getTopRight, getW, getX, getY, highlight, highlight, highlight, hover, init, inside, keyDown, keyDown, keyUp, keyUp, keyUp, left, left, listText, morphTo, mouseDown, mouseMove, mouseUp, mouseUp, moveTo, nearby, nearby, observe, observe, observeInBackground, offset, onAppear, onChange, onChange, onVanish, paste, paste, right, right, rightClick, rightClick, setAutoWaitTimeout, setFindFailedResponse, setH, setRect, setRect, setRect, setROI, setROI, setROI, setThrowException, setW, setX, setY, stopObserver, text, toJythonRegion, type, type, type, type, updateSelf, wait, wait, wait, waitAll, waitVanish, waitVanish, wheel, wheel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_curGD

protected GraphicsDevice _curGD

_curID

protected int _curID

_primaryScreen

protected static int _primaryScreen

_waitPrompt

protected boolean _waitPrompt

_prompt

protected CapturePrompt _prompt

_overlay

protected ScreenHighlighter _overlay
Constructor Detail

Screen

public Screen(int id)

Screen

public Screen()
Method Detail

newRegion

public Region newRegion(Rectangle rect)
Specified by:
newRegion in interface IScreen

getNumberScreens

public static int getNumberScreens()

getRobot

public static IRobot getRobot(int id)

getPrimaryId

public static int getPrimaryId()

getRobot

public IRobot getRobot()
Specified by:
getRobot in interface IScreen

getGraphicsDevice

public GraphicsDevice getGraphicsDevice()

getBounds

public static Rectangle getBounds(int id)

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface IScreen

getID

public int getID()

initBounds

protected void initBounds()

capture

public ScreenImage capture()
Specified by:
capture in interface IScreen

capture

public ScreenImage capture(int x,
                           int y,
                           int w,
                           int h)
Specified by:
capture in interface IScreen

capture

public ScreenImage capture(Rectangle rect)
Specified by:
capture in interface IScreen

capture

public ScreenImage capture(Region reg)
Specified by:
capture in interface IScreen

userCapture

public ScreenImage userCapture()

userCapture

public ScreenImage userCapture(String msg)

update

public void update(Subject s)
Specified by:
update in interface Observer

selectRegion

public Region selectRegion()

selectRegion

public Region selectRegion(String msg)

showMove

public void showMove(Location loc)
Specified by:
showMove in interface IScreen

showClick

public void showClick(Location loc)
Show the click

Specified by:
showClick in interface IScreen
Parameters:
loc - the location of the click

showTarget

public void showTarget(Location loc)
Specified by:
showTarget in interface IScreen

showTarget

public void showTarget(Location loc,
                       double secs)

showDropTarget

public void showDropTarget(Location loc)
Specified by:
showDropTarget in interface IScreen

toString

public String toString()
Overrides:
toString in class Region