You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
926 B

package com.example.jmacro.wjdr;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.TaskUtil;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
/**
* 脚本线程
*
* @author wangbing
* @version 0.0.1
* @since 1.8
*/
public abstract class JMacroThread implements Runnable {
/**
* 脚本对象
*/
protected JMacro macro;
/**
* 视口区域
*/
protected ViewRect viewRect;
public JMacroThread(JMacro macro) {
this.macro = macro;
TaskUtil.asyncTask(() -> {
viewRect = TaskUtil.timeTask(this::location, 10, TimeUnit.SECONDS);
});
}
/**
* 获取视口区域
*
* @return 视口区域
*/
public abstract ViewRect location();
public ViewRect getViewRect() {
return viewRect;
}
public JMacro getMacro() {
return macro;
}
}

Powered by TurnKey Linux.