上传备份

wjdr
王兵 1 year ago
parent 496334a3a3
commit f837faf724

@ -1,3 +1,21 @@
# starter-jmacro
# 简介
JMacro使用Java Robot工具实现的自动化/脚本脚手架,屏幕找图,定位,模拟人操作鼠标、键盘等基本事件。
java版按键精灵实现基础
#背景
###环境依赖
jdk1.8
### 构建工具
Maven 3+
### 依赖说明
Hutool一个小而全的Java工具类库通过静态方法封装降低相关API的学习成本提高工作效率
##打包EXE可执行文件
```
maven package
```
执行程序输出目录target

@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>starter-jmacro-wjdr</artifactId>
<version>0.0.1-SNAPSHOT</version>
<groupId>xyz.wbsite</groupId>
<artifactId>jmacro</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<!--<packaging>war</packaging>--><!--需要打包成war时放开-->
<name>starter-jmacro-wjdr</name>
<name>jmacro</name>
<description>project for jmacro</description>
<properties>
@ -82,6 +82,83 @@
<target>${java.version}</target>
</configuration>
</plugin>
<!-- 打包可执行文件 -->
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.8.3</version>
<configuration>
<!-- 启动类 -->
<mainClass>xyz.wbsite.jmacro.JMainApplication</mainClass>
<!-- 公司名称 -->
<vendor>${project.artifactId}</vendor>
<!-- 应用名称 ${project.build.finalName} = ${project.artifactId}-${project.version} -->
<appName>${project.artifactId}</appName>
<!-- 编译后的jfx/app下的jar包名称 -->
<jfxMainAppJarName>${project.artifactId}.jar</jfxMainAppJarName>
<!-- 发行版本 -->
<nativeReleaseVersion>${project.version}</nativeReleaseVersion>
<!--
图标设置
> 参考https://stackoverflow.com/questions/15880102/how-to-set-custom-icon-for-javafx-native-package-icon-on-windows
# 方式1按deployDir、appName配置读取ico文件
# 使用jfx:native打包时默认会去src/main/deploy/package/windows/${appName}.ico
<deployDir>${project.basedir}/src/main/deploy</deployDir>
# 方式2固定使用一个图标与版本号无关
# 优先级高于第一种方式
<bundleArguments>
<icon>${project.basedir}/src/main/resources/icon/icon.ico</icon>
</bundleArguments>
-->
<bundleArguments>
<icon>${project.basedir}/src/main/resources/icon.ico</icon>
</bundleArguments>
<!-- 桌面图标 -->
<needShortcut>true</needShortcut>
<!-- 菜单设置 -->
<needMenu>true</needMenu>
</configuration>
<executions>
<execution>
<id>create-jfx-jar</id>
<phase>package</phase>
<goals>
<goal>build-jar</goal>
</goals>
</execution>
<execution>
<id>create-exe</id>
<phase>package</phase>
<goals>
<goal>build-native</goal>
</goals>
</execution>
</executions>
</plugin>
<!--处理图例文件-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<move file="${project.build.directory}/jfx/native/${project.artifactId}"
tofile="${project.build.directory}/${project.artifactId}-${project.version}"/>
<copydir src="${project.basedir}/legend"
dest="${project.build.directory}/${project.artifactId}-${project.version}/app/legend"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -1,15 +1,15 @@
package com.example.jmacro.wjdr;
package xyz.wbsite.jmacro;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.RandomUtil;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.base.ViewColor;
import com.example.jmacro.wjdr.base.ViewPoint;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.ColorUtil;
import com.example.jmacro.wjdr.util.ImageUtil;
import com.example.jmacro.wjdr.util.Logger;
import com.example.jmacro.wjdr.util.TaskUtil;
import xyz.wbsite.jmacro.base.Legend;
import xyz.wbsite.jmacro.base.ViewColor;
import xyz.wbsite.jmacro.base.ViewPoint;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.ColorUtil;
import xyz.wbsite.jmacro.util.ImageUtil;
import xyz.wbsite.jmacro.util.Logger;
import xyz.wbsite.jmacro.util.TaskUtil;
import java.awt.*;
import java.awt.event.InputEvent;

