org.sikuli.api
Class Relative.RelativeScreenRegionBuilder

java.lang.Object
  extended by org.sikuli.api.Relative.RelativeScreenRegionBuilder
Enclosing class:
Relative

public static class Relative.RelativeScreenRegionBuilder
extends Object

A RelativeScreenRegionBuilder represents a copy of the original ScreenRegion.


Constructor Summary
Relative.RelativeScreenRegionBuilder(ScreenRegion screenRegion)
          Constructs a new RelativeScreenRegionBuilder that is a copy of the specified ScreenRegion.
 
Method Summary
 Relative.RelativeScreenRegionBuilder above(int amount)
          Returns a new RelativeScreenRegionBuilder object that is above this ScreenRegion by the specified amount.
 Relative.RelativeScreenRegionBuilder below(int amount)
          Returns a new RelativeScreenRegionBuilder object that is below this ScreenRegion by the specified amount.
 Relative.RelativeScreenLocationBuilder bottomCenter()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-center of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder bottomLeft()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-left corner of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder bottomRight()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-right corner of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder center()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the center of this ScreenRegion.
 ScreenRegion getScreenRegion()
          Returns the ScreenRegion of this RelativeScreenRegionBuilder.
 Relative.RelativeScreenRegionBuilder left(int amount)
          Returns a new RelativeScreenRegionBuilder object relative to the left of this ScreenRegion by the specified amount.
 Relative.RelativeScreenLocationBuilder middleLeft()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the middle-left location of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder middleRight()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the middle-right location of this ScreenRegion.
 Relative.RelativeScreenRegionBuilder narrower(int amount)
          Returns a new RelativeScreenRegionBuilder object that is narrower than this ScreenRegion by the specified amount.
 Relative.RelativeScreenRegionBuilder offset(int x, int y)
          Returns a new RelativeScreenRegionBuilder object to the offset of the ScreenRegion
 Relative.RelativeScreenRegionBuilder region(double xmin, double ymin, double xmax, double ymax)
          Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of the ScreenRegion.
 Relative.RelativeScreenRegionBuilder region(int x, int y, int width, int height)
          Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of this ScreenRegion.
 Relative.RelativeScreenRegionBuilder region(Region region)
          Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of this ScreenRegion.
 Relative.RelativeScreenRegionBuilder right(int amount)
          Returns a new RelativeScreenRegionBuilder object relative to the right of this ScreenRegion by the specified amount.
 Relative.RelativeScreenRegionBuilder shorter(int amount)
          Returns a new RelativeScreenRegionBuilder object that is shorter than this ScreenRegion by the specified amount.
 Relative.RelativeScreenRegionBuilder taller(int amount)
          Returns a new RelativeScreenRegionBuilder object that is taller than this ScreenRegion by the specified amount.
 Relative.RelativeScreenLocationBuilder topCenter()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the top-center of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder topLeft()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the top-left corner of this ScreenRegion.
 Relative.RelativeScreenLocationBuilder topRight()
          Returns a new RelativeScreenLocationBuilder object that corresponds to the top-right corner of this ScreenRegion.
 Relative.RelativeScreenRegionBuilder wider(int amount)
          Returns a new RelativeScreenRegionBuilder object that is wider than this ScreenRegion by the specified amount.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Relative.RelativeScreenRegionBuilder

public Relative.RelativeScreenRegionBuilder(ScreenRegion screenRegion)
Constructs a new RelativeScreenRegionBuilder that is a copy of the specified ScreenRegion.

Parameters:
screenRegion - the ScreenRegion to which a relative region is created.
Method Detail

offset

public Relative.RelativeScreenRegionBuilder offset(int x,
                                                   int y)
Returns a new RelativeScreenRegionBuilder object to the offset of the ScreenRegion

Parameters:
x - x offset
y - y offset
Returns:
a new RelativeScreenRegionBuilder object to the offset of this ScreenRegion.

right

public Relative.RelativeScreenRegionBuilder right(int amount)
Returns a new RelativeScreenRegionBuilder object relative to the right of this ScreenRegion by the specified amount.

Parameters:
amount - the pixel amount to move to the right.
Returns:
a new RelativeScreenRegionBuilder object to the right of this ScreenRegion.

left

public Relative.RelativeScreenRegionBuilder left(int amount)
Returns a new RelativeScreenRegionBuilder object relative to the left of this ScreenRegion by the specified amount.

Parameters:
amount - the pixel amount to move to the left.
Returns:
a new RelativeScreenRegionBuilder object to the left of this ScreenRegion.

above

public Relative.RelativeScreenRegionBuilder above(int amount)
Returns a new RelativeScreenRegionBuilder object that is above this ScreenRegion by the specified amount.

Parameters:
amount - the pixel amount to go above.
Returns:
a new RelativeScreenRegionBuilder object that is above this ScreenRegion.

below

public Relative.RelativeScreenRegionBuilder below(int amount)
Returns a new RelativeScreenRegionBuilder object that is below this ScreenRegion by the specified amount.

Parameters:
amount - the pixel amount to go below.
Returns:
a new RelativeScreenRegionBuilder object that is below this ScreenRegion.

