From 48ee74129bb09a817a0bbbabe860c4007b74c66b Mon Sep 17 00:00:00 2001
From: 826220679@qq.com <826220679@qq.com>
Date: 星期日, 21 十二月 2025 12:37:44 +0800
Subject: [PATCH] 新增了往返路径

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

diff --git a/src/baseStation/BaseStationDialog.java b/src/baseStation/BaseStationDialog.java
index 2b46be8..a878c06 100644
--- a/src/baseStation/BaseStationDialog.java
+++ b/src/baseStation/BaseStationDialog.java
@@ -3,6 +3,7 @@
 import javax.swing.*;
 
 import gecaoji.Device;
+import publicway.buttonset;
 
 import java.awt.*;
 import java.awt.event.ActionListener;
@@ -296,7 +297,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 +306,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