org.sikuli.api
Class DefaultRegion

java.lang.Object
  extended by org.sikuli.api.DefaultRegion
All Implemented Interfaces:
Region

public class DefaultRegion
extends Object
implements Region

The DefaultRegion class is used to describe a region of the screen.


Constructor Summary
DefaultRegion(int x, int y, int width, int height)
          Constructs a new screen region whose upper-left corner is specified as (x,y) and whose width and height are specified by the arguments of the same name.
DefaultRegion(Rectangle bounds)
          Constructs a new screen region, initialized to match the bounds of the specified Rectangle.
 
Method Summary
 Rectangle getBounds()
          Returns the bounding Rectangle of this Region.
 int getHeight()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 void setBounds(Rectangle newBounds)
          Sets the bounding Rectangle of this Rectangle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRegion

public DefaultRegion(int x,
                     int y,
                     int width,
                     int height)
Constructs a new screen region whose upper-left corner is specified as (x,y) and whose width and height are specified by the arguments of the same name.

Parameters:
x - the specified X coordinate
y - the specified Y coordinate
width - the specified width of the screen region.
height - the specified height of the screen region.

DefaultRegion

public DefaultRegion(Rectangle bounds)
Constructs a new screen region, initialized to match the bounds of the specified Rectangle.

Parameters:
bounds - the Rectangle from which to create the initial values of the newly constructed screen region.
Method Detail

getBounds

public Rectangle getBounds()
Description copied from interface: Region
Returns the bounding Rectangle of this Region.

Specified by:
getBounds in interface Region
Returns:
a Rectangle object that represents the bounding of this Region.

setBounds

public void setBounds(Rectangle newBounds)
Description copied from interface: Region
Sets the bounding Rectangle of this Rectangle.

Specified by:
setBounds in interface Region
Parameters:
newBounds - the specified bounding Rectangle.

getX

public int getX()
Specified by:
getX in interface Region

getY

public int getY()
Specified by:
getY in interface Region

getWidth

public int getWidth()
Specified by:
getWidth in interface Region

getHeight

public int getHeight()
Specified by:
getHeight in interface Region


Copyright © 2014. All rights reserved.