Browse Source

词云富文本新增字段适配

research/11.0
Qinghui.Liu 4 years ago
parent
commit
8de94cf98e
  1. 7
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  2. 6
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java
  3. 41
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRichTextFieldListPane.java
  4. 37
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java

7
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -115,8 +115,9 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
this.parent = parent;
this.showOnPane = showOnPane;
this.richTextTooltipContent = createAttrTooltip();
initFormatPane(parent, showOnPane);
initRichTextTooltipContent();
initRichTextFormatPane(parent, showOnPane);
this.setLayout(new BorderLayout());
@ -314,10 +315,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
return Toolkit.i18nText("Fine-Design_Report_Text");
}
protected void initRichTextTooltipContent() {
this.richTextTooltipContent = new AttrTooltipContent();
}
protected JPanel getLabelContentPane(JPanel contentPane) {
return createTableLayoutPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Content"), contentPane);
}

6
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterTooltipContentPane.java

@ -60,10 +60,6 @@ public class VanChartScatterTooltipContentPane extends VanChartTooltipContentPa
sizeFormatPane = new ValueFormatPaneWithCheckBox(parent, showOnPane);
}
protected void initRichTextTooltipContent() {
setRichTextTooltipContent(new ScatterAttrTooltipContent());
}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
@ -73,7 +69,7 @@ public class VanChartScatterTooltipContentPane extends VanChartTooltipContentPa
}
protected AttrTooltipContent getInitialTooltipContent() {
return new ScatterAttrTooltipContent();
return createAttrTooltip();
}
};
}

41
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRichTextFieldListPane.java

@ -0,0 +1,41 @@
package com.fr.van.chart.wordcloud.designer.style;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.ModernUIPane;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
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 VanChartWordCloudRichTextFieldListPane extends VanChartFieldListPane {
public VanChartWordCloudRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener fieldListener = getFieldListener();
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
new AttrTooltipCategoryFormat(), false, fieldListener);
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Word_Name"),
new AttrTooltipNameFormat(), false, fieldListener);
VanChartFieldButton valueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Word_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);
}
}

37
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudTooltipContentPane.java

@ -2,17 +2,18 @@ package com.fr.van.chart.wordcloud.designer.style;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.ModernUIPane;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.format.AttrTooltipNameFormat;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithoutCheckBox;
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.component.richText.VanChartFieldAttrPane;
import com.fr.van.chart.designer.component.richText.VanChartFieldListPane;
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel;
import com.fr.van.chart.designer.component.richText.VanChartRichTextPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -53,31 +54,19 @@ public class VanChartWordCloudTooltipContentPane extends VanChartTooltipContentP
setPercentFormatPane(percentFormatPane);
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
CategoryNameFormatPaneWithoutCheckBox richTextCategoryNameFormatPane = new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name");
}
};
SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane = new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Word_Name");
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartWordCloudRichTextFieldListPane(fieldAttrPane, richEditor);
}
};
ValueFormatPaneWithoutCheckBox richTextValueFormatPane = new ValueFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Word_Value");
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
PercentFormatPaneWithoutCheckBox richTextPercentFormatPane = new PercentFormatPaneWithoutCheckBox(parent, showOnPane);
setRichTextCategoryNameFormatPane(richTextCategoryNameFormatPane);
setRichTextSeriesNameFormatPane(richTextSeriesNameFormatPane);
setRichTextValueFormatPane(richTextValueFormatPane);
setRichTextPercentFormatPane(richTextPercentFormatPane);
}
@Override
protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent attrTooltipContent = new AttrTooltipContent();
attrTooltipContent.setSeriesFormat(new AttrTooltipNameFormat());

Loading…
Cancel
Save