shorter

public Relative.RelativeScreenRegionBuilder shorter(int amount)
Returns a new RelativeScreenRegionBuilder object that is shorter than this ScreenRegion by the specified amount. That is it, it decreases the height of the height of the relative region by the specified amount.

Parameters:
amount - the pixel amount to decrease the height of this ScreenRegion.
Returns:
a new RelativeScreenRegionBuilder object that is shorter than this ScreenRegion.

taller

public Relative.RelativeScreenRegionBuilder taller(int amount)
Returns a new RelativeScreenRegionBuilder object that is taller than this ScreenRegion by the specified amount. That is it, it increases the height of the relative region by the specified amount.

Parameters:
amount - the pixel amount to increase the height of this ScreenRegion.
Returns:
a new RelativeScreenRegionBuilder object that is taller than this ScreenRegion.

narrower

public Relative.RelativeScreenRegionBuilder narrower(int amount)
Returns a new RelativeScreenRegionBuilder object that is narrower than this ScreenRegion by the specified amount. That is it, it decreases the width of the relative region by the specified amount.

Parameters:
amount - the pixel amount to decrease the width of this ScreenRegion.
Returns:
a new RelativeScreenRegionBuilder object that is narrower than this ScreenRegion.

wider

public Relative.RelativeScreenRegionBuilder wider(int amount)
Returns a new RelativeScreenRegionBuilder object that is wider than this ScreenRegion by the specified amount. That is it, it increases the width of the relative region by the specified amount.

Parameters:
amount - the pixel amount to increase the width of this ScreenRegion.
Returns:
a new RelativeScreenRegionBuilder object that is wider than this ScreenRegion.

region

public Relative.RelativeScreenRegionBuilder region(Region region)
Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of this ScreenRegion.

Parameters:
region - the region that is relative to this ScreenRegion
Returns:
a new RelativeScreenRegionBuilder object that is relative to this ScreenRegion.

region

public Relative.RelativeScreenRegionBuilder region(int x,
                                                   int y,
                                                   int width,
                                                   int height)
Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of this ScreenRegion. The region is specified as the x, y location of its upper-left corner relative to the upper-left corner of the original ScreenRegion.

Parameters:
x - x location of the derived region
y - y location lowerof the derived region
width - width of the derived region
height - height of the derived region
Returns:
a new RelativeScreenRegionBuilder object that is relative to this ScreenRegion.

region

public Relative.RelativeScreenRegionBuilder region(double xmin,
                                                   double ymin,
                                                   double xmax,
                                                   double ymax)
Returns a new RelativeScreenRegionBuilder object that is a region relative to the upper-left corner (origin) of the ScreenRegion. The region is specified as the the start and end x locations and y locations in ratios with respect to the width and height of the original ScreenRegion. (0,0) refers to the upper-left corner and (1,1) refers to the lower-right corner.

Parameters:
xmin - start x location
ymin - start y location
xmax - end x location
ymax - end y location
Returns:
a new RelativeScreenRegionBuilder object that is relative to this ScreenRegion.

center

public Relative.RelativeScreenLocationBuilder center()
Returns a new RelativeScreenLocationBuilder object that corresponds to the center of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the center of this ScreenRegion.

topLeft

public Relative.RelativeScreenLocationBuilder topLeft()
Returns a new RelativeScreenLocationBuilder object that corresponds to the top-left corner of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the top-left corner of this ScreenRegion.

topCenter

public Relative.RelativeScreenLocationBuilder topCenter()
Returns a new RelativeScreenLocationBuilder object that corresponds to the top-center of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the top-center of this ScreenRegion.

topRight

public Relative.RelativeScreenLocationBuilder topRight()
Returns a new RelativeScreenLocationBuilder object that corresponds to the top-right corner of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the top-right corner of this ScreenRegion.

bottomRight

public Relative.RelativeScreenLocationBuilder bottomRight()
Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-right corner of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the bottom-right corner of this ScreenRegion.

bottomCenter

public Relative.RelativeScreenLocationBuilder bottomCenter()
Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-center of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the bottom-center of this ScreenRegion.

bottomLeft

public Relative.RelativeScreenLocationBuilder bottomLeft()
Returns a new RelativeScreenLocationBuilder object that corresponds to the bottom-left corner of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the bottom-left corner of this ScreenRegion.

middleLeft

public Relative.RelativeScreenLocationBuilder middleLeft()
Returns a new RelativeScreenLocationBuilder object that corresponds to the middle-left location of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the middle-left location of this ScreenRegion.

middleRight

public Relative.RelativeScreenLocationBuilder middleRight()
Returns a new RelativeScreenLocationBuilder object that corresponds to the middle-right location of this ScreenRegion.

Returns:
a new RelativeScreenLocationBuilder object that represents the middle-right location of this ScreenRegion.

getScreenRegion

public ScreenRegion getScreenRegion()
Returns the ScreenRegion of this RelativeScreenRegionBuilder.

Returns:
the ScreenRegion of this RelativeScreenRegionBuilder.


Copyright © 2014. All rights reserved.