Browse Source

CHART-22767&CHART-22876&CHART-22873&CHART-22861&CHART-22863&CHART-22797&CHART-22768 若干bug一起改

feature/x
方磊 3 years ago
parent
commit
0248a72bd3
  1. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChangeConfigPane.java
  2. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotMoreCateReportDataContentPane.java
  3. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotMoreCateTableDataContentPane.java
  4. 26
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPaneHelper.java
  5. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

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

@ -246,7 +246,8 @@ public class ChangeConfigPane extends BasicBeanPane<ChartCollection> {
result = Utils.objectToString(switchTitle);
}
} else {
result = Toolkit.i18nText("Fine-Design_Chart_Chart") + (chartIndex + 1);
result = collection.getChartName(chartIndex);
chart.setSwitchTitle(result);
}
TinyFormulaPane title = new TinyFormulaPane();

6
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.Plot;
import com.fr.chart.chartdata.NormalReportDataDefinition;
import com.fr.decision.base.util.UUIDUtil;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.TinyFormulaPane;
@ -16,6 +15,7 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.axis.VanChartAxisPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
@ -28,7 +28,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
@ -192,11 +191,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
Plot plot = collection.getSelectedChart().getPlot();
if (definition instanceof NormalReportDataDefinition) {
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition;
reportDefinition.clearMoreCate();
updateMoreCate(reportDefinition, plot);
}
VanChartAxisPaneHelper.updateAxisCategoryStyles(collection);
}
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) {

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

@ -14,6 +14,7 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.van.chart.designer.style.axis.VanChartAxisPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
@ -246,6 +247,7 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
normal.clearMoreCate();
updateMoreCate(normal, plot);
}
VanChartAxisPaneHelper.updateAxisCategoryStyles(collection);
}
protected void updateMoreCate(NormalTableDataDefinition normal, Plot plot) {
@ -256,5 +258,4 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
}
}
}
}

26
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisPaneHelper.java

@ -1,9 +1,15 @@
package com.fr.van.chart.designer.style.axis;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.Plot;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithThemeStyle;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartAxisLabelStyle;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
@ -27,4 +33,24 @@ public class VanChartAxisPaneHelper {
}
};
}
/**
* 在update数据集分类的时候需要联动update一下样式-坐标轴里面的分层样式设置,来自CHART-22873
*
* @param collection
*/
public static void updateAxisCategoryStyles(ChartCollection collection) {
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition();
int size = definition == null ? 1 : definition.getMoreCateSize() + 1;
Plot plot = collection.getSelectedChart().getPlot();
if (plot instanceof VanChartAxisPlot) {
for(VanChartAxis axis : ((VanChartAxisPlot) plot).getXAxisList()){
axis.clearCategoryStyles();
for (int i = 0; i < size; i++) {
axis.addCategoryStyle(new VanChartAxisLabelStyle());
}
}
}
}
}

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.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
@ -264,7 +265,20 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
private JPanel createLabelContentPane() {
labelContentPane = 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(createCategoryStylePane(), LAYER_DISPLAY);
showLogicPane.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show_Logic"), showLogic), BorderLayout.NORTH);

Loading…
Cancel
Save