Browse Source

INO-21074 设计器检测与反馈

persist/11.0-arabic^2
obo 6 months ago
parent
commit
afb8f4b1b5
  1. 30
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java

30
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -1,6 +1,8 @@
package com.fr.env.detect.ui; package com.fr.env.detect.ui;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.carton.FeedbackToolboxDialog;
import com.fr.design.components.notification.NotificationDialog; import com.fr.design.components.notification.NotificationDialog;
import com.fr.design.components.notification.NotificationDialogProperties; import com.fr.design.components.notification.NotificationDialogProperties;
import com.fr.design.components.notification.NotificationModel; import com.fr.design.components.notification.NotificationModel;
@ -24,9 +26,6 @@ import com.fr.env.detect.bean.DetectorResult;
import com.fr.env.detect.bean.DetectorStatus; import com.fr.env.detect.bean.DetectorStatus;
import com.fr.env.detect.bean.DetectorType; import com.fr.env.detect.bean.DetectorType;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.design.carton.FeedbackToolboxDialog;
import com.fr.stable.ProductConstantsBase;
import com.fr.stable.StableUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -38,14 +37,13 @@ import javax.swing.plaf.ButtonUI;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Image; import java.awt.Image;
import java.awt.Cursor;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.io.File;
import java.net.URL; import java.net.URL;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -174,7 +172,7 @@ public class EnvDetectorDialog extends JDialog {
detectButton.setPreferredSize(new Dimension(68, 20)); detectButton.setPreferredSize(new Dimension(68, 20));
detectButton.setBorderPainted(false); detectButton.setBorderPainted(false);
detectButton.setContentAreaFilled(false); detectButton.setContentAreaFilled(false);
headerPanel.add(detectButton, BorderLayout.WEST); headerPanel.add(detectButton, BorderLayout.LINE_START);
UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox")); UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox"));
openUtilBoxLabel.setForeground(UIConstants.FLESH_BLUE); openUtilBoxLabel.setForeground(UIConstants.FLESH_BLUE);
@ -195,8 +193,8 @@ public class EnvDetectorDialog extends JDialog {
} }
} }
}); });
headerPanel.add(openUtilBoxLabel, BorderLayout.EAST); headerPanel.add(openUtilBoxLabel, BorderLayout.LINE_END);
return headerPanel; return BidiUtils.applyOrientationByLocale(headerPanel);
} }
private void startDetecting() { private void startDetecting() {
@ -342,7 +340,7 @@ public class EnvDetectorDialog extends JDialog {
updateTable(tablePanel); updateTable(tablePanel);
return tablePanel; return BidiUtils.applyOrientationByLocale(tablePanel);
} }
private void updateTable(TablePanel tablePanel) { private void updateTable(TablePanel tablePanel) {
@ -446,11 +444,11 @@ public class EnvDetectorDialog extends JDialog {
UICheckBox source = (UICheckBox) e.getSource(); UICheckBox source = (UICheckBox) e.getSource();
EnvDetectorDialog.this.detectOpen = source.isSelected(); EnvDetectorDialog.this.detectOpen = source.isSelected();
}); });
configPanel.add(checkBox, BorderLayout.WEST); configPanel.add(checkBox, BorderLayout.LINE_START);
UILabel description = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Switch")); UILabel description = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Switch"));
configPanel.add(description, BorderLayout.EAST); configPanel.add(description, BorderLayout.LINE_END);
} }
tailPanel.add(configPanel, BorderLayout.WEST); tailPanel.add(configPanel, BorderLayout.LINE_START);
JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout()); actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout());
@ -462,17 +460,17 @@ public class EnvDetectorDialog extends JDialog {
// 配置处理 // 配置处理
EnvDetectorConfig.getInstance().setEnabled(this.detectOpen); EnvDetectorConfig.getInstance().setEnabled(this.detectOpen);
}); });
actionsPanel.add(confirmButton, BorderLayout.WEST); actionsPanel.add(confirmButton, BorderLayout.LINE_START);
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
cancelButton.addActionListener((e) -> { cancelButton.addActionListener((e) -> {
setVisible(false); setVisible(false);
dispose(); dispose();
}); });
actionsPanel.add(cancelButton, BorderLayout.EAST); actionsPanel.add(cancelButton, BorderLayout.LINE_END);
} }
tailPanel.add(actionsPanel, BorderLayout.EAST); tailPanel.add(actionsPanel, BorderLayout.LINE_END);
return tailPanel; return BidiUtils.applyOrientationByLocale(tailPanel);
} }
private void refreshHeader() { private void refreshHeader() {

Loading…
Cancel
Save