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/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()); 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-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")); 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);