From b518f895dec5264fd25e22a68300c40ceba6f43d Mon Sep 17 00:00:00 2001
From: 826220679@qq.com <826220679@qq.com>
Date: 星期六, 20 十二月 2025 15:30:20 +0800
Subject: [PATCH] 新增了按钮功能

---
 src/baseStation/BaseStationDialog.java |   28 +++-------------------------
 1 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/src/baseStation/BaseStationDialog.java b/src/baseStation/BaseStationDialog.java
index 2b46be8..dc9d8b9 100644
--- a/src/baseStation/BaseStationDialog.java
+++ b/src/baseStation/BaseStationDialog.java
@@ -16,6 +16,8 @@
 import java.util.Locale;
 import java.util.Properties;
 
+import zhuye.buttonset;
+
 public class BaseStationDialog extends JDialog {
     private final Color THEME_COLOR;
     private final Device device;
@@ -296,7 +298,7 @@
         titleLabel.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 14));
         titleLabel.setForeground(Color.DARK_GRAY);
 
-        JButton actionButton = createInlineButton(buttonText, buttonColor);
+        JButton actionButton = buttonset.createStyledButton(buttonText, buttonColor);
         actionButton.addActionListener(actionListener);
 
         panel.add(titleLabel);
@@ -305,30 +307,6 @@
 
         return panel;
     }
-
-    private JButton createInlineButton(String text, Color bgColor) {
-        JButton button = new JButton(text);
-        button.setFont(new Font("寰蒋闆呴粦", Font.BOLD, 14));
-        button.setBackground(bgColor);
-        button.setForeground(Color.WHITE);
-        button.setFocusPainted(false);
-        button.setBorder(BorderFactory.createEmptyBorder(8, 18, 8, 18));
-        Dimension size = new Dimension(90, 36);
-        button.setPreferredSize(size);
-        button.setMinimumSize(size);
-        button.setMaximumSize(size);
-
-        button.addMouseListener(new java.awt.event.MouseAdapter() {
-            public void mouseEntered(java.awt.event.MouseEvent evt) {
-                button.setBackground(brightenColor(bgColor));
-            }
-            public void mouseExited(java.awt.event.MouseEvent evt) {
-                button.setBackground(bgColor);
-            }
-        });
-
-        return button;
-    }
     
     private Color brightenColor(Color color) {
         int r = Math.min(255, color.getRed() + 30);

--
Gitblit v1.10.0