@ -1,10 +1,9 @@
package com.example.jmacro.wjdr;
package xyz.wbsite.jmacro;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.ui.FXMLUtil;
import com.example.jmacro.wjdr.util.Logger;
import com.example.jmacro.wjdr.util.ResourceUtil;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.ui.FXMLUtil;
import xyz.wbsite.jmacro.util.Logger;
import xyz.wbsite.jmacro.util.ResourceUtil;
import com.melloware.jintellitype.JIntellitype;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
@ -81,6 +80,7 @@ public class JMainApplication extends Application {
}
mouseLeftDoubleClick();
ViewRect = waitAndFindLegend(of("关闭"), 0.99, 10);
if ( == null) {
return;
}

@ -1,13 +1,12 @@
package com.example.jmacro.wjdr;
package xyz.wbsite.jmacro;
import cn.hutool.core.thread.ThreadUtil;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.tool.PickLegend;
import com.example.jmacro.wjdr.tool.PickPoint;
import com.example.jmacro.wjdr.tool.PickRect;
import com.example.jmacro.wjdr.util.DialogUtil;
import com.example.jmacro.wjdr.util.TaskUtil;
import xyz.wbsite.jmacro.base.Legend;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.tool.Measure;
import xyz.wbsite.jmacro.tool.PickLegend;
import xyz.wbsite.jmacro.tool.PickPoint;
import xyz.wbsite.jmacro.tool.PickRect;
import xyz.wbsite.jmacro.util.DialogUtil;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
@ -87,6 +86,23 @@ public class JMainController {
}
}
/**
*
*/
@FXML
public void measure() {
ViewRect screen = JMainService.getInstance().getMacro().getFocusRect();
if (screen == null) {
DialogUtil.alert("未定位到视口,请稍后再试!");
return;
}
try {
new Measure(screen.getLeft(), screen.getTop());
} catch (AWTException awtException) {
awtException.printStackTrace();
}
}
/**
*
*/
@ -110,11 +126,12 @@ public class JMainController {
/**
*
*
* @param image
*/
public void preview(Image image) {
try {
if (!JMainService.getInstance().run){
if (!JMainService.getInstance().run) {
return;
}
semaphore.acquire();

@ -1,10 +1,10 @@
package com.example.jmacro.wjdr;
package xyz.wbsite.jmacro;
import cn.hutool.core.thread.ThreadUtil;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.wjdr.MacroForWJDR;
import com.example.jmacro.wjdr.util.DialogUtil;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.base.Legend;
import xyz.wbsite.jmacro.wjdr.MacroForWJDR;
import xyz.wbsite.jmacro.util.DialogUtil;
import xyz.wbsite.jmacro.util.Logger;
import java.io.File;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr;
package xyz.wbsite.jmacro;
import java.awt.*;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.base;
package xyz.wbsite.jmacro.base;
import cn.hutool.cache.Cache;
import cn.hutool.cache.CacheUtil;
@ -81,7 +81,7 @@ public class Legend {
List<File> files = FileUtil.loopFiles(defaultBase, pathname -> pathname.getName().startsWith(name));
if (files.size() == 0) {
throw new RuntimeException("Not found the legend of " + name);
throw new RuntimeException(defaultBase.getAbsolutePath() + " not found the legend of " + name);
}
File file = files.get(0);
Legend newLegend = new Legend();

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.base;
package xyz.wbsite.jmacro.base;
import cn.hutool.core.util.StrUtil;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.base;
package xyz.wbsite.jmacro.base;
/**
*
@ -49,6 +49,18 @@ public class ViewPoint {
this.y = y;
}
public ViewPoint offset(int offsetX, int offsetY) {
return new ViewPoint(this.x + offsetX, this.y + offsetY);
}
public ViewPoint offsetX(int offsetX) {
return new ViewPoint(this.x + offsetX, this.y);
}
public ViewPoint offsetY(int offsetY) {
return new ViewPoint(this.x, this.y + offsetY);
}
@Override
public String toString() {
return "ViewPoint{" +

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.base;
package xyz.wbsite.jmacro.base;
/**
*

@ -0,0 +1,216 @@
package xyz.wbsite.jmacro.tool;
import cn.hutool.core.util.StrUtil;
import cn.hutool.log.StaticLog;
import xyz.wbsite.jmacro.util.Logger;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
/**
*
*
* @author wangbing
* @version 0.0.1
* @since 1.8
*/
public class Measure extends JFrame {
/**
* x
*/
private int originX;
/**
* y
*/
private int originY;
/**
*
*/
private BufferedImage capture;
/**
*
*/
private final Color mask = new Color(0, 0, 0, 0.2f);
/**
* 线
*/
private final Stroke focusWindow = new BasicStroke(1.0f);
/**
*
*/
private final Point start = new Point(0, 0);
/**
*
*/
private final Point end = new Point(0, 0);
/**
*
*
* @param originX x
* @param originY y
* @throws AWTException
*/
public Measure(int originX, int originY) throws AWTException {
this();
this.originX = originX;
this.originY = originY;
}
public Measure() throws AWTException {
init();
}
private void init() throws AWTException {
setExtendedState(Frame.MAXIMIZED_BOTH);
setLocation(0, 0);//位置
setUndecorated(true);
setAlwaysOnTop(true);
setBackground(mask);
setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
// 获取屏幕截图
Robot robot = new Robot();
Toolkit tk = Toolkit.getDefaultToolkit();
capture = robot.createScreenCapture(new Rectangle(0, 0, tk.getScreenSize().width, tk.getScreenSize().height));
// 监听窗口关闭
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
// 关闭应用时要释放资源
dispose();
System.exit(0);//0正常退出1非正常退出
}
});
addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
start.setLocation(e.getX(), e.getY());
end.setLocation(e.getX(), e.getY());
Logger.info("起始坐标:{}", start);
repaint();
}
@Override
public void mouseReleased(MouseEvent e) {
super.mouseReleased(e);
end.setLocation(e.getX(), e.getY());
int left = getCaptureX();
int top = getCaptureY();
int right = getCaptureX() + getCaptureWidth();
int bottom = getCaptureY() + getCaptureHeight();
Logger.info("=========================测量距离=========================");
Logger.info("水平距离:{}px", getCaptureWidth());
Logger.info("垂直距离:{}px", getCaptureHeight());
Logger.info("用法示例:");
Logger.info("1、区域点击mouseLeftClick(of({},{},{},{}));", left - originX, top - originY, right - originX, bottom - originY);
Logger.info("=========================测量距离=========================");
close();
}
});
addMouseMotionListener(new MouseMotionAdapter() {
@Override
public void mouseDragged(MouseEvent e) {
super.mouseDragged(e);
end.setLocation(e.getX(), e.getY());
repaint();
}
});
addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
switch (e.getKeyCode()) {
case KeyEvent.VK_ESCAPE: {
StaticLog.info("exit.");
close();
}
break;
}
}
});
setVisible(true);
}
@Override
public void doLayout() {
super.doLayout();
}
@Override
public void paint(Graphics g) {
super.paint(g);
Graphics2D g2d = (Graphics2D) g;
g2d.drawImage(capture, 0, 0, capture.getWidth(), capture.getHeight(), this);
// 在背景图上加个蒙层
g2d.setColor(mask);
g2d.fillRect(0, 0, capture.getWidth(), capture.getHeight());
int w = getCaptureWidth();
int h = getCaptureHeight();
if (w > 0 && h > 0) {
g2d.setStroke(focusWindow);
g2d.setColor(Color.green);
g2d.drawRect(getCaptureX(), getCaptureY(), w, h);
g2d.drawString(StrUtil.format("P({},{})", getCaptureX(), getCaptureY()), getCaptureX() + 5, getCaptureY() + 15);
g2d.drawString(StrUtil.format("P({},{})", getCaptureX() + w, getCaptureY() + h), getCaptureX() + w + 5, getCaptureY() + h + 15);
g2d.drawString(StrUtil.format("{}", w / 2), getCaptureX() + w / 2, getCaptureY() + h - 5);
int right = (int) Math.max(start.getX(), end.getX());
if (right < capture.getWidth() - 30) {
g2d.drawString(StrUtil.format("{}", h / 2), getCaptureX() + w + 5, getCaptureY() + h / 2);
} else {
g2d.drawString(StrUtil.format("{}", h / 2), getCaptureX() + w + 5 - 30, getCaptureY() + h / 2);
}
}
}
public int getCaptureX() {
return (int) Math.min(start.getX(), end.getX());
}
public int getCaptureY() {
return (int) Math.min(start.getY(), end.getY());
}
public int getCaptureWidth() {
return (int) Math.abs(start.getX() - end.getX());
}
public int getCaptureHeight() {
return (int) Math.abs(start.getY() - end.getY());
}
public void close() {
setVisible(false);
dispose();
}
}

