mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add method
This commit is contained in:
parent
d1861eb9db
commit
5bbb6539b3
@ -16,6 +16,7 @@
|
|||||||
* 【core 】 NumberUtil增加calculate方法
|
* 【core 】 NumberUtil增加calculate方法
|
||||||
* 【core 】 优化TextSimilarity.longestCommonSubstring性能(issue#I42A6V@Gitee)
|
* 【core 】 优化TextSimilarity.longestCommonSubstring性能(issue#I42A6V@Gitee)
|
||||||
* 【core 】 MultipartRequestInputStream改为使用long以支持大文件(issue#I428AN@Gitee)
|
* 【core 】 MultipartRequestInputStream改为使用long以支持大文件(issue#I428AN@Gitee)
|
||||||
|
* 【core 】 RobotUtl增加getDelay、getRobot方法(pr#1725@Github)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复RobotUtil双击右键问题(pr#1721@Github)
|
* 【core 】 修复RobotUtil双击右键问题(pr#1721@Github)
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package cn.hutool.core.swing;
|
package cn.hutool.core.swing;
|
||||||
|
|
||||||
|
import cn.hutool.core.exceptions.UtilException;
|
||||||
|
import cn.hutool.core.img.ImgUtil;
|
||||||
|
import cn.hutool.core.swing.clipboard.ClipboardUtil;
|
||||||
|
|
||||||
import java.awt.AWTException;
|
import java.awt.AWTException;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.Robot;
|
import java.awt.Robot;
|
||||||
@ -8,10 +12,6 @@ import java.awt.event.KeyEvent;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import cn.hutool.core.exceptions.UtilException;
|
|
||||||
import cn.hutool.core.img.ImgUtil;
|
|
||||||
import cn.hutool.core.swing.clipboard.ClipboardUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Robot} 封装工具类,提供截屏等工具
|
* {@link Robot} 封装工具类,提供截屏等工具
|
||||||
*
|
*
|
||||||
@ -32,12 +32,15 @@ public class RobotUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取 Robot 实例
|
* 获取 Robot 单例实例
|
||||||
|
*
|
||||||
|
* @return {@link Robot}单例对象
|
||||||
|
* @since 5.7.6
|
||||||
*/
|
*/
|
||||||
public static Robot getRobot() {
|
public static Robot getRobot() {
|
||||||
return ROBOT;
|
return ROBOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置默认的延迟时间<br>
|
* 设置默认的延迟时间<br>
|
||||||
* 当按键执行完后的等待时间,也可以用ThreadUtil.sleep方法代替
|
* 当按键执行完后的等待时间,也可以用ThreadUtil.sleep方法代替
|
||||||
@ -49,6 +52,15 @@ public class RobotUtil {
|
|||||||
delay = delayMillis;
|
delay = delayMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取默认的延迟时间
|
||||||
|
*
|
||||||
|
* @since 5.7.6
|
||||||
|
*/
|
||||||
|
public static int getDelay() {
|
||||||
|
return delay;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模拟鼠标移动
|
* 模拟鼠标移动
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user