From a3b05960fe629e9006b45d61618b01f724e757fd Mon Sep 17 00:00:00 2001
From: 张世豪 <979909237@qq.com>
Date: 星期五, 19 十二月 2025 17:41:08 +0800
Subject: [PATCH] 美化了地块管理的排版
---
src/zhuye/Shouye.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/src/zhuye/Shouye.java b/src/zhuye/Shouye.java
index c661ee5..1dbc337 100644
--- a/src/zhuye/Shouye.java
+++ b/src/zhuye/Shouye.java
@@ -3957,6 +3957,52 @@
}
/**
+ * 鏇存柊瀵艰埅棰勮鐘舵�佹樉绀�
+ * @param active 鏄惁澶勪簬瀵艰埅棰勮妯″紡
+ */
+ public void updateNavigationPreviewStatus(boolean active) {
+ setNavigationPreviewLabelVisible(active);
+ }
+
+ /**
+ * 鏇存柊鍓茶崏杩涘害鏄剧ず
+ * @param percentage 瀹屾垚鐧惧垎姣�
+ * @param completedArea 宸插畬鎴愰潰绉紙骞虫柟绫筹級
+ * @param totalArea 鎬婚潰绉紙骞虫柟绫筹級
+ */
+ public void updateMowingProgress(double percentage, double completedArea, double totalArea) {
+ if (mowingProgressLabel == null) {
+ return;
+ }
+ if (totalArea <= 0) {
+ mowingProgressLabel.setText("--%");
+ mowingProgressLabel.setToolTipText("鏆傛棤鍦板潡闈㈢Н鏁版嵁");
+ return;
+ }
+ double percent = Math.max(0.0, Math.min(100.0, percentage));
+ mowingProgressLabel.setText(String.format(Locale.US, "%.1f%%", percent));
+ mowingProgressLabel.setToolTipText(String.format(Locale.US, "%.1f銕� / %.1f銕�", completedArea, totalArea));
+ }
+
+ /**
+ * 鏇存柊鍓茶崏鏈洪�熷害鏄剧ず
+ * @param speed 閫熷害鍊硷紙鍗曚綅锛歬m/h锛�
+ */
+ public void updateMowerSpeed(double speed) {
+ if (mowerSpeedValueLabel == null) {
+ return;
+ }
+ if (speed < 0) {
+ mowerSpeedValueLabel.setText("--");
+ } else {
+ mowerSpeedValueLabel.setText(String.format(Locale.US, "%.1f", speed));
+ }
+ if (mowerSpeedUnitLabel != null) {
+ mowerSpeedUnitLabel.setText("km/h");
+ }
+ }
+
+ /**
* 鑾峰彇鍙鍖栭潰鏉垮疄渚�
*/
public JPanel getVisualizationPanel() {
--
Gitblit v1.10.0