public class Screen extends Region implements IScreen
Modifier and Type | Field and Description |
---|---|
static boolean |
ignorePrimaryAtCapture |
BB, BH, BL, BM, BR, C2, CH, CREATE_X_DIRECTION_LEFT, CREATE_X_DIRECTION_RIGHT, CREATE_Y_DIRECTION_BOTTOM, CREATE_Y_DIRECTION_TOP, CV, EAST, EAST_MID, EAST_NORTH, EAST_SOUTH, EH, EM, EN, ES, h, LB, LH, LL, LM, LT, M2, M3, MH, MID_HORIZONTAL, MID_VERTICAL, MIDDLE, MIDDLE_BIG, MM, MV, NE, NH, NM, NORTH, NORTH_EAST, NORTH_MID, NORTH_WEST, NW, RB, RH, RM, RR, RT, SE, SH, SM, SOUTH, SOUTH_EAST, SOUTH_MID, SOUTH_WEST, SW, TH, TL, TM, TR, TT, w, WEST, WEST_MID, WEST_NORTH, WEST_SOUTH, WH, WM, WN, WS, x, y
Constructor and Description |
---|
Screen()
Is the screen object having the top left corner as (0,0).
|
Screen(boolean isScreenUnion)
INTERNAL USE
collect all physical screens to one big region
TODO: under evaluation, wether it really makes sense |
Screen(int id)
The screen object with the given id
|
Modifier and Type | Method and Description |
---|---|
static ScreenUnion |
all()
create a Screen (ScreenUnion) object as a united region of all available monitors
|
static Screen |
as(int id) |
ScreenImage |
capture()
create a ScreenImage with the physical bounds of this screen
|
ScreenImage |
capture(int x,
int y,
int w,
int h)
create a ScreenImage with given coordinates on this screen.
|
ScreenImage |
capture(Rectangle rect)
create a ScreenImage with given rectangle on this screen.
|
ScreenImage |
capture(Region reg)
create a ScreenImage with given region on this screen
|
ScreenImage |
captureforHighlight(int x,
int y,
int w,
int h) |
static void |
closePrompt() |
static void |
closePrompt(Screen scr) |
ScreenImage |
cmdCapture(Object... args) |
static void |
doPrompt(String message,
EventObserver obs) |
Rectangle |
getBounds() |
static Rectangle |
getBounds(int id) |
int |
getcurrentID() |
static IRobot |
getGlobalRobot() |
int |
getID() |
int |
getIdFromPoint(int x,
int y)
INTERNAL USE: to be compatible with ScreenUnion
|
ScreenImage |
getLastScreenImageFromScreen() |
static int |
getNumberScreens() |
static int |
getPrimaryId() |
static Screen |
getPrimaryScreen() |
IRobot |
getRobot()
Gets the Robot of this Screen.
|
static IRobot |
getRobot(int id)
each screen has exactly one robot (internally used for screen capturing)
available as a convenience for those who know what they are doing. |
Screen |
getScreen() |
static Screen |
getScreen(int id) |
boolean |
hasPrompt() |
void |
initScreen(Screen scr) |
Location |
newLocation(Location loc)
creates a location on the current screen with the given point.
|
Region |
newRegion(Location loc,
int width,
int height)
creates a region on the current screen with the given coordinate/size.
|
static void |
resetMonitors()
re-initialize the monitor setup (e.g.
|
static void |
resetPrompt(OverlayCapturePrompt ocp) |
String |
saveCapture(String name) |
String |
saveCapture(String name,
Region reg) |
Region |
selectRegion()
interactive region create with predefined message: lets the user draw the rectangle using the
mouse
|
Region |
selectRegion(String message)
interactive region create with given message: lets the user draw the rectangle using the mouse
|
void |
setAsScreen()
INTERNAL USE
reset from being a screen union to the screen used before
|
void |
setAsScreenUnion()
INTERNAL USE
collect all physical screens to one big region
This is under evaluation, wether it really makes sense |
static void |
showMonitors()
show the current monitor setup
|
void |
showTarget(Location loc) |
String |
toString() |
String |
toStringShort()
only a short version of toString()
|
ScreenImage |
userCapture()
interactive capture with predefined message: lets the user capture a screen image using the
mouse to draw the rectangle
|
ScreenImage |
userCapture(String message)
interactive capture with given message: lets the user capture a screen image using the mouse to
draw the rectangle
|
above, above, aboveAt, aboveAt, add, add, add, aInput, aKey, asOffset, aSwipe, aSwipeDown, aSwipeLeft, aSwipeRight, aSwipeUp, aTap, atMouse, below, below, belowAt, belowAt, click, click, click, compare, compare, contains, contains, containsMouse, copyTo, copyTo, create, create, create, create, create, delayClick, delayType, doubleClick, doubleClick, doubleClick, drag, dragDrop, dragDrop, dropAt, exists, exists, find, findAll, findAllByColumn, findAllByRow, findAllText, findBest, findText, findText, get, getAutoWaitTimeout, getBottomLeft, getBottomRight, getCell, getCenter, getCol, getCol, getCols, getColW, getEvent, getEvents, getFindFailedResponse, getH, getIDString, getLastMatch, getLastMatches, getLastScreenImage, getLastScreenImageFile, getLastScreenImageFile, getLastScreenImageFile, getObserveScanRate, getRect, getRepeatWaitTime, getROI, getRow, getRow, getRowH, getRows, getScreenContaining, getTarget, getThrowException, getTopLeft, getTopRight, getW, getWaitScanRate, getX, getY, grow, grow, grow, grow, grow, grow, grow, hasEvents, hasObserver, highlight, highlight, highlight, highlight, highlight, highlight, hover, hover, initScreen, inside, intersection, isObserving, isOtherScreen, isRasterValid, isValid, isVirtual, keyDown, keyDown, keyUp, keyUp, keyUp, left, left, leftAt, leftAt, listText, morphTo, mouseDown, mouseMove, mouseMove, mouseMove, mouseUp, mouseUp, moveTo, nearby, nearby, observe, observe, observeInBackground, observeInLine, offset, offset, onAppear, onAppear, onChange, onChange, onChange, onChange, onChangeDo, onVanish, onVanish, paste, paste, resetScreens, right, right, rightAt, rightAt, rightClick, rightClick, rightClick, saveLastScreenImage, saveScreenCapture, saveScreenCapture, saveScreenCapture, setActive, setAutoWaitTimeout, setBottomLeft, setBottomRight, setCenter, setCols, setFindFailedHandler, setFindFailedResponse, setH, setImageMissingHandler, setInactive, setLocation, setObserveScanRate, setOtherScreen, setOtherScreen, setRaster, setRect, setRect, setRect, setRepeatWaitTime, setROI, setROI, setROI, setROI, setRows, setSize, setThrowException, setTopLeft, setTopRight, setVirtual, setW, setWaitScanRate, setX, setY, showScreens, stopObserver, stopObserver, text, type, type, type, type, type, type, union, virtual, wait, wait, wait, waitVanish, waitVanish, wheel, wheel, wheel, write
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getH, getIDString, getLastScreenImageFile, getRect, getW, getX, getY, isOtherScreen
public Screen(int id)
id
- valid screen numberpublic Screen(boolean isScreenUnion)
isScreenUnion
- true/falsepublic Screen()
public int getcurrentID()
public static IRobot getGlobalRobot()
public static ScreenUnion all()
public static Screen as(int id)
public void setAsScreenUnion()
public void setAsScreen()
public void initScreen(Screen scr)
public static void showMonitors()
public static void resetMonitors()
public static int getNumberScreens()
public static int getPrimaryId()
public static Screen getPrimaryScreen()
public static Screen getScreen(int id)
id
- of the screenpublic Rectangle getBounds()
public static Rectangle getBounds(int id)
id
- of the screenpublic static IRobot getRobot(int id)
id
- of the screenpublic int getIdFromPoint(int x, int y)
getIdFromPoint
in interface IScreen
x
- valuey
- valuepublic IRobot getRobot()
public Region newRegion(Location loc, int width, int height)
loc
- Locationwidth
- valueheight
- valuepublic ScreenImage getLastScreenImageFromScreen()
getLastScreenImageFromScreen
in interface IScreen
public Location newLocation(Location loc)
loc
- Locationpublic ScreenImage cmdCapture(Object... args)
public ScreenImage capture()
public ScreenImage capture(int x, int y, int w, int h)
public ScreenImage captureforHighlight(int x, int y, int w, int h)
public ScreenImage capture(Rectangle rect)
public ScreenImage capture(Region reg)
public static void doPrompt(String message, EventObserver obs)
public static void closePrompt()
public static void closePrompt(Screen scr)
public static void resetPrompt(OverlayCapturePrompt ocp)
public boolean hasPrompt()
public ScreenImage userCapture()
public ScreenImage userCapture(String message)
userCapture
in interface IScreen
message
- textpublic Region selectRegion()
public Region selectRegion(String message)
message
- textpublic void showTarget(Location loc)
showTarget
in interface IScreen
public String toStringShort()
toStringShort
in interface IScreen
toStringShort
in class Region
Copyright © 2017. All rights reserved.