diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapRichTextFieldListPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapRichTextFieldListPane.java new file mode 100644 index 000000000..91e1817ef --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/VanChartMapRichTextFieldListPane.java @@ -0,0 +1,41 @@ +package com.fr.van.chart.map.designer.style; + +import com.fr.design.i18n.Toolkit; +import com.fr.design.ui.ModernUIPane; +import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; +import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; +import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; +import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; +import com.fr.van.chart.designer.component.richText.VanChartFieldAttrPane; +import com.fr.van.chart.designer.component.richText.VanChartFieldButton; +import com.fr.van.chart.designer.component.richText.VanChartFieldListPane; +import com.fr.van.chart.designer.component.richText.VanChartFieldListener; +import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel; + +public class VanChartMapRichTextFieldListPane extends VanChartFieldListPane { + + public VanChartMapRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane richEditorPane) { + super(fieldAttrPane, richEditorPane); + } + + protected void initDefaultFieldButton() { + VanChartFieldListener fieldListener = getFieldListener(); + + VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Area_Name"), + new AttrTooltipAreaNameFormat(), false, fieldListener); + + VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), + new AttrTooltipSeriesFormat(), false, fieldListener); + + VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Value"), + new AttrTooltipValueFormat(), false, fieldListener); + + VanChartFieldButton percentButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Percent"), + new AttrTooltipPercentFormat(), false, fieldListener); + + setCategoryNameButton(categoryNameButton); + setSeriesNameButton(seriesNameButton); + setValueButton(valueButton); + setPercentButton(percentButton); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java index 084953c99..baec70ca9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java @@ -1,18 +1,19 @@ package com.fr.van.chart.map.designer.style.label; +import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipMapValueFormat; +import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; +import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; +import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; import com.fr.plugin.chart.type.TextAlign; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -21,6 +22,7 @@ import javax.swing.JPanel; * Created by Mitisky on 16/5/20. */ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { + public VanChartMapLabelContentPane(VanChartStylePane parent, JPanel showOnPane, boolean inCondition) { super(parent, showOnPane, inCondition); } @@ -33,12 +35,22 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane)); } - @Override - protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) { - setRichTextCategoryNameFormatPane(new MapAreaNameFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane)); + protected String[] getRichTextFieldNames() { + return new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Area_Name"), + Toolkit.i18nText("Fine-Design_Chart_Series_Name"), + Toolkit.i18nText("Fine-Design_Chart_Use_Value"), + Toolkit.i18nText("Fine-Design_Chart_Use_Percent") + }; + } + + protected AttrTooltipFormat[] getRichTextFieldFormats() { + return new AttrTooltipFormat[]{ + new AttrTooltipAreaNameFormat(), + new AttrTooltipSeriesFormat(), + new AttrTooltipValueFormat(), + new AttrTooltipPercentFormat() + }; } @Override diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java index 12948b14d..03f720bf7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java @@ -1,17 +1,18 @@ package com.fr.van.chart.map.designer.style.tooltip; +import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipMapValueFormat; +import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; +import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; +import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.PercentFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; -import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -32,12 +33,22 @@ public class VanChartMapTooltipContentPane extends VanChartTooltipContentPane { setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane)); } - @Override - protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) { - setRichTextCategoryNameFormatPane(new MapAreaNameFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane)); - setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane)); + protected String[] getRichTextFieldNames() { + return new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Area_Name"), + Toolkit.i18nText("Fine-Design_Chart_Series_Name"), + Toolkit.i18nText("Fine-Design_Chart_Use_Value"), + Toolkit.i18nText("Fine-Design_Chart_Use_Percent") + }; + } + + protected AttrTooltipFormat[] getRichTextFieldFormats() { + return new AttrTooltipFormat[]{ + new AttrTooltipAreaNameFormat(), + new AttrTooltipSeriesFormat(), + new AttrTooltipValueFormat(), + new AttrTooltipPercentFormat() + }; } @Override