From 3d08f416a315c569425b56da9f6d46766c8650e9 Mon Sep 17 00:00:00 2001 From: Carlson Date: Wed, 9 Aug 2023 14:04:02 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-102520=20fix:=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/NormalChartDataPane.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index ba1701710e..f8f43d232a 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.chartx.data.DataLayoutHelper; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.UIComboBoxPane; @@ -61,15 +62,22 @@ public class NormalChartDataPane extends DataContentsPane { JPanel contentPane = new JPanel(new BorderLayout()); dataPane = new UIComboBoxPane() { protected void initLayout() { - this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); - JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); - northPane.add(jcb, BorderLayout.CENTER); - UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); - label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); - northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); - northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); if (ChartEditContext.supportReportData()) { - this.add(northPane, BorderLayout.NORTH); + if (ChartEditContext.normalMode()) { + this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); + JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); + northPane.add(jcb, BorderLayout.CENTER); + UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); + label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); + northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); + northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); + this.add(northPane, BorderLayout.NORTH); + } else { + this.setLayout(new BorderLayout(0, 6)); + JPanel northPane = DataLayoutHelper.createDataLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb); + northPane.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP)); + this.add(northPane, BorderLayout.NORTH); + } } this.add(cardPane, BorderLayout.CENTER); From f902706eddae15b30aae0175fa20f4ca3735d29d Mon Sep 17 00:00:00 2001 From: Carlson Date: Wed, 9 Aug 2023 16:39:23 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-102520=20fix:=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/data/NormalChartDataPane.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index f8f43d232a..8ea3858646 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -62,22 +62,21 @@ public class NormalChartDataPane extends DataContentsPane { JPanel contentPane = new JPanel(new BorderLayout()); dataPane = new UIComboBoxPane() { protected void initLayout() { + this.setLayout(new BorderLayout(ChartEditContext.normalMode() ? LayoutConstants.HGAP_LARGE : 0,6)); if (ChartEditContext.supportReportData()) { + JPanel northPane; if (ChartEditContext.normalMode()) { - this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); - JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); + northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0)); northPane.add(jcb, BorderLayout.CENTER); UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); - this.add(northPane, BorderLayout.NORTH); } else { - this.setLayout(new BorderLayout(0, 6)); - JPanel northPane = DataLayoutHelper.createDataLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb); + northPane = DataLayoutHelper.createDataLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb); northPane.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP)); - this.add(northPane, BorderLayout.NORTH); } + this.add(northPane, BorderLayout.NORTH); } this.add(cardPane, BorderLayout.CENTER); From dc8285cb29808b50b31117cc5f6e5f4d1044b5a2 Mon Sep 17 00:00:00 2001 From: Carlson Date: Tue, 15 Aug 2023 11:38:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-102440=20fix:=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E5=85=AC=E5=BC=8F=E5=86=85=E5=AE=B9=E5=90=8E=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA"$$$"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/TinyFormulaPane.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java index d3060b42b8..75ab40aaae 100644 --- a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java @@ -11,9 +11,11 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.DesignerContext; - -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Cursor; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -63,11 +65,7 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver } protected void populateTextField(BaseFormula fm) { - if (fm.getContent().length() <= 1) { - formulaTextField.setText("$$$"); - } else { - formulaTextField.setText(fm.getContent()); - } + formulaTextField.setText(fm.getContent()); } protected void initLayout() { From a145a559244492b4f6ff6499a15e55bceb2961ce Mon Sep 17 00:00:00 2001 From: Carlson Date: Thu, 17 Aug 2023 15:00:02 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E6=9B=BF=E6=8D=A2=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E7=9A=84TinyFormulaPane=20#REPORT-102440?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formula/DefaultTinyFormulaPane.java | 22 +++++++++++++++++++ .../fr/design/formula/TinyFormulaPane.java | 6 ++++- .../report/GisMapReportDataContentPane.java | 17 +++++++++----- .../chart/report/MapMoreReportIndexPane.java | 15 ++++++++----- .../chart/report/MapReportDataSinglePane.java | 16 +++++++++----- .../component/MultiTinyFormulaPane.java | 5 +++-- .../MultiTinyFormulaPaneWithUISpinner.java | 3 ++- .../TinyFormulaPaneEditorComponent.java | 9 ++------ .../LineMapAreaLngLatPaneWithTinyFormula.java | 17 +++++++------- ...PointMapAreaLngLatPaneWithTinyFormula.java | 9 ++++---- .../diff/AreaMapCellDataFieldsPane.java | 3 ++- .../fields/diff/GaugeCellDataFieldsPane.java | 5 +++-- .../diff/LineMapCellDataFieldsPane.java | 3 ++- .../diff/MultiPieCellDataFieldsPane.java | 3 ++- .../SingleCategoryCellDataFieldsPane.java | 3 ++- .../diff/StructureCellDataFieldsPane.java | 9 ++++---- .../diff/WordCloudCellDataFieldsPane.java | 5 +++-- .../mainframe/chart/gui/ChangeConfigPane.java | 3 ++- .../report/AbstractReportDataContentPane.java | 17 +++++++------- .../CategoryPlotReportDataContentPane.java | 11 +++------- .../MeterPlotReportDataContentPane.java | 7 +++--- .../StockPlotReportDataContentPane.java | 12 +++++----- .../table/MeterPlotTableDataContentPane.java | 5 +++-- .../chart/gui/style/ChartAxisTitlePane.java | 12 ++++++---- .../series/ColorPickerPaneWithFormula.java | 3 ++- .../series/ColorPickerPaneWithMaxMin.java | 3 ++- .../series/MapColorPickerPaneWithFormula.java | 3 ++- .../chart/gui/style/title/ChartTitlePane.java | 11 ++++++---- .../AbstractExtendedChartReportDataPane.java | 5 +++-- .../BoxPlotReportResultDataSeriesPane.java | 3 ++- .../data/report/TinyFormulaWithEditLabel.java | 3 ++- ...eDimensionalPlotReportDataContentPane.java | 4 ++-- .../other/VanChartInteractivePane.java | 5 +++-- .../chart/designer/other/zoom/ZoomPane.java | 5 +++-- .../designer/style/VanChartTitlePane.java | 3 ++- .../style/axis/VanChartBaseAxisPane.java | 3 ++- .../background/VanChartAlertValuePane.java | 7 +++--- .../VanChartCustomIntervalBackgroundPane.java | 6 ++--- .../component/GanttReportDataContentPane.java | 4 ++-- .../component/TinyFormulaWithButtonPane.java | 3 ++- .../link/GanttLinkReportDataContentPane.java | 4 ++-- .../data/component/report/AreaPane.java | 3 ++- .../component/report/LongLatAreaPane.java | 7 +++--- .../VanAreaMapPlotReportDataContentPane.java | 3 ++- .../MultiPiePlotReportDataContentPane.java | 6 ++--- .../StructurePlotReportDataContentPane.java | 9 ++++---- .../WordCloudPlotReportDataContentPane.java | 6 ++--- 47 files changed, 199 insertions(+), 127 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java diff --git a/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java new file mode 100644 index 0000000000..8725a23669 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java @@ -0,0 +1,22 @@ +package com.fr.design.formula; + +import com.fr.base.BaseFormula; +import com.fr.stable.StringUtils; + +/** + * @author Carlson + * @version 11.0 + * Created by Carlson on 2023/8/14 17:15 + * @description + **/ +public class DefaultTinyFormulaPane extends TinyFormulaPane{ + + @Override + protected void populateTextField(BaseFormula fm) { + if (fm.getContent().length() <= 1) { + formulaTextField.setText(StringUtils.EMPTY); + } else { + formulaTextField.setText(fm.getContent()); + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java index 75ab40aaae..e5594ddd11 100644 --- a/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java @@ -65,7 +65,11 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver } protected void populateTextField(BaseFormula fm) { - formulaTextField.setText(fm.getContent()); + if (fm.getContent().length() <= 1) { + formulaTextField.setText("$$$"); + } else { + formulaTextField.setText(fm.getContent()); + } } protected void initLayout() { diff --git a/designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java index 6b646ce83c..583b0a54fc 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/report/GisMapReportDataContentPane.java @@ -10,6 +10,7 @@ import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -18,14 +19,18 @@ import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; - import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; -import javax.swing.*; +import javax.swing.JComponent; +import javax.swing.JPanel; +import javax.swing.JTable; +import javax.swing.SwingConstants; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.util.ArrayList; @@ -53,8 +58,8 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Address"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_LatLng")}); lnglatOrder = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Longitude_First"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Latitude_First")}); - addressPane = new TinyFormulaPane(); - addressNamePane = new TinyFormulaPane(); + addressPane = new DefaultTinyFormulaPane(); + addressNamePane = new DefaultTinyFormulaPane(); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = new double[]{p, f}; @@ -259,7 +264,7 @@ public class GisMapReportDataContentPane extends FurtherBasicBeanPane { @Override protected TinyFormulaPane createJComponent() { - return new TinyFormulaPane(); + return new DefaultTinyFormulaPane(); } @Override diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java b/designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java index 7470ef62d2..5f18eb2549 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/correlation/TinyFormulaPaneEditorComponent.java @@ -1,9 +1,9 @@ package com.fr.design.chartx.component.correlation; -import com.fr.base.BaseFormula; import com.fr.base.Utils; import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UICorrelationPane; @@ -20,17 +20,12 @@ public class TinyFormulaPaneEditorComponent extends AbstractEditorComponent { result = Utils.objectToString(content); } } - TinyFormulaPane title = new TinyFormulaPane(); + TinyFormulaPane title = new DefaultTinyFormulaPane(); title.populateBean(result); switchTitles.add(title); switchTitlePane.add(title, collection.getChartName(chartIndex)); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java index 7a6a1f38d5..1073f0e410 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -8,6 +8,7 @@ import com.fr.chart.chartdata.SeriesDefinition; import com.fr.design.beans.BasicBeanPane; import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserverListener; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UICorrelationPane; import com.fr.design.gui.itable.UITable; @@ -15,10 +16,15 @@ import com.fr.design.gui.itable.UITableEditor; import com.fr.design.layout.TableLayout; import com.fr.stable.StableUtils; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.JTable; import javax.swing.border.Border; import javax.swing.event.ChangeEvent; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -171,17 +177,12 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane { } private JPanel createDefaultAttrPane(){ - titleContent = new TinyFormulaPane(); + titleContent = new DefaultTinyFormulaPane(); textAttrPane = new ChartTextAttrPane(); Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), diff --git a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java index b8758b9f5e..e11fec903a 100644 --- a/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java +++ b/designer-chart/src/main/java/com/fr/extended/chart/AbstractExtendedChartReportDataPane.java @@ -2,6 +2,7 @@ package com.fr.extended.chart; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; @@ -42,8 +43,8 @@ public abstract class AbstractExtendedChartReportDataPane { private JPanel createScaleAxisPane() { zoomResize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Change"), Toolkit.i18nText("Fine-Design_Chart_Non_Adjustment")}); - from = new TinyFormulaPane(); - to = new TinyFormulaPane(); + from = new DefaultTinyFormulaPane(); + to = new DefaultTinyFormulaPane(); Component[][] components = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Widget_Boundary")), zoomResize}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_From")), from}, diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java index dfbf2d640a..3fa7f5ff47 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/other/zoom/ZoomPane.java @@ -4,6 +4,7 @@ import com.fr.chartx.attr.ZoomAttribute; import com.fr.chartx.attr.ZoomInitialDisplayType; import com.fr.chartx.attr.ZoomModeType; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; @@ -140,8 +141,8 @@ public class ZoomPane extends BasicBeanPane { final JPanel topPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components1, new double[]{p}, columnSize); - leftFormulaPane = new TinyFormulaPane(); - rightFormulaPane = new TinyFormulaPane(); + leftFormulaPane = new DefaultTinyFormulaPane(); + rightFormulaPane = new DefaultTinyFormulaPane(); Component[][] components2 = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Left_Boundary")), leftFormulaPane}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Right_Boundary")), rightFormulaPane} 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 87d6fbfda7..3469e26246 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 @@ -5,6 +5,7 @@ import com.fr.base.BaseUtils; import com.fr.base.Utils; import com.fr.chart.base.TextAttr; import com.fr.chartx.config.info.constant.ConfigType; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.frpane.UINumberDragPane; @@ -152,7 +153,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { } private JPanel createTitleContentPane(double[] row, double[] col) { - titleContent = new TinyFormulaPane(); + titleContent = new DefaultTinyFormulaPane(); useHtml = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Html")); UIComponentUtils.setLineWrap(useHtml); Component[][] components = new Component[][]{ diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java index 1197d16b7c..fed96db681 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -8,6 +8,7 @@ import com.fr.chart.base.TextAttr; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Title; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; @@ -157,7 +158,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { showTitle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")}); titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane(); titleAlignPane.setSelectedItem(Constants.CENTER); - titleContent = new TinyFormulaPane(); + titleContent = new DefaultTinyFormulaPane(); titleUseHtml = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Html")); UIComponentUtils.setLineWrap(titleUseHtml); titleTextAttrPane = getChartTextAttrPane(); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java index 49e7f3fa99..e4ceae7fa9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java @@ -5,14 +5,15 @@ import com.fr.base.Utils; import com.fr.chart.base.AttrColor; import com.fr.chart.base.AttrLineStyle; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.chart.UISpinnerWithPx; -import com.fr.design.i18n.Toolkit; import com.fr.design.gui.style.FRFontPane; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -86,7 +87,7 @@ public class VanChartAlertValuePane extends BasicBeanPane { } private void initComponents() { - alertValue = new TinyFormulaPane(); + alertValue = new DefaultTinyFormulaPane(); //設置大小,防止文本過長導致界面“變形” alertValue.setPreferredSize(new Dimension(VALUE_WD, HT)); @@ -95,7 +96,7 @@ public class VanChartAlertValuePane extends BasicBeanPane { lineWidthSpinner = new UISpinnerWithPx(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE); alertLineColor = new ColorSelectBox(PREFERRED_WIDTH); alertTextPosition = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Top"), Toolkit.i18nText("Fine-Design_Chart_Axis_Bottom")}); - alertText = new TinyFormulaPane(); + alertText = new DefaultTinyFormulaPane(); //設置大小,防止文本過長導致界面“變形” alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java index ef6dc0e111..42fcdad8eb 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java @@ -3,6 +3,7 @@ package com.fr.van.chart.designer.style.background; import com.fr.base.BaseFormula; import com.fr.base.Utils; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; @@ -13,7 +14,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; - import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; import com.fr.van.chart.designer.TableLayout4VanChartHelper; @@ -48,8 +48,8 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane(); for (int i = 0; i < levelNum; i++){ - levelNameList.add(new TinyFormulaPane()); + levelNameList.add(new DefaultTinyFormulaPane()); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java index 1e26e2f55c..11f94ef87b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/data/StructurePlotReportDataContentPane.java @@ -2,6 +2,7 @@ package com.fr.van.chart.structure.desinger.data; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; @@ -33,11 +34,11 @@ public class StructurePlotReportDataContentPane extends AbstractReportDataConten double[] columnSize = {p, f}; double[] rowSize = {p, p, p, p, p}; - nodeName = new TinyFormulaPane(); - nodeID = new TinyFormulaPane(); - parentID = new TinyFormulaPane(); + nodeName = new DefaultTinyFormulaPane(); + nodeID = new DefaultTinyFormulaPane(); + parentID = new DefaultTinyFormulaPane(); seriesName = new UITextField(); - nodeValue = new TinyFormulaPane(); + nodeValue = new DefaultTinyFormulaPane(); Component[][] components = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Node_Name")), nodeName}, diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java index d95a9ddc19..d924004881 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java @@ -2,13 +2,13 @@ package com.fr.van.chart.wordcloud.designer.data; import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.formula.DefaultTinyFormulaPane; import com.fr.design.formula.TinyFormulaPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; - import com.fr.plugin.chart.wordcloud.data.WordCloudReportDefinition; import javax.swing.BorderFactory; @@ -32,8 +32,8 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten double[] rowSize = { p, p, p}; name = new UITextField(); - wordName = new TinyFormulaPane(); - wordValue = new TinyFormulaPane(); + wordName = new DefaultTinyFormulaPane(); + wordValue = new DefaultTinyFormulaPane(); Component[][] components = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name")), name}, From befb07057e615a4ffca3149a774004c6e50c125c Mon Sep 17 00:00:00 2001 From: Carlson Date: Fri, 18 Aug 2023 13:49:32 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E4=BF=9D=E7=95=99=E2=80=9C=3D?= =?UTF-8?q?=E2=80=9D=20#none?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/formula/DefaultTinyFormulaPane.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java index 8725a23669..5a106ea38c 100644 --- a/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/DefaultTinyFormulaPane.java @@ -1,7 +1,6 @@ package com.fr.design.formula; import com.fr.base.BaseFormula; -import com.fr.stable.StringUtils; /** * @author Carlson @@ -13,10 +12,6 @@ public class DefaultTinyFormulaPane extends TinyFormulaPane{ @Override protected void populateTextField(BaseFormula fm) { - if (fm.getContent().length() <= 1) { - formulaTextField.setText(StringUtils.EMPTY); - } else { - formulaTextField.setText(fm.getContent()); - } + formulaTextField.setText(fm.getContent()); } }