org.sikuli.api
Class DesktopScreenRegion

java.lang.Object
  extended by org.sikuli.api.AbstractScreenRegion
      extended by org.sikuli.api.DefaultScreenRegion
          extended by org.sikuli.api.DesktopScreenRegion
All Implemented Interfaces:
Region, ScreenRegion

public class DesktopScreenRegion
extends DefaultScreenRegion
implements ScreenRegion

A DesktopScreenRegion object is used to describe a region of any DesktopScreen.


Constructor Summary
DesktopScreenRegion()
          Creates a ScreenRegion in full screen on the default screen (i.e., screen 0)
DesktopScreenRegion(int id)
          Creates a ScreenRegion in full screen on a screen specified by an id.
DesktopScreenRegion(int x, int y, int width, int height)
          Create a screen region based on X, Y, width and height.
DesktopScreenRegion(int id, int x, int y, int width, int height)
          Create a screen region based on the specified screen id and region values.
 
Method Summary
 
Methods inherited from class org.sikuli.api.DefaultScreenRegion
addROI, addState, addStateChangeEventListener, addTargetEventListener, capture, find, findAll, getCenter, getLastCapturedImage, getLowerLeftCorner, getLowerRightCorner, getROIs, getState, getStates, getUpperLeftCorner, getUpperRightCorner, removeState, removeTargetEventListener, snapshot, wait
 
Methods inherited from class org.sikuli.api.AbstractScreenRegion
getBounds, getHeight, getRelativeScreenLocation, getRelativeScreenRegion, getScore, getScreen, getWidth, getX, getY, setBounds, setHeight, setScore, setScreen, setWidth, setX, setY, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sikuli.api.ScreenRegion
addROI, addState, addStateChangeEventListener, addTargetEventListener, capture, find, findAll, getCenter, getLastCapturedImage, getLowerLeftCorner, getLowerRightCorner, getRelativeScreenLocation, getRelativeScreenRegion, getROIs, getScore, getScreen, getState, getStates, getUpperLeftCorner, getUpperRightCorner, removeState, removeTargetEventListener, setScore, setScreen, snapshot, wait
 
Methods inherited from interface org.sikuli.api.Region
getBounds, getHeight, getWidth, getX, getY, setBounds
 

Constructor Detail

DesktopScreenRegion

public DesktopScreenRegion()
Creates a ScreenRegion in full screen on the default screen (i.e., screen 0)


DesktopScreenRegion

public DesktopScreenRegion(int id)
Creates a ScreenRegion in full screen on a screen specified by an id. The specified screen id refers to the order of the connected screens. For example, in a dual monitor setup, a screen id of 0 refers to the main display and 1 refers to the secondary display.

Parameters:
id - the screen id.

DesktopScreenRegion

public DesktopScreenRegion(int x,
                           int y,
                           int width,
                           int height)
Create a screen region based on X, Y, width and height. The related screen will be determined automatically based on the center of the rectangle and default to screen 0 in case the center is outside of all available screens.

Parameters:
x - The X coordinate of the upper-left corner of the rectangular screen region.
y - The Y coordinate of the upper-left corner of the rectangular screen region.
width - The width of the rectangular screen region.
height - The height of the rectangular screen region.

DesktopScreenRegion

public DesktopScreenRegion(int id,
                           int x,
                           int y,
                           int width,
                           int height)
Create a screen region based on the specified screen id and region values.

Parameters:
id - the screen id.
x - The X coordinate of the upper-left corner of the rectangular screen region.
y - The Y coordinate of the upper-left corner of the rectangular screen region.
width - The width of the rectangular screen region.
height - The height of the rectangular screen region


Copyright © 2014. All rights reserved.