From c5e45656270bfad813d5a270cb73fc8e864bfbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 14:20:10 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-133106=20fix:=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E9=81=AE=E7=BD=A9=E5=B1=82=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/icontainer/UIModeControlContainer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java index 9002faf8b6..18ac4eaeeb 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java @@ -123,6 +123,8 @@ public class UIModeControlContainer extends JLayeredPane { horizontToolPane = new JPanel() { @Override public void paint(Graphics g) { + g.setColor(FineUIUtils.getUIColor("fill.normal", "fill.normal")); + g.fillRect(0, 0, getWidth(), getHeight()); if (upEditMode) { g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 8, null); } From 19e7961e3ceaaa55ecf34e852db5cc94def0580e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 14:22:39 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-132916=20fix:=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E3=80=81=E6=B0=94=E6=B3=A1=E5=9B=BE=E6=BC=8F=E7=BF=BB?= =?UTF-8?q?=E6=96=B0=E9=9D=A2=E6=9D=BF=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/ibutton/UIButtonGroup.java | 9 +++--- .../chart/gui/data/ChartDataFilterPane.java | 10 +++---- .../BubblePlotReportDataContentPane.java | 7 ++--- .../MeterPlotReportDataContentPane.java | 30 +++++-------------- .../table/MeterPlotTableDataContentPane.java | 7 +++-- .../chart/gui/style/ChartTextAttrPane.java | 12 +++----- 6 files changed, 28 insertions(+), 47 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java index ddb402db2d..d5fa52cc21 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -1,6 +1,7 @@ package com.fr.design.gui.ibutton; import com.fine.swing.ui.layout.Column; +import com.fine.swing.ui.layout.Layouts; import com.fine.swing.ui.layout.Row; import com.fine.swing.ui.layout.Spacer; import com.fine.theme.light.ui.FineRoundBorder; @@ -213,24 +214,24 @@ public class UIButtonGroup extends Column implements GlobalNameObserver, UIOb int col = cols[row]; Row rowContainer = new Row(); for (int j = 0; j < col; j++) { - rowContainer.add(cell(getLabelButtonList().get(currentIndex)).weight(1.0)); + Layouts.populate(rowContainer, cell(getLabelButtonList().get(currentIndex)).weight(1.0)); currentIndex++; if (j != col - 1 && !inToolbar) { rowContainer.add(createDivider()); } } - add(rowContainer); + Layouts.populate(this, cell(rowContainer).weight(1.0)); if (row != cols.length - 1) { add(createDivider()); } } } - private List getLabelButtonList() { + protected List getLabelButtonList() { return labelButtonList; } - private Spacer createDivider() { + protected Spacer createDivider() { Spacer spacer = new Spacer(FineUIScale.scale(1)); spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor"))); return spacer; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index d4b98adb5e..1b928c8505 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -1,6 +1,5 @@ package com.fr.design.mainframe.chart.gui.data; -import com.fine.theme.utils.FineUIScale; import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Utils; import com.fr.base.chart.chartdata.TopDefinitionProvider; @@ -26,6 +25,7 @@ import java.awt.Dimension; import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.theme.utils.FineUIScale.scale; /** * 图表数据 分类 系列 过滤界面. @@ -60,7 +60,7 @@ public class ChartDataFilterPane extends ThirdTabPane { } protected void initLayout() { - this.setLayout(new BorderLayout()); + this.setLayout(new BorderLayout(0, scale(10))); if (!paneList.isEmpty()) { if (nameArray.length > 1) { this.add(tabPane, BorderLayout.NORTH); @@ -251,7 +251,7 @@ public class ChartDataFilterPane extends ThirdTabPane { cell(preDataNumPane), cell(notShowNull), cell(presentPane) - ).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent(); + ).getComponent(); } @@ -356,7 +356,7 @@ public class ChartDataFilterPane extends ThirdTabPane { @Override public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); - dim.height = FineUIScale.scale(FIL_HEIGHT); + dim.height = scale(FIL_HEIGHT); return dim; } @@ -410,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane { cell(preDataNumPane), cell(notShowNull), cell(presentPane) - ).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent(); + ).getComponent(); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java index 01c412d314..9aafe20192 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java @@ -5,11 +5,10 @@ import com.fr.chart.chartattr.BubblePlot; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartdata.BubbleReportDefinition; import com.fr.chart.chartdata.BubbleSeriesValue; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; - import javax.swing.JPanel; import java.util.ArrayList; import java.util.List; @@ -26,9 +25,7 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa public BubblePlotReportDataContentPane(ChartDataPane parent) { initEveryPane(); filterPane = new ChartDataFilterPane(new BubblePlot(), parent); - JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane); - panel.setBorder(getSidesBorder()); - filterPane.setBorder(getFilterPaneBorder()); + JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); this.add(panel, "0,6,2,4"); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java index 0eec72c37e..afc424bd88 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java @@ -1,18 +1,20 @@ package com.fr.design.mainframe.chart.gui.data.report; +import com.fine.theme.utils.FineLayoutBuilder; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartdata.MeterReportDefinition; +import com.fr.design.border.FineBorderFactory; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -37,31 +39,15 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan private ChartDataFilterPane filterPane; public MeterPlotReportDataContentPane(ChartDataPane parent) { -// initEveryPane(); -// -// List list = new ArrayList(); -// list.add(new Object[] { singCateName, "" }); -// list.add(new Object[] { singNeedleValue, "" }); -// seriesPane.populateBean(list); -// -// seriesPane.noAddUse(); - - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = getRowSize(); - Component[][] components = getShowComponents(); - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6); - panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 5, 8)); - + JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); + panel.setBorder(BorderFactory.createCompoundBorder(FineBorderFactory.createDefaultUnderlineBorder(), + new ScaledEmptyBorder(0, 0, 10, 0))); this.setLayout(new BorderLayout()); this.add(panel, BorderLayout.NORTH); filterPane = new ChartDataFilterPane(new MeterPlot(), parent); - JPanel pane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); - pane.setBorder(getSidesBorder()); - filterPane.setBorder(getFilterPaneBorder()); + JPanel pane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); this.add(pane, BorderLayout.CENTER); } diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java index 9224674924..2a8722c2fb 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -48,7 +48,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane private Column boxPane; public MeterPlotTableDataContentPane(ChartDataPane parent) { - this.setLayout(new BorderLayout(0, FineUIScale.scale(10))); + this.setLayout(new BorderLayout()); nameBox = new UIComboBoxWithNone(); nameBox.setSelectedIndex(nameBox.getItemCount() -1); @@ -59,6 +59,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane boxPane = new Column(); boxPane.setSpacing(10); + boxPane.add(getJSeparator()); JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent()); boxPane.add(namePane); @@ -71,6 +72,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom); boxPane.add(customPane); + boxPane.add(getJSeparator()); customPane.setVisible(false); @@ -86,9 +88,8 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane } }); - JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane, true); + JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); - this.add(getJSeparator(), BorderLayout.NORTH); this.add(boxPane, BorderLayout.CENTER); this.add(jPanel, BorderLayout.SOUTH); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 89281390d0..a7eba5d7e7 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -4,7 +4,6 @@ import com.fine.theme.icon.LazyIcon; import com.fine.theme.utils.FineLayoutBuilder; import com.fr.base.FRContext; import com.fr.chart.base.TextAttr; -import com.fr.design.constants.LayoutConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIColorButton; @@ -15,7 +14,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.utils.DesignUtils; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; @@ -23,9 +21,10 @@ import javax.swing.JPanel; import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.Component; -import java.awt.FlowLayout; import java.awt.Font; +import static com.fine.theme.utils.FineUIScale.scale; + public class ChartTextAttrPane extends BasicPane { private static final long serialVersionUID = 6731679928019436869L; public static final int FONT_START = 6; @@ -202,12 +201,9 @@ public class ChartTextAttrPane extends BasicPane { } protected void initComponents() { - Component[] components1 = new Component[]{ - fontColor, italic, bold - }; - JPanel buttonPane = new JPanel(new BorderLayout()); + JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0)); buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); - buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); + buttonPane.add(FineLayoutBuilder.createHorizontalLayout(10, fontColor, italic, bold), BorderLayout.EAST); this.setLayout(new BorderLayout()); this.add(getContentPane(buttonPane), BorderLayout.CENTER); From 7881d57f7882560064514ed8221882f93385714d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 14:24:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-132601=20fix:=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E9=9D=A2=E6=9D=BF=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartHtmlLabelPane.java | 18 +++--------------- ...nChartHtmlLabelPaneWithBackGroundLabel.java | 10 ++-------- .../designer/style/VanChartTitlePane.java | 9 +++++++-- .../label/VanChartPlotLabelDetailPane.java | 2 +- 4 files changed, 13 insertions(+), 26 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java index ebff936c1c..0c916ef4dd 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java @@ -1,5 +1,6 @@ package com.fr.van.chart.designer.component; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.DesignerEnvManager; import com.fr.design.constants.KeyWords; import com.fr.design.gui.autocomplete.AutoCompletion; @@ -13,11 +14,8 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.plugin.chart.base.VanChartHtmlLabel; -import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JComponent; import javax.swing.JPanel; @@ -63,18 +61,13 @@ public class VanChartHtmlLabelPane extends JPanel { UIComponentUtils.setLineWrap(useHtml); useHtml.addChangeListener(e -> checkWidthAndHeightPane()); widthAndHeightPane = createWidthAndHeightPane(); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {f}; - double[] rowSize = {p, p, p, p}; Component[][] components = new Component[][]{ new Component[]{createJSContentPane()}, new Component[]{useHtml}, - new Component[]{null, null}, }; - JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1}); this.setLayout(new BorderLayout()); this.add(contentPane, BorderLayout.NORTH); @@ -152,17 +145,12 @@ public class VanChartHtmlLabelPane extends JPanel { checkHeight(); } }); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {p, f}; - double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomHeight, customHeight}, - new Component[]{null, null} }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } private void checkWidth() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java index 4e29e3c827..6125ed1ed3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPaneWithBackGroundLabel.java @@ -1,10 +1,8 @@ package com.fr.van.chart.designer.component; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.JPanel; import java.awt.Component; @@ -12,16 +10,12 @@ import java.awt.Component; public class VanChartHtmlLabelPaneWithBackGroundLabel extends VanChartHtmlLabelPane { protected JPanel createWidthAndHeightPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; - JPanel panel = super.createWidthAndHeightPane(); Component[][] components = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Background")), panel}, }; - return TableLayoutHelper.createTableLayoutPane(components, new double[]{p, p}, new double[]{d, f}); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index 9b1adec3ec..9761c618ba 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -1,7 +1,6 @@ package com.fr.van.chart.designer.style; import com.fine.theme.utils.FineComponentsFactory; -import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIStyle; import com.fr.base.BaseFormula; import com.fr.base.Utils; @@ -46,6 +45,7 @@ import java.awt.event.MouseEvent; import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.fix; +import static com.fine.swing.ui.layout.Layouts.flex; import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.theme.utils.FineUIScale.scale; @@ -139,7 +139,12 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { row( cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Text"), SwingConstants.LEFT)).weight(1.2), cell(titleContent).weight(3) - )).getComponent(); + ), + row( + flex(1.2), + cell(useHtml).weight(3) + ) + ).getComponent(); return new UIExpandablePane( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content"), titleContentPane); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index ae862a170b..3f1f248a0b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -126,7 +126,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { double[] rowSize = getLabelPaneRowSize(plot, p); Component[][] components = getLabelPaneComponents(plot, p, columnSize); - return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1, 0}); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1, 0}); } protected Component[][] getLabelPaneComponents(Plot plot, double p, double[] columnSize) { From 87382872c296627eefb731819261915963f67d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 15:47:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-133037=20fix:=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=9D=A2=E6=9D=BF=E4=BF=AE=E5=A4=8D&?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controlpane/UISimpleListControlPane.java | 18 +++---------- .../chart/designer/other/AutoRefreshPane.java | 26 +++++++++++-------- .../other/AutoRefreshPaneWithoutTooltip.java | 9 +++---- .../other/VanChartInteractivePane.java | 3 ++- .../designer/mobile/ParaMobileDefinePane.java | 18 +++---------- 5 files changed, 27 insertions(+), 47 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java index 79c96067fe..c6536e138b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UISimpleListControlPane.java @@ -2,13 +2,13 @@ package com.fr.design.gui.controlpane; import com.fine.theme.icon.LazyIcon; import com.fr.design.actions.UpdateAction; +import com.fr.design.border.FineBorderFactory; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilist.ListModelElement; import com.fr.design.gui.ilist.UIList; -import com.fr.design.gui.itoolbar.UIToolBarUI; import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.menu.ShortCut; @@ -22,7 +22,6 @@ import sun.swing.DefaultLookup; import javax.swing.BorderFactory; import javax.swing.DefaultListModel; -import javax.swing.JComponent; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.ListCellRenderer; @@ -33,8 +32,6 @@ import javax.swing.event.ListSelectionListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; -import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.Point; import java.awt.Toolkit; import java.awt.event.ActionEvent; @@ -89,22 +86,14 @@ public class UISimpleListControlPane extends BasicPane { toolbarDef.addShortCut(sj.getShortCut()); } toolBar = ToolBarDef.createJToolBar(); - toolBar.setUI(new UIToolBarUI(){ - @Override - public void paint(Graphics g, JComponent c) { - Graphics2D g2 = (Graphics2D) g; - g2.setColor(Color.WHITE); - g2.fillRect(0, 0, c.getWidth(), c.getHeight()); - } - }); toolbarDef.updateToolBar(toolBar); // 封装一层,加边框 JPanel toolBarPane = new JPanel(new BorderLayout()); toolBarPane.add(toolBar, BorderLayout.CENTER); - toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR)); + toolBarPane.setBorder(FineBorderFactory.createDefaultUnderlineBorder()); listPane.add(toolBarPane, BorderLayout.NORTH); - + contentPane.setBorder(FineBorderFactory.createWrappedRoundBorder()); return contentPane; } @@ -420,7 +409,6 @@ public class UISimpleListControlPane extends BasicPane { private void initComponents() { label = new UILabel(); -// label.setBorder(BorderFactory.createEmptyBorder(3, 10, 3, 0)); initialLabelForeground = label.getForeground(); this.setLayout(new BorderLayout()); this.add(label, BorderLayout.CENTER); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java index 2f94ab42f7..77c7be9dd8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java @@ -18,6 +18,7 @@ import com.fr.plugin.chart.base.RefreshMoreLabel; import com.fr.plugin.chart.vanchart.VanChart; import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; +import org.jetbrains.annotations.Nullable; import javax.swing.JPanel; import javax.swing.SwingUtilities; @@ -82,28 +83,22 @@ public class AutoRefreshPane extends BasicBeanPane { initTooltipSet(); - JPanel jPanel = new JPanel(new BorderLayout()); - jPanel.add(autoTooltip, BorderLayout.CENTER); - jPanel.add(tooltipSet, BorderLayout.EAST); + JPanel tipPane = getTooltipPane(); JPanel moreLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label")), moreLabel); - Component[][] components = initComponent(jPanel); - JPanel panel1 = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); + Component[][] components = initComponent(tipPane); contentPane = new JPanel(new BorderLayout()); - contentPane.add(panel1, BorderLayout.CENTER); + contentPane.add(FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}), BorderLayout.CENTER); - Component[][] AutoTooltipComponent = initAutoTooltipComponent(); - JPanel panel2 = FineLayoutBuilder.compatibleTableLayout(10, AutoTooltipComponent, new double[]{1.2, 2, 1}); - contentPane.add(panel2, BorderLayout.SOUTH); return FineLayoutBuilder.createVerticalLayout(10, moreLabelPane, contentPane); } protected Component[][] initComponent(JPanel autoTooltipPane){ - Column toolTipPane = column(10, + Column centerPane = column(10, row( cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval"))), flex(), @@ -114,11 +109,20 @@ public class AutoRefreshPane extends BasicBeanPane { ).getComponent(); return new Component[][]{ - new Component[]{null, toolTipPane} + new Component[]{null, centerPane} }; } + @Nullable + protected JPanel getTooltipPane() { + JPanel tipPane = new JPanel(new BorderLayout()); + tipPane.add(autoTooltip, BorderLayout.CENTER); + tipPane.add(tooltipSet, BorderLayout.EAST); + return tipPane; + } + + @Deprecated protected Component[][] initAutoTooltipComponent () { return new Component[][]{ diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java index 21cfe6443f..845c15dbc4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPaneWithoutTooltip.java @@ -3,7 +3,7 @@ package com.fr.van.chart.designer.other; import com.fr.plugin.chart.base.RefreshMoreLabel; import com.fr.plugin.chart.vanchart.VanChart; -import java.awt.Component; +import javax.swing.JPanel; /** * Created by mengao on 2017/6/21. @@ -14,10 +14,9 @@ public class AutoRefreshPaneWithoutTooltip extends AutoRefreshPane { super(chart, isLargeModel); } - protected Component[][] initAutoTooltipComponent () { - return new Component[][]{ - new Component[]{null, null}, - }; + @Override + protected JPanel getTooltipPane() { + return null; } protected void updateAutoTooltip(RefreshMoreLabel refreshMoreLabel) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java index 334104128c..c0018a5919 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java @@ -281,7 +281,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane { //图表缩放新设计 恢复用注释。删除下面八个方法getzoomTypePane createZoomPaneContent // checkZoomEnabled getNameArray getValueArray checkZoomPane populateChartZoom updateChartZoom。 protected JPanel getZoomTypePane(UIButtonGroup zoomType) { - return TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction"), zoomType); + return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, + new UILabel(Toolkit.i18nText("Fine-Design_Chart_Zoom_Direction")), zoomType); } protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index 1682985261..d2a9bb4f73 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java @@ -1,7 +1,7 @@ package com.fr.design.widget.ui.designer.mobile; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.properties.PropertyTab; @@ -10,8 +10,6 @@ import com.fr.design.fun.ParameterExpandablePaneUIProvider; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.MobileWidgetListPane; import com.fr.design.mainframe.WidgetPropertyPane; @@ -22,7 +20,6 @@ import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.mobile.MobileParamStyle; import com.fr.report.mobile.EmptyMobileParamStyle; -import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; @@ -68,25 +65,16 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { // 手机属性 private UIExpandablePane getMobilePropertyPane() { mobileParamEditor = new AccessibleMobileParamEditor(new MobileParamSettingPane()); - double f = TableLayout.FILL; - double p = TableLayout.PREFERRED; - double[] rowSize = {p, p}; - double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}}; Component[][] components = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Param_Style")), mobileParamEditor}, }; - JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1); - JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - jPanel.add(panel); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, jPanel); + JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); + return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), 280, 20, panel); } // 控件顺序 private UIExpandablePane getMobileWidgetListPane() { mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData()); - mobileWidgetListPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 5, 0)); JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); panelWrapper.add(mobileWidgetListPane, BorderLayout.CENTER); From 09284a661f1be8811b6839c043bc9db96dff27d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 17:06:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-133198=20fix:List=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/controlpane/JListControlPane.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java index 828d9f845f..7a1094ab17 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java @@ -374,10 +374,8 @@ public abstract class JListControlPane extends JControlPane implements ListContr this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0)); add(this.textLabel, BorderLayout.CENTER); add(this.iconLabel, BorderLayout.WEST); - this.iconLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); - //iconLabel和textLabel的背景颜色不会被JList背景颜色覆盖,开发者自定义 - this.textLabel.setOpaque(true); - this.iconLabel.setOpaque(true); + this.textLabel.setOpaque(false); + this.iconLabel.setOpaque(false); } @Override @@ -390,9 +388,9 @@ public abstract class JListControlPane extends JControlPane implements ListContr this.textLabel.setText(nameable.getName()); boolean iconSet = false; if(isSelected) { - this.textLabel.setBackground(FlatUIUtils.getUIColor("List.selectionInactiveBackground", Color.GRAY)); + setBackground(FlatUIUtils.getUIColor("List.selectionInactiveBackground", Color.GRAY)); } else { - this.textLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); + setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE)); } for (NameableCreator creator : JListControlPane.this.creators()) { if (creator.menuIcon() != null && creator.acceptObject2Populate(nameable) != null) { From 1f12b37afe2299c23fbeadf71dbcbf7e05864f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Tue, 3 Sep 2024 17:07:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-133167=20&=20REPORT-133157=20fix:?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E7=BC=A9=E6=94=BE=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/parameter/ParameterPropertyPane.java | 8 +++++--- .../java/com/fr/design/mainframe/bbs/UserInfoLabel.java | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java b/designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java index 16c0e91d65..75257c0b01 100644 --- a/designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/parameter/ParameterPropertyPane.java @@ -1,5 +1,6 @@ package com.fr.design.parameter; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.base.Parameter; import com.fr.design.border.FineBorderFactory; import com.fr.design.constants.UIConstants; @@ -23,6 +24,8 @@ import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import static com.fine.theme.utils.FineUIScale.scale; + public class ParameterPropertyPane extends JPanel{ private ParameterToolBarPane toolbarPane; private ParaDefinitePane paraPane; @@ -32,8 +35,7 @@ public class ParameterPropertyPane extends JPanel{ private static ParameterPropertyPane THIS; private boolean isEditing = false; - private static final int PADDING_MIDDLE = 10; - private static final int ADD_PARA_PANE_MAX_HEIGHT = 95; + private static final int ADD_PARA_PANE_MAX_HEIGHT = scale(120); public static final ParameterPropertyPane getInstance() { if (THIS == null) { @@ -138,7 +140,7 @@ public class ParameterPropertyPane extends JPanel{ private void setEditor(FormDesigner editor) { if (formHierarchyTreePaneWrapper == null) { formHierarchyTreePaneWrapper = new JPanel(new BorderLayout()); - formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, 0)); + formHierarchyTreePaneWrapper.setBorder(new ScaledEmptyBorder(0, 10, 0, 0)); this.add(formHierarchyTreePaneWrapper, BorderLayout.CENTER); } formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance()); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java index 1d1ff9ad48..c4fd87acef 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -49,6 +49,7 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import static com.fine.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIStyle.BRAND_COLOR_LABEL; /** @@ -65,7 +66,7 @@ public class UserInfoLabel extends UILabel { private static final String MESSAGE_KEY = "messageCount"; private static final int MIN_MESSAGE_COUNT = 1; - private static final int MENU_HEIGHT = 20; + private static final int MENU_HEIGHT = scale(24); private static final int DEFAULT_BBS_UID = 0;