From 0f217212bd7ce11724716121b6f7bb2e0a93764e Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 15 Aug 2024 19:09:50 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-127437=20fix:=20=E8=A7=86=E8=A7=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../condition/ConditionAttributesPane.java | 2 +- .../condition/ObjectLiteConditionPane.java | 4 ++++ .../view/common/ChooseMark.java | 8 ++++++-- .../rule/DesensitizationRuleChoosePane.java | 3 ++- .../itableeditorpane/UITableEditorPane.java | 1 - .../fr/design/style/AbstractSelectBox.java | 2 +- .../fr/design/style/color/ColorPicker.java | 3 ++- .../style/color/ColorSelectDetailPane.java | 4 +++- .../VanChartFormatPaneWithCheckBox.java | 5 +++-- .../richText/VanChartFieldListPane.java | 8 +++++--- .../com/fr/design/condition/BackPane.java | 3 +++ .../com/fr/design/condition/FontPane.java | 3 +++ .../com/fr/design/condition/PaddingPane.java | 6 ++++-- .../condition/PresentHighlightPane.java | 19 ++++++++++++------- 14 files changed, 49 insertions(+), 22 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java index 219925d8fc..bc2eca9fd1 100644 --- a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java @@ -33,7 +33,7 @@ import static com.fine.swing.ui.layout.Layouts.row; @Open public abstract class ConditionAttributesPane extends BasicBeanPane { - private static final int MAT_HEIGHT = 120; + private static final int MAT_HEIGHT = FineUIScale.scale(120); protected CellHighlightAddMenuDef menuDef; protected JPanel selectedItemPane; diff --git a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java index 3bec57e955..a59c925405 100644 --- a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java @@ -25,6 +25,9 @@ import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.stable.StringUtils; +import static com.fine.theme.utils.FineClientProperties.ADAPTIVE_COMBO_BOX; +import static com.fine.theme.utils.FineClientProperties.COMBO_BOX_TYPE; + public class ObjectLiteConditionPane extends LiteConditionPane { @Override @@ -60,6 +63,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane this.setLayout(FRGUIPaneFactory.createBorderLayout()); // condition operation conditionOPComboBox = new UIComboBox(); + conditionOPComboBox.putClientProperty(COMBO_BOX_TYPE, ADAPTIVE_COMBO_BOX); DefaultComboBoxModel opComboBoxModel = (DefaultComboBoxModel) conditionOPComboBox.getModel(); int[] allOperators = Compare.getAllOperators(); for (int i = 0; i < allOperators.length; i++) { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java index aef396d626..8990d27b73 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/ChooseMark.java @@ -14,6 +14,10 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; +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.row; + /** * 标记选中的CellEditor * @@ -36,7 +40,7 @@ public class ChooseMark extends AbstractCellEditor implements TableCellEditor, T @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { selectedButton.setSelected(isSelected); - pane.add(this.selectedButton); + pane.add(row(flex(), cell(selectedButton), flex()).getComponent()); return pane; } @@ -50,7 +54,7 @@ public class ChooseMark extends AbstractCellEditor implements TableCellEditor, T pane.removeAll(); selectedButton = new UIRadioButton(); selectedButton.setSelected(isSelected); - pane.add(this.selectedButton); + pane.add(row(flex(), cell(selectedButton), flex()).getComponent()); return pane; } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java index 12a1feb833..dc0eaf2011 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java @@ -1,6 +1,7 @@ package com.fr.design.data.datapane.preview.desensitization.view.rule; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.ui.FlatUIUtils; import com.fr.base.svg.IconUtils; import com.fr.data.desensitize.rule.DesensitizationRuleManager; @@ -134,7 +135,7 @@ public class DesensitizationRuleChoosePane extends JPanel { this.setDefaultRenderer(ChooseMark.class, new ChooseMark()); this.setDefaultEditor(DesensitizationRuleStatusPane.class, new DesensitizationRuleStatusPane()); this.setDefaultRenderer(DesensitizationRuleStatusPane.class, new DesensitizationRuleStatusPane()); - this.createTable().getColumnModel().getColumn(0).setMaxWidth(20); + this.createTable().getColumnModel().getColumn(0).setMaxWidth(FineUIScale.scale(28)); } @Override diff --git a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java index 343183dee5..ddde924b61 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java @@ -76,7 +76,6 @@ public class UITableEditorPane extends BasicPane { controlPane.add(content == null ? l : content, BorderLayout.WEST); pane.add(Layouts.column(LayoutConstants.HGAP_LARGE, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent()); - pane.add(Layouts.column(10, Layouts.cell(controlPane), Layouts.cell(scrollPane).weight(1)).getComponent()); this.editTable.setRowHeight(FineUIScale.scale(24)); } diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index 2c00655201..792360f4d4 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -47,7 +47,7 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou displayPane.setBorder(null); displayPane.setOpaque(false); displayPane.add(displayComponent, BorderLayout.CENTER); - displayComponent.setSize(new Dimension(preWidth, displayPane.getPreferredSize().height)); + displayComponent.setSize(new Dimension(FineUIScale.scale(preWidth), displayPane.getPreferredSize().height)); // 添加事件监听 displayComponent.addMouseListener(mouseListener); triggerButton.addMouseListener(mouseListener); diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java b/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java index 067d82f9ce..19e025dd70 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java @@ -4,6 +4,7 @@ package com.fr.design.style.color; * Created by plough on 2016/12/22. */ +import com.fine.theme.utils.FineUIScale; import com.fr.design.DesignerEnvManager; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.IOUtils; @@ -25,7 +26,7 @@ public class ColorPicker extends JDialog implements ActionListener { private Container container = getContentPane(); // 主容器 private int setCoordinateX; // 取色框x坐标 private int setCoordinateY; // 取色框y坐标 - private int colorPickerSize = 190; // 取色框尺寸 + private int colorPickerSize = FineUIScale.scale(190); // 取色框尺寸 private int scaleFactor = 16; // 放大倍数 private ColorPickerPanel colorPickerPanel = new ColorPickerPanel(scaleFactor); // 取色框内容面板 diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java index 4a19d7e51f..0f6631073d 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java @@ -104,7 +104,9 @@ public class ColorSelectDetailPane extends BasicPane { column(flex(), cell(colorChooserPreview), flex()), flex() ).getComponent()); - add(initCenterPane()); + JPanel center = initCenterPane(); + center.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); + add(center); } private FineTabbedPane buildTabbedPane() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java index 38ae4a08ce..d76038c0a3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java @@ -1,5 +1,6 @@ package com.fr.van.chart.designer.component.format; +import com.fine.theme.utils.FineUIScale; import com.fr.base.Style; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.UIBubbleFloatPane; @@ -79,8 +80,8 @@ public abstract class VanChartFormatPaneWithCheckBox extends JPanel{ formatPane = createFormatPane(); } Point comPoint = formatButton.getLocationOnScreen(); - Point arrowPoint = new Point(comPoint.x +formatButton.getWidth() - 25, comPoint.y + formatButton.getHeight()); - UIBubbleFloatPane