@ -1,12 +1,12 @@
package com.example.jmacro.wjdr.tool;
package xyz.wbsite.jmacro.tool;
import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.log.StaticLog;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.util.DialogUtil;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.base.Legend;
import xyz.wbsite.jmacro.util.DialogUtil;
import xyz.wbsite.jmacro.util.Logger;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
@ -252,15 +252,4 @@ public class PickLegend extends JFrame {
setVisible(false);
dispose();
}
/**
*
*
* @param args
* @throws AWTException
*/
public static void main(String[] args) throws AWTException {
// 运行坐标图例截图工具
new PickLegend(5, 5, new File("legend"));
}
}

@ -1,8 +1,8 @@
package com.example.jmacro.wjdr.tool;
package xyz.wbsite.jmacro.tool;
import cn.hutool.core.util.StrUtil;
import cn.hutool.log.StaticLog;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.util.Logger;
import javax.swing.*;
import java.awt.*;
@ -168,15 +168,4 @@ public class PickPoint extends JFrame {
setVisible(false);
dispose();
}
/**
*
*
* @param args
* @throws AWTException
*/
public static void main(String[] args) throws AWTException {
// 运行坐标图例截图工具
new PickPoint(5, 5);
}
}

@ -1,7 +1,7 @@
package com.example.jmacro.wjdr.tool;
package xyz.wbsite.jmacro.tool;
import cn.hutool.log.StaticLog;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.util.Logger;
import javax.swing.*;
import java.awt.*;
@ -201,15 +201,4 @@ public class PickRect extends JFrame {
setVisible(false);
dispose();
}
/**
*
*
* @param args
* @throws AWTException
*/
public static void main(String[] args) throws AWTException {
// 运行坐标图例截图工具
new PickRect(5, 5);
}
}

