Browse Source

CHART-22040 设计器增加排序的按钮

feature/x
方磊 3 years ago
parent
commit
76430cddae
  1. 14
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

14
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java

@ -1,13 +1,13 @@
package com.fr.van.chart.funnel.designer.style;
import com.fr.chart.chartattr.Plot;
import com.fr.design.i18n.Toolkit;
import com.fr.design.gui.ibutton.UIButtonGroup;
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.ChartStylePane;
import com.fr.plugin.chart.funnel.FunnelSortType;
import com.fr.plugin.chart.funnel.VanChartFunnelPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
@ -51,7 +51,11 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel createFunnelStylePane() {
useSameSlantAngle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Same_Slant_Angle"), Toolkit.i18nText("Fine-Design_Chart_Use_Diff_Slant_Angle")});
sort = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Auto_Sort"), Toolkit.i18nText("Fine-Design_Chart_Origin")});
sort = new UIButtonGroup(new String[]{
Toolkit.i18nText("Fine-Design_Chart_Ascending_Sort"),
Toolkit.i18nText("Fine-Design_Chart_Descending_Sort"),
Toolkit.i18nText("Fine-Design_Chart_Origin_Sort")
});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -78,7 +82,7 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
if(plot instanceof VanChartFunnelPlot){
useSameSlantAngle.setSelectedIndex(((VanChartFunnelPlot) plot).isUseSameSlantAngle() ? 0 : 1);
sort.setSelectedIndex(((VanChartFunnelPlot) plot).isSort() ? 0 : 1);
sort.setSelectedIndex(((VanChartFunnelPlot) plot).getSortType().getSortType());
}
}
@ -94,7 +98,7 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane {
if(plot instanceof VanChartFunnelPlot){
((VanChartFunnelPlot) plot).setUseSameSlantAngle(useSameSlantAngle.getSelectedIndex() == 0);
((VanChartFunnelPlot) plot).setSort(sort.getSelectedIndex() == 0);
((VanChartFunnelPlot) plot).setSortType(FunnelSortType.parseSortType(sort.getSelectedIndex()));
}
}
}

Loading…
Cancel
Save