From 9bfe7a56a14b61737f8f8c846aaa1f90aa831e9a Mon Sep 17 00:00:00 2001 From: renekton Date: Fri, 30 Aug 2024 15:05:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=A2=9E=E5=8A=A0=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/tabledatapane/MultiTDTableDataPane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java index 2a187c199b..219b4bdb37 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java @@ -102,8 +102,12 @@ public class MultiTDTableDataPane extends AbstractTableDataPane it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Name"))) + .weight(0.2), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Conditions"))) + .with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Multi_Dataset_Conditions"))) + .weight(0.2), flex(0.6) ).getComponent()); From 8269123076d76d9438baeb2aaf7c59e4ddd9394e Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 3 Sep 2024 11:18:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fbp=E5=9B=9E=E5=BD=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/FileTableDataPane.java | 6 ++-- .../gui/icombobox/ColorSchemeComboBox.java | 2 +- .../fr/design/gui/icombobox/LineComboBox.java | 2 +- .../border/VanChartBorderWithShapePane.java | 29 +++++-------------- .../VanChartPieValueLabelDetailPane.java | 9 ++---- 5 files changed, 14 insertions(+), 34 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index ac644474a4..7efe6f7196 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -205,9 +205,9 @@ public class FileTableDataPane extends AbstractTableDataPane { testConnection.addActionListener(testConnectionListener); // 提示信息 tipPanel = column( - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Parameter_Desc"), FineUIStyle.LABEL_TIP)), - cell(new UILabel("reportlets/excel/FineReport${abc}." + "txt", FineUIStyle.LABEL_TIP)), - cell(new UILabel("http://192.168.100.120:8080/XXServer/Report/excel${abc}.jsp", FineUIStyle.LABEL_TIP)) + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Type_Parameter"), FineUIStyle.LABEL_TIP)), + cell(new UILabel("assets/file_dataset/FineReport${abc}." + "txt", FineUIStyle.LABEL_TIP)), + cell(new UILabel("http://192.168.100.120:8080/webroot/help/excel${abc}.jsp", FineUIStyle.LABEL_TIP)) ).getComponent(); return column( LayoutConstants.VERTICAL_GAP, diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java index 2ace77e344..1c7ced9ec6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/ColorSchemeComboBox.java @@ -233,7 +233,7 @@ public class ColorSchemeComboBox extends UIComboBox { @Override public Dimension getPreferredSize() { Dimension preferredSize = super.getPreferredSize(); - preferredSize.setSize(super.getPreferredSize().getWidth(), FineUIScale.scale(HEIGHT)); + preferredSize.setSize(ColorSchemeComboBox.this.getPreferredSize().width, FineUIScale.scale(HEIGHT)); return preferredSize; } diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java index eef2c2c8b9..28f29c23b1 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/LineComboBox.java @@ -129,7 +129,7 @@ public class LineComboBox extends UIComboBox { } public Dimension getPreferredSize() { - return new Dimension(getWidth(), FineUIScale.scale(LINE_HEIGHT)); + return new Dimension(super.getPreferredSize().width, FineUIScale.scale(LINE_HEIGHT)); } public Dimension getMinimumSize() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java index 292ae55acb..8e508e810c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java @@ -1,5 +1,6 @@ package com.fr.van.chart.designer.component.border; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartglyph.Marker; import com.fr.chart.chartglyph.MarkerFactory; import com.fr.design.dialog.BasicPane; @@ -112,28 +113,16 @@ public class VanChartBorderWithShapePane extends BasicPane { } protected JPanel createLineTypePane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - - double[] columnSize = {f, e}; - double[] rowSize = {p, p}; Component[][] components = new Component[][]{ new Component[]{null, null}, new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), UIComponentUtils.wrapWithBorderLayoutPane(lineTypeBox)}}; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } private JPanel createDetailPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - - double[] columnSize = {f, e}; - double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{null, null}, @@ -143,7 +132,8 @@ public class VanChartBorderWithShapePane extends BasicPane { }; JPanel center = createLineColorPane(); - JPanel south = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + JPanel south = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); + JPanel panel = new JPanel(new BorderLayout()); @@ -154,12 +144,6 @@ public class VanChartBorderWithShapePane extends BasicPane { } private JPanel createLineColorPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - - double[] columnSize = {f, e}; - double[] rowSize = {p, p}; Component[][] center = new Component[][]{ new Component[]{null, null}, @@ -171,11 +155,12 @@ public class VanChartBorderWithShapePane extends BasicPane { new Component[]{null, lineColorBox} }; - colorBoxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(south, rowSize, columnSize); + colorBoxPane = FineLayoutBuilder.compatibleTableLayout(10, south, new double[]{1.2, 3}); + JPanel panel = new JPanel(new BorderLayout()); - panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(center, rowSize, columnSize), BorderLayout.CENTER); + panel.add(FineLayoutBuilder.compatibleTableLayout(10, center, new double[]{1.2, 3}), BorderLayout.CENTER); panel.add(colorBoxPane, BorderLayout.SOUTH); return panel; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java index bd705b0e06..1923776980 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java @@ -1,5 +1,6 @@ package com.fr.van.chart.designer.style.label; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; @@ -47,18 +48,12 @@ public class VanChartPieValueLabelDetailPane extends VanChartPlotLabelDetailPane VanChartBorderWithShapePane borderPane = new VanChartBorderWithShapePane() { @Override protected JPanel createLineTypePane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - - double[] columnSize = {f, e}; - double[] rowSize = {p}; Component[][] components = new Component[][]{ new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Border")), UIComponentUtils.wrapWithBorderLayoutPane(getLineTypeBox())}}; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } }; setBorderPane(borderPane); From 08795afd60ba43fe9c5f34e13bbc69de7c94a5d1 Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 3 Sep 2024 16:23:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=A7=A3=E5=AF=86?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/DecodeDialog.java | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java b/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java index f76ed4711b..88b126e07b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DecodeDialog.java @@ -1,11 +1,15 @@ package com.fr.design.mainframe; +import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JDialog; +import javax.swing.JPanel; +import com.fine.theme.utils.FineUIStyle; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.BaseUtils; import com.fr.base.io.XMLEncryptUtils; import com.fr.design.DesignerEnvManager; @@ -19,6 +23,9 @@ import com.fr.stable.CodeUtils; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; +import static com.fine.swing.ui.layout.Layouts.cell; +import static com.fine.swing.ui.layout.Layouts.row; + public class DecodeDialog { private UITextField jt; @@ -32,22 +39,18 @@ public class DecodeDialog { this.file = file; jd = new JDialog(); - jd.setLayout(null); + jd.setLayout(new BorderLayout()); UILabel newNameLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Input_Pwd")); - newNameLable.setBounds(20, 10, 130, 30); jt = new UITextField(StringUtils.EMPTY); jt.selectAll(); - jt.setBounds(130, 15, 150, 20); - jd.add(newNameLable); - jd.add(jt); + jd.add(row(20, cell(newNameLable), cell(jt)).getComponent(), BorderLayout.NORTH); hintsLabel = new UILabel(); - hintsLabel.setBounds(20, 50, 250, 30); hintsLabel.setForeground(Color.RED); hintsLabel.setVisible(false); confirmButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Confirm")); - confirmButton.setBounds(180, 90, 60, 25); + FineUIStyle.setStyle(confirmButton, FineUIStyle.PLAIN_BUTTON); confirmButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String key = jt.getText(); @@ -64,16 +67,17 @@ public class DecodeDialog { }); UIButton cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel")); - cancelButton.setBounds(250, 90, 60, 25); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jd.dispose(); } }); - jd.add(cancelButton); - jd.add(confirmButton); - jd.add(hintsLabel); + JPanel buttonPane = new JPanel(new BorderLayout()); + buttonPane.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); + buttonPane.add(row(8, cell(confirmButton), cell(cancelButton)).getComponent(), BorderLayout.EAST); + jd.add(buttonPane, BorderLayout.SOUTH); + jd.add(hintsLabel, BorderLayout.CENTER); jd.setSize(340, 180); jd.setModal(true); jd.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ECP_Decode"));