From c498385fb7e372d13e2ee76d7b54ae2381728082 Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期三, 17 十二月 2025 19:35:57 +0800
Subject: [PATCH] 新增了测量模式
---
src/zhuye/AreaSelectionDialog.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/zhuye/AreaSelectionDialog.java b/src/zhuye/AreaSelectionDialog.java
index 7151335..0e87a12 100644
--- a/src/zhuye/AreaSelectionDialog.java
+++ b/src/zhuye/AreaSelectionDialog.java
@@ -5,6 +5,7 @@
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
+import zhuye.buttonset;
public class AreaSelectionDialog extends JDialog {
private final Color THEME_COLOR;
@@ -49,12 +50,9 @@
contentPanel.add(Box.createRigidArea(new Dimension(0, 10)));
}
- JButton addAreaBtn = new JButton("鉃� 鏂板鍦板潡");
- addAreaBtn.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 14));
- addAreaBtn.setBackground(THEME_COLOR);
- addAreaBtn.setForeground(Color.WHITE);
- addAreaBtn.setBorder(BorderFactory.createEmptyBorder(15, 0, 15, 0));
- addAreaBtn.setFocusPainted(false);
+ JButton addAreaBtn = buttonset.createStyledButton("鉃� 鏂板鍦板潡", THEME_COLOR);
+ addAreaBtn.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 14));
+ addAreaBtn.setBorder(BorderFactory.createEmptyBorder(15, 0, 15, 0));
addAreaBtn.setAlignmentX(Component.CENTER_ALIGNMENT);
addAreaBtn.addActionListener(e -> {
@@ -68,15 +66,15 @@
}
private JButton createAreaButton(String icon, String text) {
- JButton button = new JButton("<html><center>" + icon + "<br>" + text + "</center></html>");
+ JButton button = buttonset.createStyledButton("<html><center>" + icon + "<br>" + text + "</center></html>", Color.WHITE);
button.setFont(new Font("寰蒋闆呴粦", Font.PLAIN, 14));
button.setPreferredSize(new Dimension(250, 80));
button.setBackground(Color.WHITE);
+ button.setForeground(new Color(80, 80, 80));
button.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createLineBorder(new Color(200, 200, 200)),
BorderFactory.createEmptyBorder(10, 10, 10, 10)
));
- button.setFocusPainted(false);
button.addMouseListener(new MouseAdapter() {
public void mouseEntered(MouseEvent e) {
--
Gitblit v1.10.0