Browse Source

Pull request #7894: CHART-22876&CHART-22873&CHART-22861&CHART-22863&CHART-22797&CHART-22768 若干bug一起改

Merge in DESIGN/design from ~FANGLEI/design:feature/x to feature/x

* commit '3764a4ce48569bdf2f8a1319e45b7cd2aec13f64':
  CHART-22797 修改冗余代码,将ChangeConfigPane里面关于SwitchTitle为null的冗余判断删除
  CHART-22873 将更新分类样式的代码放到ChartCollection中
  CHART-22767&CHART-22876&CHART-22873&CHART-22861&CHART-22863&CHART-22797&CHART-22768 若干bug一起改
feature/x
fanglei 3 years ago
parent
commit
2ae949d102
  1. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  2. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  3. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  4. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

6
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java

@ -23,6 +23,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -238,17 +239,14 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
private void populateSwitchTitlePane(int chartIndex, ChartCollection collection) { private void populateSwitchTitlePane(int chartIndex, ChartCollection collection) {
Chart chart = collection.getChart(chartIndex, Chart.class); Chart chart = collection.getChart(chartIndex, Chart.class);
Object switchTitle = chart.getSwitchTitle(); Object switchTitle = chart.getSwitchTitle();
String result; String result = StringUtils.EMPTY;
if (switchTitle != null) { if (switchTitle != null) {
if (switchTitle instanceof BaseFormula) { if (switchTitle instanceof BaseFormula) {
result = ((BaseFormula) switchTitle).getContent(); result = ((BaseFormula) switchTitle).getContent();
} else { } else {
result = Utils.objectToString(switchTitle); result = Utils.objectToString(switchTitle);
} }
} else {
result = Toolkit.i18nText("Fine-Design_Chart_Chart") + (chartIndex + 1);
} }
TinyFormulaPane title = new TinyFormulaPane(); TinyFormulaPane title = new TinyFormulaPane();
title.populateBean(result); title.populateBean(result);
switchTitles.add(title); switchTitles.add(title);

5
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java

@ -7,7 +7,6 @@ import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.NormalReportDataDefinition; import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.decision.base.util.UUIDUtil;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
@ -28,7 +27,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
@ -192,11 +190,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
Plot plot = collection.getSelectedChart().getPlot(); Plot plot = collection.getSelectedChart().getPlot();
if (definition instanceof NormalReportDataDefinition) { if (definition instanceof NormalReportDataDefinition) {
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition;
reportDefinition.clearMoreCate(); reportDefinition.clearMoreCate();
updateMoreCate(reportDefinition, plot); updateMoreCate(reportDefinition, plot);
} }
collection.updateAxisCategoryStyles();
} }
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) { protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java

@ -246,6 +246,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
normal.clearMoreCate(); normal.clearMoreCate();
updateMoreCate(normal, plot); updateMoreCate(normal, plot);
} }
collection.updateAxisCategoryStyles();
} }
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) { protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
@ -256,5 +257,4 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
} }
} }
} }
} }

16
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -46,6 +46,7 @@ import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
@ -264,7 +265,20 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
private JPanel createLabelContentPane() { private JPanel createLabelContentPane() {
labelContentPane = new JPanel(new BorderLayout()); labelContentPane = new JPanel(new BorderLayout());
showLogicPane = new JPanel(new BorderLayout()); showLogicPane = new JPanel(new BorderLayout());
labelStylePane = new JPanel(new CardLayout()); labelStylePane = new JPanel(new CardLayout()) {
@Override
public Dimension getPreferredSize() {
switch (showLogic.getSelectedIndex()) {
case 0:
return wholeDisplayLabelPanel.getPreferredSize();
case 1:
return categoryStylePane.getPreferredSize();
case -1:
default:
return super.getPreferredSize();
}
}
};
labelStylePane.add(wholeDisplayLabelPanel, WHOLE_DISPLAY); labelStylePane.add(wholeDisplayLabelPanel, WHOLE_DISPLAY);
labelStylePane.add(createCategoryStylePane(), LAYER_DISPLAY); labelStylePane.add(createCategoryStylePane(), LAYER_DISPLAY);
showLogicPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic"), showLogic), BorderLayout.NORTH); showLogicPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic"), showLogic), BorderLayout.NORTH);

Loading…
Cancel
Save