From 8269123076d76d9438baeb2aaf7c59e4ddd9394e Mon Sep 17 00:00:00 2001 From: renekton Date: Tue, 3 Sep 2024 11:18:50 +0800 Subject: [PATCH] =?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);