diff --git a/designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java b/designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java index 5bdc941cf4..610d702bb8 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/RenameAction.java @@ -1,6 +1,8 @@ package com.fr.design.actions.file; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseUtils; import com.fr.chartx.TwoTuple; import com.fr.design.DesignerEnvManager; @@ -146,7 +148,7 @@ public class RenameAction extends UpdateAction { "Fine-Design_Basic_Enter_New_Folder_Name" : "Fine-Design_Basic_Enter_New_File_Name") ); newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); - newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); + newNameLabel.setBorder(new ScaledEmptyBorder(0, 0, 0, 10)); //newNameLabel.setPreferredSize(new Dimension(118, 15)); // 重命名输入框 @@ -169,10 +171,10 @@ public class RenameAction extends UpdateAction { } }); nameField.selectAll(); - nameField.setPreferredSize(new Dimension(170, 20)); + nameField.setPreferredSize(FineUIScale.scale(new Dimension(170, 20))); JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); - topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); + topPanel.setBorder(new ScaledEmptyBorder(15, 15, 0, 15)); topPanel.add(newNameLabel); topPanel.add(nameField); @@ -180,14 +182,14 @@ public class RenameAction extends UpdateAction { nameField.addKeyListener(keyListener); // 重名提示 warnLabel = new UILabel(); - warnLabel.setPreferredSize(new Dimension(300, 50)); + warnLabel.setPreferredSize(FineUIScale.scale(new Dimension(300, 50))); warnLabel.setHorizontalAlignment(SwingConstants.LEFT); warnLabel.setVerticalAlignment(SwingConstants.TOP); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); JPanel midPanel = new JPanel(new BorderLayout()); - midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); + midPanel.setBorder(new ScaledEmptyBorder(0, 15, 0, 15)); midPanel.add(warnLabel, BorderLayout.WEST); // 确认按钮 @@ -212,7 +214,7 @@ public class RenameAction extends UpdateAction { JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.RIGHT, 10, 0)); - buttonsPane.setBorder(BorderFactory.createEmptyBorder(10, 15, 10, 10)); + buttonsPane.setBorder(new ScaledEmptyBorder(10, 15, 10, 10)); buttonsPane.add(confirmButton); buttonsPane.add(cancelButton); @@ -228,7 +230,7 @@ public class RenameAction extends UpdateAction { ), BorderLayout.CENTER); - this.setSize(340, 200); + this.setSize(FineUIScale.scale(340), FineUIScale.scale(200)); this.setTitle(Toolkit.i18nText("Fine-Design_Basic_Rename")); this.setResizable(false); this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); diff --git a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java index 9c0e7c8095..308627a843 100644 --- a/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java +++ b/designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java @@ -1,6 +1,8 @@ package com.fr.design.carton; +import com.fine.swing.ui.layout.Layouts; import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.UIConstants; @@ -54,6 +56,7 @@ import static com.fr.design.carton.CartonConstants.JOURNAL_FILE_PATH; public class FeedbackToolboxDialog extends JDialog { + private static final int HORIZONTAL_GAP = 8; private UIDatePicker uiDatePicker; private JPanel generalSettingPanel = null; private UICheckBox easyCheckerButton = null; @@ -71,6 +74,7 @@ public class FeedbackToolboxDialog extends JDialog { setResizable(false); this.setLayout(FRGUIPaneFactory.createBorderLayout()); createBodyPanel(); + body.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); add(body); setSize(body.getPreferredSize()); setSwitches(!StringUtils.isEmpty(GeneralUtils.objectToString(uiDatePicker.getSelectedItem()))); @@ -95,9 +99,9 @@ public class FeedbackToolboxDialog extends JDialog { } private JPanel createInfoPane() { - JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 10, 10); + JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 0, 0); UILabel title = new UILabel(); - title.setText(" " + Toolkit.i18nText("Fine-Design_Basic_Carton_Record_Lag_Time") + ": "); + title.setText(Toolkit.i18nText("Fine-Design_Basic_Carton_Record_Lag_Time") + ": "); //判断一下当天是否有卡顿日志记录,如果有将日期设置为当天,如果没有设置为空 boolean cartonExists = SwitchForSwingChecker.isCartonExists(); if (cartonExists) { @@ -162,8 +166,7 @@ public class FeedbackToolboxDialog extends JDialog { private JPanel createTailPane() { JPanel tailPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); tailPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, lineColor)); - JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout()); + JPanel actionsPanel = Layouts.row(HORIZONTAL_GAP).getComponent(); { uploadButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Carton_Upload_Carton_Log")); uploadButton.addActionListener((e) -> { @@ -179,7 +182,7 @@ public class FeedbackToolboxDialog extends JDialog { } }); - actionsPanel.add(uploadButton, BorderLayout.WEST); + actionsPanel.add(uploadButton); UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); cancelButton.addActionListener((e) -> { @@ -188,7 +191,7 @@ public class FeedbackToolboxDialog extends JDialog { envDetectorDialog.setVisible(true); dispose(); }); - actionsPanel.add(cancelButton, BorderLayout.EAST); + actionsPanel.add(cancelButton); } UIButton currencySetButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Carton_General_Settings")); currencySetButton.addActionListener((e -> { diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java index 9f3d4c5b94..3a5aef5487 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java @@ -34,6 +34,7 @@ import java.util.ArrayList; public abstract class UIDialog extends JDialog { public static final String OK_BUTTON = "basic_ok"; public static final String CANCEL_BUTTON = "basic_cancel"; + private static final int HORIZONTAL_GAP = 8; private UIButton okButton, cancelButton; private BasicPane pane; private java.util.List listeners = new ArrayList(); @@ -98,7 +99,7 @@ public abstract class UIDialog extends JDialog { private JPanel createControlButtonPane() { JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel buttonsPane = Layouts.row(LayoutConstants.HORIZONTAL_GAP).getComponent(); + JPanel buttonsPane = Layouts.row(HORIZONTAL_GAP).getComponent(); controlPane.add(buttonsPane, BorderLayout.EAST); //增加一个自定义按钮, 可以用于eg: 设为全局配置 diff --git a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java index 77eaadd89a..7abe37e05e 100644 --- a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java @@ -73,8 +73,8 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver protected void initLayout() { this.setLayout(new BorderLayout()); - this.add(row( - cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5) + this.add(row(8, + cell(formulaTextField).weight(2.4), cell(formulaTextFieldButton).weight(0.5) ).getComponent()) ; } diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java index bec8381ad8..5d27e3ea7d 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java @@ -5,8 +5,6 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UINumberField; -import com.fr.design.layout.FRGUIPaneFactory; import com.fr.js.Hyperlink; import javax.swing.DefaultListCellRenderer; @@ -14,15 +12,10 @@ import javax.swing.JList; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; -import java.awt.Dimension; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.cell; -import static com.fine.swing.ui.layout.Layouts.flex; -import static com.fine.swing.ui.layout.Layouts.fix; public abstract class AbstractHyperNorthPane extends BasicBeanPane { public static final int NEW_WINDOW = 0; @@ -50,8 +43,8 @@ public abstract class AbstractHyperNorthPane extends BasicB } protected void initComponents() { - this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); + this.setLayout(new BorderLayout()); + JPanel centerPane = new JPanel(new BorderLayout()); JPanel headerPane = this.setHeaderPanel(); targetFrameComboBox = new UIComboBox(getTargetFrames()); @@ -77,8 +70,7 @@ public abstract class AbstractHyperNorthPane extends BasicB JPanel centerPanel = new JPanel(new BorderLayout()); - centerPanel.add(column( - 10, + centerPanel.add(column(10, row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)), cell(newWindowConfPane) ).getComponent()); @@ -87,7 +79,7 @@ public abstract class AbstractHyperNorthPane extends BasicB centerPane.add(centerPanel); targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex())); - this.add(column( + this.add(column(10, cell(headerPane), cell(centerPane), cell(this.setFootPanel()) diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java index fd1d7355f7..e68da1672f 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java @@ -1,5 +1,6 @@ package com.fr.design.hyperlink; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseFormula; import com.fr.design.actions.UpdateAction; import com.fr.design.dialog.BasicDialog; @@ -112,7 +113,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane dialogComponents = new ArrayList<>(); final List othersComponents = new ArrayList<>(); @@ -132,7 +133,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane { UILabel urlLabel = new UILabel("URL"); JPanel urlWithHelp = new JPanel(new BorderLayout()); urlWithHelp.add(row( - flex(0.018), - cell(urlLabel).weight(0.125), - cell(urlTextField).weight(0.85), - flex(0.015) + cell(urlLabel).weight(0.13), + cell(urlTextField).weight(0.87) ).getComponent()); if (this.needRenamePane) { diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java index de36060d0c..a3353b2669 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java @@ -1,6 +1,7 @@ package com.fr.design.hyperlink; import com.fine.theme.utils.FineUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Parameter; import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.icheckbox.UICheckBox; @@ -38,7 +39,7 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane { protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH)); + this.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); northPane = new WebHyperNorthPane(needRenamePane()); extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters")); diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java index 7749b059cd..fae7b6aadd 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java @@ -1,6 +1,7 @@ package com.fr.design.hyperlink.popup; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseFormula; import com.fr.base.Parameter; @@ -99,9 +100,9 @@ public class ContentSettingPane extends AbstractHyperLinkPane { JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); popupTypeLabel = new UILabel(""); UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type")); - typePane.add(row(40, + typePane.add(row(44, cell(typeLabel), cell(popupTypeLabel) ).getComponent()); @@ -82,14 +82,14 @@ public class StyleSettingPane extends BasicBeanPane { borderColor = new NewColorSelectBox(100); borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20); UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border")); - borderPane.add(row(40, + borderPane.add(row(44, column(10, cell(borderLabel).weight(0.3), flex().weight(0.7)), column(10, - cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)), - cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY)), - cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY))) + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY, 64)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY, 64)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY, 64))) ).getComponent()); return borderPane; } @@ -105,13 +105,13 @@ public class StyleSettingPane extends BasicBeanPane { transparencyPane.add(numberDragPane, BorderLayout.CENTER); transparencyPane.add(new UILabel(" %"), BorderLayout.EAST); JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background")); - bgPane.add(row(40, + bgPane.add(row(44, column(10, cell(bgLabel).weight(0.6), flex().weight(0.4)), column(10, - cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY)), - cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY)) + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY, 64)), + cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY, 64)) ) ).getComponent()); return bgPane; @@ -124,7 +124,7 @@ public class StyleSettingPane extends BasicBeanPane { padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules")); JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size")); - sizePane.add(row(14, + sizePane.add(row(20, column(10, cell(sizeLabel).weight(0.16), flex().weight(0.84)), diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java index bce8590519..169f24b51f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.theme; +import com.fine.theme.utils.FineUIScale; import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateThemeConfig; import com.fr.design.designer.IntervalConstants; @@ -34,9 +35,9 @@ import java.util.Map; public class TemplateThemeGridPane extends BasicPane { public static final int BLOCK_COUNT_ROW_LINE = 3; public static final int BLOCK_GAP = IntervalConstants.INTERVAL_L1; - public static final int CONTENT_WIDTH = TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10; + public static final int CONTENT_WIDTH = FineUIScale.scale(TemplateThemeBlock.CONTENT_WIDTH * BLOCK_COUNT_ROW_LINE + BLOCK_GAP * (BLOCK_COUNT_ROW_LINE - 1) + 10); public static final int BLOCK_ROWS_PER_PAGE = 3; - public static final int CONTENT_HEIGHT = Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1)); + public static final int CONTENT_HEIGHT = FineUIScale.scale(Math.min(527, TemplateThemeBlock.CONTENT_HEIGHT * BLOCK_ROWS_PER_PAGE + BLOCK_GAP * (BLOCK_ROWS_PER_PAGE + 1))); public static final int ASYNC_FETCH_THEME_THREAD_COUNT = 10; private final AsyncThemeFetcher asyncThemeFetcher; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java index c79ccd9090..132338c9cb 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeProfilePane.java @@ -1,5 +1,7 @@ package com.fr.design.mainframe.theme; +import com.fine.theme.utils.FineUIScale; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateThemeConfig; import com.fr.base.theme.settings.ThemeThumbnail; @@ -71,8 +73,8 @@ public abstract class TemplateThemeProfilePane extends } private void initializePane() { - setLayout(new BorderLayout(5, 0)); - setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 6)); + setLayout(new BorderLayout(FineUIScale.scale(5), 0)); + setBorder(new ScaledEmptyBorder(10, 10, 0, 10)); add(createLeftPane(), BorderLayout.CENTER); add(createRightPane(), BorderLayout.EAST); } @@ -84,14 +86,14 @@ public abstract class TemplateThemeProfilePane extends private JPanel createLeftPane() { JPanel titleContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); - titleContainer.setPreferredSize(new Dimension(LEFT_TITLE_PANE_WIDTH, LEFT_TITLE_PANE_HEIGHT)); + titleContainer.setPreferredSize(FineUIScale.scale(new Dimension(LEFT_TITLE_PANE_WIDTH, LEFT_TITLE_PANE_HEIGHT))); JPanel previewContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); previewContainer.setBorder(BorderFactory.createEmptyBorder(5, 4, 10, 4)); titleContainer.add(createTitlePane(), BorderLayout.NORTH); titleContainer.add(previewContainer, BorderLayout.CENTER); themePreviewPane = createThemePreviewPane(); - themePreviewPane.setPreferredSize(new Dimension(PREVIEW_PANE_WIDTH, PREVIEW_PANE_HEIGHT)); + themePreviewPane.setPreferredSize(FineUIScale.scale(new Dimension(PREVIEW_PANE_WIDTH, PREVIEW_PANE_HEIGHT))); previewContainer.add(themePreviewPane, BorderLayout.CENTER); return titleContainer; diff --git a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java index c504d80b33..993bf41d8a 100644 --- a/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java +++ b/designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java @@ -1,19 +1,15 @@ package com.fr.env.detect.ui; -import com.fine.theme.light.ui.FineRoundBorder; +import com.fine.swing.ui.layout.Layouts; import com.fine.theme.utils.FineUIStyle; -import com.fine.theme.utils.FineUIUtils; -import com.formdev.flatlaf.ui.FlatUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.svg.IconUtils; import com.fr.design.components.notification.NotificationDialog; import com.fr.design.components.notification.NotificationDialogProperties; import com.fr.design.components.notification.NotificationModel; import com.fr.design.components.table.TablePanel; -import com.fr.design.constants.DesignerColor; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ibutton.UIButtonUI; -import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; @@ -21,7 +17,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.design.utils.gui.GUIPaintUtils; import com.fr.env.detect.base.DetectorBridge; import com.fr.env.detect.base.DetectorUtil; import com.fr.env.detect.base.EnvDetectorConfig; @@ -30,8 +25,6 @@ import com.fr.env.detect.bean.DetectorStatus; import com.fr.env.detect.bean.DetectorType; 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 javax.swing.BorderFactory; @@ -39,18 +32,15 @@ import javax.swing.ImageIcon; import javax.swing.JDialog; import javax.swing.JPanel; import javax.swing.SwingWorker; -import javax.swing.plaf.ButtonUI; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Frame; -import java.awt.Graphics2D; import java.awt.Image; import java.awt.Cursor; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.io.File; import java.net.URL; import java.util.List; import java.util.Map; @@ -66,6 +56,7 @@ public class EnvDetectorDialog extends JDialog { private static final ImageIcon LOADING_ICON = getLoadingIcon(); private static final int TIMEOUT = 1000; + private static final int HORIZONTAL_GAP = 8; private static final Color SUCCESS_COLOR = new Color(22, 193, 83); private static final Color DETAIL_FONT_COLOR = new Color(65, 155, 249); @@ -127,6 +118,7 @@ public class EnvDetectorDialog extends JDialog { /* tailPanel*/ this.tailPanel = createTailPanel(); body.add(tailPanel, BorderLayout.SOUTH); + body.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); add(body); @@ -145,7 +137,7 @@ public class EnvDetectorDialog extends JDialog { private JPanel createHeaderPanel() { JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0)); + headerPanel.setBorder(new ScaledEmptyBorder(0, 0, 10, 0)); this.detectButton = new UIButton(buttonStatus.getDesc()); FineUIStyle.setStyle(detectButton, FineUIStyle.STYLE_PRIMARY); detectButton.setToolTipText(buttonStatus.getDesc()); @@ -418,7 +410,7 @@ public class EnvDetectorDialog extends JDialog { private JPanel createTailPanel() { JPanel tailPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - tailPanel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0)); + tailPanel.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); JPanel configPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); { @@ -434,25 +426,23 @@ public class EnvDetectorDialog extends JDialog { } tailPanel.add(configPanel, BorderLayout.WEST); - JPanel actionsPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - actionsPanel.setLayout(FRGUIPaneFactory.createM_BorderLayout()); - { - UIButton confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); - confirmButton.addActionListener((e) -> { - setVisible(false); - dispose(); - // 配置处理 - EnvDetectorConfig.getInstance().setEnabled(this.detectOpen); - }); - actionsPanel.add(confirmButton, BorderLayout.WEST); + JPanel actionsPanel = Layouts.row(HORIZONTAL_GAP).getComponent(); - UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); - cancelButton.addActionListener((e) -> { - setVisible(false); - dispose(); - }); - actionsPanel.add(cancelButton, BorderLayout.EAST); - } + UIButton confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); + confirmButton.addActionListener((e) -> { + setVisible(false); + dispose(); + // 配置处理 + EnvDetectorConfig.getInstance().setEnabled(this.detectOpen); + }); + actionsPanel.add(confirmButton); + + UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); + cancelButton.addActionListener((e) -> { + setVisible(false); + dispose(); + }); + actionsPanel.add(cancelButton); tailPanel.add(actionsPanel, BorderLayout.EAST); return tailPanel; } diff --git a/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperLink_selected.svg b/designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperlink_selected.svg similarity index 100% rename from designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperLink_selected.svg rename to designer-base/src/main/resources/com/fine/theme/icon/propertiestab/hyperlink_selected.svg diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index 3cc91a9f13..c4d0559d4e 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -500,7 +500,7 @@ MenuItem.acceleratorSelectionForeground=@foreground [mac]MenuItem.acceleratorDelimiter = "" MenuItem.selectionInsets=0,4,0,4 MenuItem.selectionArc=4 -MenuItem.selectionBackground=$fill.hover +MenuItem.selectionBackground=#E6E9EF MenuItem.selectionForeground=@foreground MenuItem.disabledForeground=fade(@foreground,29%) diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index b9dc9408d5..ac92a7f709 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -2,6 +2,7 @@ package com.fr.design.chart.series.SeriesCondition.impl; import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Utils; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.design.gui.columnrow.ColumnRowVerticalPane; @@ -50,7 +51,7 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane implements TreeSelection for (UpdateAction action : getActions()) { action.update(); } + for (UpdateAction action : getMainActions()) { + action.update(); + } } } @@ -1479,6 +1482,10 @@ public class FormDesigner extends TargetComponent
implements TreeSelection return designerActions.toArray(new UpdateAction[designerActions.size()]); } + public UpdateAction[] getMainActions() { + return new UpdateAction[]{}; + } + private List getBasicActions(){ if (basicActions == null) { basicActions = new ArrayList();