@ -1,6 +1,6 @@
package com.example.jmacro.wjdr.ui;
package xyz.wbsite.jmacro.ui;
import com.example.jmacro.wjdr.util.ResourceUtil;
import xyz.wbsite.jmacro.util.ResourceUtil;
import javafx.fxml.FXMLLoader;
import java.io.IOException;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
/**
*

@ -1,7 +1,7 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
import cn.hutool.core.util.ClassUtil;
import com.example.jmacro.wjdr.JMainApplication;
import xyz.wbsite.jmacro.JMainApplication;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.application.Platform;

@ -1,9 +1,9 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
import cn.hutool.core.img.ImgUtil;
import com.example.jmacro.wjdr.JMainApplication;
import com.example.jmacro.wjdr.JMainService;
import com.example.jmacro.wjdr.base.ViewRect;
import xyz.wbsite.jmacro.JMainApplication;
import xyz.wbsite.jmacro.JMainService;
import xyz.wbsite.jmacro.base.ViewRect;
import java.awt.*;
import java.awt.image.BufferedImage;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
import cn.hutool.core.io.resource.ClassPathResource;
import javafx.fxml.FXMLLoader;

@ -1,4 +1,4 @@
package com.example.jmacro.wjdr.util;
package xyz.wbsite.jmacro.util;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.thread.ThreadUtil;

@ -1,16 +1,19 @@
package com.example.jmacro.wjdr.wjdr;
package xyz.wbsite.jmacro.wjdr;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.JMainService;
import com.example.jmacro.wjdr.base.Legend;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import com.example.jmacro.wjdr.util.TaskUtil;
import com.example.jmacro.wjdr.wjdr.task.*;
import java.util.concurrent.Callable;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.JMainService;
import xyz.wbsite.jmacro.base.Legend;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
import xyz.wbsite.jmacro.util.TaskUtil;
import xyz.wbsite.jmacro.wjdr.task.Task_;
import xyz.wbsite.jmacro.wjdr.task.Task_;
import xyz.wbsite.jmacro.wjdr.task.Task_线;
import xyz.wbsite.jmacro.wjdr.task.Task_;
import xyz.wbsite.jmacro.wjdr.task.Task_;
import java.util.concurrent.TimeUnit;
/**

@ -1,9 +1,9 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.JMainService;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.JMainService;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
/**
*

@ -1,8 +1,8 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
public class Task_ extends BaseTask {

@ -1,8 +1,8 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
public class Task_ extends BaseTask {

@ -1,8 +1,8 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
public class Task_线 extends BaseTask {

@ -1,11 +1,10 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import cn.hutool.json.JSONUtil;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ViewPoint;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import com.example.jmacro.wjdr.util.TaskUtil;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
import xyz.wbsite.jmacro.util.TaskUtil;
public class Task_ extends BaseTask {

@ -1,8 +1,8 @@
package com.example.jmacro.wjdr.wjdr.task;
package xyz.wbsite.jmacro.wjdr.task;
import com.example.jmacro.wjdr.JMacro;
import com.example.jmacro.wjdr.base.ViewRect;
import com.example.jmacro.wjdr.util.Logger;
import xyz.wbsite.jmacro.JMacro;
import xyz.wbsite.jmacro.base.ViewRect;
import xyz.wbsite.jmacro.util.Logger;
public class Task_ extends BaseTask {

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -5,7 +5,7 @@
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<AnchorPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.jmacro.wjdr.JMainController">
<AnchorPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="xyz.wbsite.jmacro.JMainController">
<children>
<Separator layoutY="-1.0" opacity="0.5" prefWidth="200.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
<VBox maxWidth="204.0" minWidth="204.0" prefWidth="204.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0">
@ -32,15 +32,20 @@
</Label>
<HBox alignment="CENTER_LEFT" prefHeight="35.0">
<children>
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickPoint" prefHeight="30.0" prefWidth="60.0" text="采点" />
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickRect" prefHeight="30.0" prefWidth="60.0" text="采区">
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickPoint" prefHeight="30.0" prefWidth="50.0" text="采点" />
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickRect" prefHeight="30.0" prefWidth="50.0" text="采区">
<HBox.margin>
<Insets left="10.0" />
<Insets left="5.0" />
</HBox.margin>
</Button>
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickLegend" prefHeight="30.0" prefWidth="60.0" text="采图">
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#pickLegend" prefHeight="30.0" prefWidth="50.0" text="采图">
<HBox.margin>
<Insets left="10.0" />
<Insets left="5.0" />
</HBox.margin>
</Button>
<Button focusTraversable="false" mnemonicParsing="false" onMouseClicked="#measure" prefHeight="30.0" prefWidth="50.0" text="测距">
<HBox.margin>
<Insets left="5.0" />
</HBox.margin>
</Button>
</children>

Loading…
Cancel
Save

Powered by TurnKey Linux.