public class RobotUtil
extends java.lang.Object
Robot 封装工具类,提供截屏等工具| 限定符和类型 | 字段和说明 |
|---|---|
static java.awt.Robot |
robot |
| 构造器和说明 |
|---|
RobotUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static java.awt.image.BufferedImage |
captureScreen()
截取全屏
|
static java.io.File |
captureScreen(java.io.File outFile)
截取全屏到文件
|
static java.awt.image.BufferedImage |
captureScreen(java.awt.Rectangle screenRect)
截屏
|
static java.io.File |
captureScreen(java.awt.Rectangle screenRect,
java.io.File outFile)
截屏
|
public static java.awt.image.BufferedImage captureScreen()
public static java.io.File captureScreen(java.io.File outFile)
outFile - 写出到的文件public static java.awt.image.BufferedImage captureScreen(java.awt.Rectangle screenRect)
screenRect - 截屏的矩形区域public static java.io.File captureScreen(java.awt.Rectangle screenRect,
java.io.File outFile)
screenRect - 截屏的矩形区域outFile - 写出到的文件Copyright © 2018. All rights reserved.