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
 
Fields inherited from class org.sikuli.script.Region
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(java.awt.Rectangle rect)
           
 ScreenImage capture(Region reg)
           
 java.awt.Rectangle getBounds()
           
static java.awt.Rectangle getBounds(int id)
           
 java.awt.GraphicsDevice getGraphicsDevice()
           
 int getID()
           
static int getNumberScreens()
           
static int getPrimaryId()
           
 IRobot getRobot()
           
static IRobot getRobot(int id)
           
 Region newRegion(java.awt.Rectangle rect)
           
 Region selectRegion()
           
 Region selectRegion(java.lang.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)
           
 java.lang.String toString()
           
 void update(Subject s)
           
 ScreenImage userCapture()
           
 ScreenImage userCapture(java.lang.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, getFindFailedResponse, getH, getLastMatch, getLastMatches, getLocationFromPSRML, getRect, getRegionFromPSRM, getROI, getScreen, getThrowException, getTopLeft, getTopRight, getW, getX, getY, highlight, highlight, hover, 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, wait, wait, wait, waitAll, waitVanish, waitVanish, wheel, wheel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Screen

public Screen(int id)

Screen

public Screen()
Method Detail

newRegion

public Region newRegion(java.awt.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 java.awt.GraphicsDevice getGraphicsDevice()

getBounds

public static java.awt.Rectangle getBounds(int id)

getBounds

public java.awt.Rectangle getBounds()
Specified by:
getBounds in interface IScreen

getID

public int getID()

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(java.awt.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(java.lang.String msg)

update

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

selectRegion

public Region selectRegion()

selectRegion

public Region selectRegion(java.lang.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 java.lang.String toString()
Overrides:
toString in class Region