Browse Source

Pull request #3467: CHART-15837 适配所有图表类型的标签提示富文本的新增字段功能

Merge in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0

* commit '72133b25c5c72b76575f494b35bfa466dc37079c':
  新增字段支持部分图表类型
  调整富文本参数顺序
  适配仪表盘,清理代码
  适配饼图
  适配箱型图
  适配甘特图
  适配框架图
  适配漏斗图
  适配流向地图
  适配地图
  适配多层饼图
  设计新增字段的id
feature/big-screen
ju|剧浩宇 4 years ago
parent
commit
a6cf5968fd
  1. 135
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxRichTextDetailedFieldListPane.java
  2. 41
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxRichTextResultFieldListPane.java
  3. 294
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java
  4. 15
      designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java
  5. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java
  6. 121
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  7. 52
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldAttrPane.java
  8. 31
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java
  9. 24
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java
  10. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java
  11. 18
      designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/RefreshTooltipContentPaneWithOutSeries.java
  12. 53
      designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java
  13. 34
      designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/VanChartFieldListPaneWithOutSeries.java
  14. 65
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java
  15. 18
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelRefreshTooltipContentPane.java
  16. 62
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelRichTextFieldListPane.java
  17. 65
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java
  18. 107
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttRichTextFieldListPane.java
  19. 131
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttTooltipContentPane.java
  20. 20
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java
  21. 21
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapRefreshTooltipContentPane.java
  22. 20
      designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java
  23. 41
      designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapRichTextFieldListPane.java
  24. 48
      designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java
  25. 47
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java
  26. 41
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieRichTextFieldListPane.java
  27. 47
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java
  28. 20
      designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMutiPieRefreshTooltipContentPane.java
  29. 80
      designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieCategoryLabelContentPane.java
  30. 70
      designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieCategoryRichTextFieldListPane.java
  31. 56
      designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieValueLabelContentPane.java
  32. 34
      designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieValueRichTextFieldListPane.java
  33. 50
      designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterRefreshTooltipContentPane.java
  34. 22
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureRefreshTooltipContentPane.java
  35. 61
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureRichTextFieldListPane.java
  36. 72
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java
  37. 28
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRefreshTooltipContentPane.java

135
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxRichTextDetailedFieldListPane.java

@ -0,0 +1,135 @@
package com.fr.van.chart.box;
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.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMinFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataNumberFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataOutlierFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataQ1Format;
import com.fr.plugin.chart.base.format.AttrTooltipDataQ3Format;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent;
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;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartBoxRichTextDetailedFieldListPane extends VanChartFieldListPane {
private VanChartFieldButton richTextNumber;
private VanChartFieldButton richTextMax;
private VanChartFieldButton richTextQ3;
private VanChartFieldButton richTextMedian;
private VanChartFieldButton richTextQ1;
private VanChartFieldButton richTextMin;
private VanChartFieldButton richTextOutlier;
public VanChartBoxRichTextDetailedFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
public VanChartFieldButton getRichTextMax() {
return richTextMax;
}
public VanChartFieldButton getRichTextQ3() {
return richTextQ3;
}
public VanChartFieldButton getRichTextMedian() {
return richTextMedian;
}
public VanChartFieldButton getRichTextQ1() {
return richTextQ1;
}
public VanChartFieldButton getRichTextMin() {
return richTextMin;
}
protected void initDefaultFieldButton() {
VanChartFieldListener listener = getFieldListener();
setCategoryNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"), new AttrTooltipCategoryFormat(), listener));
setSeriesNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"), new AttrTooltipSeriesFormat(), listener));
richTextNumber = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Number"), new AttrTooltipDataNumberFormat(), listener);
richTextMax = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Max_Value"), new AttrTooltipDataMaxFormat(), listener);
richTextQ3 = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Q3"), new AttrTooltipDataQ3Format(), listener);
richTextMedian = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Median"), new AttrTooltipDataMedianFormat(), listener);
richTextQ1 = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Data_Q1"), new AttrTooltipDataQ1Format(), listener);
richTextMin = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Min_Value"), new AttrTooltipDataMinFormat(), listener);
richTextOutlier = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Outlier_Value"), new AttrTooltipDataOutlierFormat(), listener);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getCategoryNameButton());
fieldPane.add(getSeriesNameButton());
fieldPane.add(richTextNumber);
fieldPane.add(richTextMax);
fieldPane.add(richTextQ3);
fieldPane.add(richTextMedian);
fieldPane.add(richTextQ1);
fieldPane.add(richTextMin);
fieldPane.add(richTextOutlier);
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getCategoryNameButton());
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(richTextNumber);
fieldButtonList.add(richTextMax);
fieldButtonList.add(richTextQ3);
fieldButtonList.add(richTextMedian);
fieldButtonList.add(richTextQ1);
fieldButtonList.add(richTextMin);
fieldButtonList.add(richTextOutlier);
return fieldButtonList;
}
public void populateDefaultField(AttrTooltipContent tooltipContent) {
super.populateDefaultField(tooltipContent);
if (tooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent box = (AttrBoxTooltipContent) tooltipContent;
populateButtonFormat(richTextNumber, box.getRichTextNumber());
populateButtonFormat(richTextMax, box.getRichTextMax());
populateButtonFormat(richTextQ3, box.getRichTextQ3());
populateButtonFormat(richTextMedian, box.getRichTextMedian());
populateButtonFormat(richTextQ1, box.getRichTextQ1());
populateButtonFormat(richTextMin, box.getRichTextMin());
populateButtonFormat(richTextOutlier, box.getRichTextOutlier());
}
}
public void updateDefaultField(AttrTooltipContent tooltipContent) {
super.updateDefaultField(tooltipContent);
if (tooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent box = (AttrBoxTooltipContent) tooltipContent;
updateButtonFormat(richTextNumber, box.getRichTextNumber());
updateButtonFormat(richTextMax, box.getRichTextMax());
updateButtonFormat(richTextQ3, box.getRichTextQ3());
updateButtonFormat(richTextMedian, box.getRichTextMedian());
updateButtonFormat(richTextQ1, box.getRichTextQ1());
updateButtonFormat(richTextMin, box.getRichTextMin());
updateButtonFormat(richTextOutlier, box.getRichTextOutlier());
}
}
}

41
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxRichTextResultFieldListPane.java

@ -0,0 +1,41 @@
package com.fr.van.chart.box;
import com.fr.design.ui.ModernUIPane;
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.VanChartRichEditorModel;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartBoxRichTextResultFieldListPane extends VanChartBoxRichTextDetailedFieldListPane {
public VanChartBoxRichTextResultFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getCategoryNameButton());
fieldPane.add(getSeriesNameButton());
fieldPane.add(getRichTextMax());
fieldPane.add(getRichTextQ3());
fieldPane.add(getRichTextMedian());
fieldPane.add(getRichTextQ1());
fieldPane.add(getRichTextMin());
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getCategoryNameButton());
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(getRichTextMax());
fieldButtonList.add(getRichTextQ3());
fieldButtonList.add(getRichTextMedian());
fieldButtonList.add(getRichTextQ1());
fieldButtonList.add(getRichTextMin());
return fieldButtonList;
}
}

294
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java

@ -4,8 +4,8 @@ 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.ui.ModernUIPane;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMaxFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDataMedianFormat;
@ -20,17 +20,17 @@ import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
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.SeriesNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
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;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Map;
public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
@ -44,20 +44,9 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
private VanChartFormatPaneWithCheckBox min;
private VanChartFormatPaneWithCheckBox outlier;
private VanChartFormatPaneWithoutCheckBox richTextNumber;
private VanChartFormatPaneWithoutCheckBox richTextMax;
private VanChartFormatPaneWithoutCheckBox richTextQ3;
private VanChartFormatPaneWithoutCheckBox richTextMedian;
private VanChartFormatPaneWithoutCheckBox richTextQ1;
private VanChartFormatPaneWithoutCheckBox richTextMin;
private VanChartFormatPaneWithoutCheckBox richTextOutlier;
private JPanel dataNumberPane;
private JPanel dataOutlierPane;
private JPanel richTextNumberPane;
private JPanel richTextOutlierPane;
public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) {
super(parent, showOnPane);
checkFormatVisible(isDetailed);
@ -104,47 +93,6 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
};
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
richTextNumber = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Number");
}
};
richTextMax = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Max_Value");
}
};
richTextQ3 = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Q3");
}
};
richTextMedian = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Median");
}
};
richTextQ1 = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Q1");
}
};
richTextMin = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Min_Value");
}
};
richTextOutlier = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Outlier_Value");
}
};
}
protected JPanel createCommonFormatPanel() {
JPanel commonPanel = new JPanel(new BorderLayout());
@ -155,27 +103,73 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
return commonPanel;
}
protected JPanel createRichFormatPanel() {
JPanel richFormatPanel = new JPanel(new BorderLayout());
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
richFormatPanel.add(createRichTextCateAndSeriesPane(), BorderLayout.NORTH);
richFormatPanel.add(createRichTextDataNumberPane(), BorderLayout.CENTER);
richFormatPanel.add(createRichTextDataDetailPane(), BorderLayout.SOUTH);
return new VanChartRichTextPane(richEditorPane) {
return richFormatPanel;
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
if (detailed) {
return new VanChartBoxRichTextDetailedFieldListPane(fieldAttrPane, richEditor);
}
return new VanChartBoxRichTextResultFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
if (detailed) {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"),
Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Data_Number"),
Toolkit.i18nText("Fine-Design_Chart_Max_Value"),
Toolkit.i18nText("Fine-Design_Chart_Data_Q3"),
Toolkit.i18nText("Fine-Design_Chart_Data_Median"),
Toolkit.i18nText("Fine-Design_Chart_Data_Q1"),
Toolkit.i18nText("Fine-Design_Chart_Min_Value"),
Toolkit.i18nText("Fine-Design_Chart_Outlier_Value")
};
}
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"),
Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Max_Value"),
Toolkit.i18nText("Fine-Design_Chart_Data_Q3"),
Toolkit.i18nText("Fine-Design_Chart_Data_Median"),
Toolkit.i18nText("Fine-Design_Chart_Data_Q1"),
Toolkit.i18nText("Fine-Design_Chart_Min_Value")
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{richTextNumber, null},
new Component[]{richTextMax, null},
new Component[]{richTextQ3, null},
new Component[]{richTextMedian, null},
new Component[]{richTextQ1, null},
new Component[]{richTextMin, null},
new Component[]{richTextOutlier, null}
protected AttrTooltipFormat[] getRichTextFieldFormats() {
if (detailed) {
return new AttrTooltipFormat[]{
new AttrTooltipCategoryFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipDataNumberFormat(),
new AttrTooltipDataMaxFormat(),
new AttrTooltipDataQ3Format(),
new AttrTooltipDataMedianFormat(),
new AttrTooltipDataQ1Format(),
new AttrTooltipDataMinFormat(),
new AttrTooltipDataOutlierFormat()
};
}
return new AttrTooltipFormat[]{
new AttrTooltipCategoryFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipDataMaxFormat(),
new AttrTooltipDataQ3Format(),
new AttrTooltipDataMedianFormat(),
new AttrTooltipDataQ1Format(),
new AttrTooltipDataMinFormat()
};
}
@ -249,72 +243,6 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
return detailPane;
}
private JPanel createRichTextCateAndSeriesPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
Component[][] cateAndSeries = new Component[][]{
new Component[]{null, null},
new Component[]{null, getRichTextCategoryNameFormatPane()},
new Component[]{null, getRichTextSeriesNameFormatPane()}
};
return TableLayoutHelper.createTableLayoutPane(cateAndSeries, rowSize, columnSize);
}
private JPanel createRichTextDataNumberPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p};
Component[][] dataNumber = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextNumber},
};
richTextNumberPane = TableLayoutHelper.createTableLayoutPane(dataNumber, rowSize, columnSize);
return richTextNumberPane;
}
private JPanel createRichTextDataDetailPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
JPanel detailPane = new JPanel(new BorderLayout());
Component[][] richTextDetail = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextMax},
new Component[]{new UILabel(getLabelContentTitle()), richTextQ3},
new Component[]{null, richTextMedian},
new Component[]{null, richTextQ1},
new Component[]{null, richTextMin}
};
Component[][] dataOutlier = new Component[][]{
new Component[]{null, null},
new Component[]{null, richTextOutlier},
};
richTextOutlierPane = TableLayoutHelper.createTableLayoutPane(dataOutlier, new double[]{p, p}, columnSize);
detailPane.add(TableLayoutHelper.createTableLayoutPane(richTextDetail, new double[]{p, p, p, p, p, p}, columnSize), BorderLayout.NORTH);
detailPane.add(richTextOutlierPane, BorderLayout.CENTER);
return detailPane;
}
public boolean isDirty() {
return getCategoryNameFormatPane().isDirty()
|| getSeriesNameFormatPane().isDirty()
@ -362,63 +290,21 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
}
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
setRichTextAttr(new AttrTooltipRichText());
Map<String, String> params = getRichTextAttr().getParams();
AttrTooltipCategoryFormat categoryFormat = attrTooltipContent.getRichTextCategoryFormat();
getRichTextCategoryNameFormatPane().populate(categoryFormat);
getRichTextCategoryNameFormatPane().updateFormatParams(params, categoryFormat.getJs());
AttrTooltipSeriesFormat seriesFormat = attrTooltipContent.getRichTextSeriesFormat();
getRichTextSeriesNameFormatPane().populate(seriesFormat);
getRichTextSeriesNameFormatPane().updateFormatParams(params, seriesFormat.getJs());
if (attrTooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent;
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = getFormatPaneGroup();
AttrTooltipFormat[] formatGroup = getFormatGroup(boxTooltipContent);
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
}
}
private VanChartFormatPaneWithoutCheckBox[] getFormatPaneGroup() {
if (detailed) {
return new VanChartFormatPaneWithoutCheckBox[]{
richTextNumber, richTextMax, richTextQ3, richTextMedian,
richTextQ1, richTextMin, richTextOutlier
};
}
return new VanChartFormatPaneWithoutCheckBox[]{
richTextMax, richTextQ3, richTextMedian, richTextQ1, richTextMin
};
}
protected void updateTooltipFormat(AttrTooltipContent target, AttrTooltipContent source) {
super.updateTooltipFormat(target, source);
private AttrTooltipFormat[] getFormatGroup(AttrBoxTooltipContent boxTooltipContent) {
AttrTooltipDataNumberFormat richTextNumber = boxTooltipContent.getRichTextNumber();
AttrTooltipDataMaxFormat richTextMaxFormat = boxTooltipContent.getRichTextMax();
AttrTooltipDataQ3Format richTextQ3Format = boxTooltipContent.getRichTextQ3();
AttrTooltipDataMedianFormat richTextMedianFormat = boxTooltipContent.getRichTextMedian();
AttrTooltipDataQ1Format richTextQ1Format = boxTooltipContent.getRichTextQ1();
AttrTooltipDataMinFormat richTextMinFormat = boxTooltipContent.getRichTextMin();
AttrTooltipDataOutlierFormat richTextOutlierFormat = boxTooltipContent.getRichTextOutlier();
if (target instanceof AttrBoxTooltipContent && source instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent targetGantt = (AttrBoxTooltipContent) target;
AttrBoxTooltipContent sourceGantt = (AttrBoxTooltipContent) source;
if (detailed) {
return new AttrTooltipFormat[]{
richTextNumber, richTextMaxFormat, richTextQ3Format, richTextMedianFormat,
richTextQ1Format, richTextMinFormat, richTextOutlierFormat
};
targetGantt.setRichTextNumber(sourceGantt.getRichTextNumber());
targetGantt.setRichTextMax(sourceGantt.getRichTextMax());
targetGantt.setRichTextQ3(sourceGantt.getRichTextQ3());
targetGantt.setRichTextMedian(sourceGantt.getRichTextMedian());
targetGantt.setRichTextQ1(sourceGantt.getRichTextQ1());
targetGantt.setRichTextMin(sourceGantt.getRichTextMin());
targetGantt.setRichTextOutlier(sourceGantt.getRichTextOutlier());
}
return new AttrTooltipFormat[]{
richTextMaxFormat, richTextQ3Format, richTextMedianFormat, richTextQ1Format, richTextMinFormat
};
}
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) {
@ -440,30 +326,10 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
}
}
protected void updateRichEditor(AttrTooltipContent attrTooltipContent) {
getRichTextCategoryNameFormatPane().update(attrTooltipContent.getRichTextCategoryFormat());
getRichTextSeriesNameFormatPane().update(attrTooltipContent.getRichTextSeriesFormat());
if (attrTooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent;
richTextNumber.update(boxTooltipContent.getRichTextNumber());
richTextMax.update(boxTooltipContent.getRichTextMax());
richTextQ3.update(boxTooltipContent.getRichTextQ3());
richTextMedian.update(boxTooltipContent.getRichTextMedian());
richTextQ1.update(boxTooltipContent.getRichTextQ1());
richTextMin.update(boxTooltipContent.getRichTextMin());
richTextOutlier.update(boxTooltipContent.getRichTextOutlier());
}
}
public void checkFormatVisible(boolean detailed) {
this.detailed = detailed;
dataNumberPane.setVisible(detailed);
dataOutlierPane.setVisible(detailed);
richTextNumberPane.setVisible(detailed);
richTextOutlierPane.setVisible(detailed);
}
}

15
designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java

@ -19,6 +19,7 @@ import com.fr.plugin.chart.heatmap.VanChartHeatMapPlot;
import com.fr.plugin.chart.line.VanChartLinePlot;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.radar.VanChartRadarPlot;
import com.fr.plugin.chart.scatter.VanChartScatterPlot;
import com.fr.plugin.chart.structure.VanChartStructurePlot;
import com.fr.plugin.chart.treemap.VanChartTreeMapPlot;
@ -94,6 +95,20 @@ public class PlotFactory {
return autoAdjustLabelPlots.contains(plot.getClass());
}
private static Set<Class<? extends Plot>> supportAddTableFieldPlots = new HashSet<>();
static {
supportAddTableFieldPlots.add(PiePlot4VanChart.class);
supportAddTableFieldPlots.add(VanChartColumnPlot.class);
supportAddTableFieldPlots.add(VanChartLinePlot.class);
supportAddTableFieldPlots.add(VanChartAreaPlot.class);
supportAddTableFieldPlots.add(VanChartRadarPlot.class);
}
public static boolean plotSupportAddTableField(Plot plot) {
return supportAddTableFieldPlots.contains(plot.getClass());
}
private static Set<Class<? extends Plot>> borderAndBackgroundLabelPlots = new HashSet<>();
static {

22
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRefreshTooltipContentPane.java

@ -1,9 +1,7 @@
package com.fr.van.chart.designer.component;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -34,14 +32,6 @@ public class VanChartRefreshTooltipContentPane extends VanChartTooltipContentPan
setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected Component[][] getPaneComponents(){
return new Component[][]{
new Component[]{getCategoryNameFormatPane(), null},
@ -52,16 +42,4 @@ public class VanChartRefreshTooltipContentPane extends VanChartTooltipContentPan
new Component[]{getChangedPercentFormatPane(), null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

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

@ -24,17 +24,11 @@ import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
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.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
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.format.VanChartFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.richText.VanChartRichEditorModel;
import com.fr.van.chart.designer.component.richText.VanChartRichEditorPane;
@ -53,7 +47,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -84,13 +78,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private ChangedValueFormatPaneWithCheckBox changedValueFormatPane;
private ChangedPercentFormatPaneWithCheckBox changedPercentFormatPane;
private CategoryNameFormatPaneWithoutCheckBox richTextCategoryNameFormatPane;
private SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane;
private ValueFormatPaneWithoutCheckBox richTextValueFormatPane;
private PercentFormatPaneWithoutCheckBox richTextPercentFormatPane;
private ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane;
private ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane;
private JPanel centerPanel;
private JPanel commonPanel;
private JPanel editorPanel;
@ -118,7 +105,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
this.richTextTooltipContent = createAttrTooltip();
initFormatPane(parent, showOnPane);
initRichTextFormatPane(parent, showOnPane);
this.setLayout(new BorderLayout());
this.add(createLabelContentPane(), BorderLayout.CENTER);
@ -184,54 +170,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
this.changedPercentFormatPane = changedPercentFormatPane;
}
public CategoryNameFormatPaneWithoutCheckBox getRichTextCategoryNameFormatPane() {
return richTextCategoryNameFormatPane;
}
public void setRichTextCategoryNameFormatPane(CategoryNameFormatPaneWithoutCheckBox richTextCategoryNameFormatPane) {
this.richTextCategoryNameFormatPane = richTextCategoryNameFormatPane;
}
public SeriesNameFormatPaneWithoutCheckBox getRichTextSeriesNameFormatPane() {
return richTextSeriesNameFormatPane;
}
public void setRichTextSeriesNameFormatPane(SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane) {
this.richTextSeriesNameFormatPane = richTextSeriesNameFormatPane;
}
public ValueFormatPaneWithoutCheckBox getRichTextValueFormatPane() {
return richTextValueFormatPane;
}
public void setRichTextValueFormatPane(ValueFormatPaneWithoutCheckBox richTextValueFormatPane) {
this.richTextValueFormatPane = richTextValueFormatPane;
}
public PercentFormatPaneWithoutCheckBox getRichTextPercentFormatPane() {
return richTextPercentFormatPane;
}
public void setRichTextPercentFormatPane(PercentFormatPaneWithoutCheckBox richTextPercentFormatPane) {
this.richTextPercentFormatPane = richTextPercentFormatPane;
}
public ChangedValueFormatPaneWithoutCheckBox getRichTextChangedValueFormatPane() {
return richTextChangedValueFormatPane;
}
public void setRichTextChangedValueFormatPane(ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane) {
this.richTextChangedValueFormatPane = richTextChangedValueFormatPane;
}
public ChangedPercentFormatPaneWithoutCheckBox getRichTextChangedPercentFormatPane() {
return richTextChangedPercentFormatPane;
}
public void setRichTextChangedPercentFormatPane(ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane) {
this.richTextChangedPercentFormatPane = richTextChangedPercentFormatPane;
}
public UIButtonGroup<Integer> getContent() {
return content;
}
@ -512,7 +450,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
String[] fieldNames = getRichTextFieldNames();
AttrTooltipFormat[] fieldFormats = getRichTextFieldFormats();
Map<String, String> params = new HashMap<>();
Map<String, String> params = new LinkedHashMap<>();
for (int i = 0, len = fieldNames.length; i < len; i++) {
params.put(fieldNames[i], fieldFormats[i].getJs());
@ -522,7 +460,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
if (tableFieldNames != null) {
for (String fieldName : tableFieldNames) {
params.put(fieldName, fieldName);
params.put(fieldName, "${" + fieldName + "_" + fieldName.hashCode() + "}");
}
}
@ -558,13 +496,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
percentFormatPane = new PercentFormatPaneWithCheckBox(parent, showOnPane);
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
richTextCategoryNameFormatPane = new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane);
richTextSeriesNameFormatPane = new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane);
richTextValueFormatPane = new ValueFormatPaneWithoutCheckBox(parent, showOnPane);
richTextPercentFormatPane = new PercentFormatPaneWithoutCheckBox(parent, showOnPane);
}
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel);
}
@ -582,15 +513,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{richTextCategoryNameFormatPane, null},
new Component[]{richTextSeriesNameFormatPane, null},
new Component[]{richTextValueFormatPane, null},
new Component[]{richTextPercentFormatPane, null},
};
}
private void initContentListener() {
content.addActionListener(new ActionListener() {
@Override
@ -769,21 +691,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
checkRichEditorState(attrTooltipContent);
}
protected void populateRichTextFormat(VanChartFormatPaneWithCheckBox[] formatPaneGroup, AttrTooltipFormat[] formatGroup) {
for (int i = 0, len = formatPaneGroup.length; i < len; i++) {
VanChartFormatPaneWithCheckBox formatPane = formatPaneGroup[i];
AttrTooltipFormat format = formatGroup[i];
if (formatPane != null && format != null) {
formatPane.populate(format);
// 填充面板时,更新富文本编辑器参数
AttrTooltipRichText richText = this.richTextTooltipContent.getRichTextAttr();
formatPane.updateFormatParams(richText.getParams(), format.getJs());
}
}
}
protected void populateRichText(AttrTooltipRichText tooltipRichText) {
if (tooltipRichText != null) {
updateLocalRichText(tooltipRichText.getContent(), tooltipRichText.isAuto());
@ -806,7 +713,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
updateLabelType(attrTooltipContent);
updateFormatPane(attrTooltipContent);
if (supportRichEditor()) {
// updateRichEditor(attrTooltipContent);
updateTooltipFormat(attrTooltipContent, this.richTextTooltipContent);
updateTooltipRichText(attrTooltipContent);
}
@ -863,27 +769,6 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
}
}
protected void updateRichEditor(AttrTooltipContent attrTooltipContent) {
if (richTextCategoryNameFormatPane != null) {
richTextCategoryNameFormatPane.update(attrTooltipContent.getRichTextCategoryFormat());
}
if (richTextSeriesNameFormatPane != null) {
richTextSeriesNameFormatPane.update(attrTooltipContent.getRichTextSeriesFormat());
}
if (richTextValueFormatPane != null) {
richTextValueFormatPane.update(attrTooltipContent.getRichTextValueFormat());
}
if (richTextPercentFormatPane != null) {
richTextPercentFormatPane.update(attrTooltipContent.getRichTextPercentFormat());
}
if (richTextChangedValueFormatPane != null) {
richTextChangedValueFormatPane.update(attrTooltipContent.getRichTextChangedValueFormat());
}
if (richTextChangedPercentFormatPane != null) {
richTextChangedPercentFormatPane.update(attrTooltipContent.getRichTextChangedPercentFormat());
}
}
protected void updateTooltipFormat(AttrTooltipContent target, AttrTooltipContent source) {
if (target == null || source == null) {
return;

52
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldAttrPane.java

@ -2,11 +2,13 @@ package com.fr.van.chart.designer.component.richText;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.style.FormatPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.plugin.chart.base.format.IntervalTimeFormat;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.format.FormatPaneWithOutFont;
@ -21,15 +23,18 @@ import java.text.Format;
public class VanChartFieldAttrPane extends JPanel {
private FormatPane fieldFormatPane;
private CalculateComboBox fieldDataFunction;
private UIComboBox intervalTimeBox;
private CalculateComboBox dataFunctionBox;
private JPanel formatPane;
private JPanel intervalTimePane;
private JPanel fieldFunctionPane;
public VanChartFieldAttrPane() {
initComponents();
this.setLayout(new BorderLayout());
this.add(fieldFormatPane, BorderLayout.NORTH);
this.add(formatPane, BorderLayout.NORTH);
this.add(fieldFunctionPane, BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));
}
@ -44,28 +49,43 @@ public class VanChartFieldAttrPane extends JPanel {
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p, p}, new double[]{d, e});
}
};
intervalTimeBox = new UIComboBox(IntervalTimeFormat.getFormats());
dataFunctionBox = new CalculateComboBox();
fieldDataFunction = new CalculateComboBox();
Component[][] components = new Component[][]{
Component[][] intervalTimeComponents = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Format"), SwingConstants.LEFT), intervalTimeBox}
};
Component[][] dataFunctionComponents = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method"), SwingConstants.LEFT), fieldDataFunction}
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method"), SwingConstants.LEFT), dataFunctionBox}
};
fieldFunctionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p, p}, new double[]{d, e});
}
intervalTimePane = TableLayout4VanChartHelper.createGapTableLayoutPane(intervalTimeComponents, new double[]{p, p}, new double[]{d, e});
public void registerFunctionListener(ActionListener listener) {
fieldDataFunction.addActionListener(listener);
formatPane = new JPanel(new BorderLayout());
formatPane.add(fieldFormatPane, BorderLayout.NORTH);
formatPane.add(intervalTimePane, BorderLayout.CENTER);
fieldFunctionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(dataFunctionComponents, new double[]{p, p}, new double[]{d, e});
}
public void registerChangeListener(UIObserverListener listener) {
public void registerFormatListener(UIObserverListener listener) {
fieldFormatPane.registerChangeListener(listener);
intervalTimeBox.registerChangeListener(listener);
}
public void populate(Format format, AbstractDataFunction dataFunction, boolean showDataFunction) {
public void registerFunctionListener(ActionListener listener) {
dataFunctionBox.addActionListener(listener);
}
public void populate(Format format, IntervalTimeFormat intervalTime, AbstractDataFunction dataFunction, boolean showDataFunction, boolean showIntervalTime) {
fieldFormatPane.populateBean(format);
fieldDataFunction.populateBean(dataFunction);
intervalTimeBox.setSelectedItem(intervalTime);
dataFunctionBox.populateBean(dataFunction);
fieldFormatPane.setVisible(!showIntervalTime);
intervalTimePane.setVisible(showIntervalTime);
fieldFunctionPane.setVisible(showDataFunction);
}
@ -73,7 +93,11 @@ public class VanChartFieldAttrPane extends JPanel {
return fieldFormatPane.update();
}
public IntervalTimeFormat updateIntervalTime() {
return (IntervalTimeFormat) intervalTimeBox.getSelectedItem();
}
public AbstractDataFunction updateDataFunction() {
return fieldDataFunction.updateBean();
return dataFunctionBox.updateBean();
}
}

31
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldButton.java

@ -7,7 +7,9 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.IntervalTimeFormat;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -33,16 +35,27 @@ public class VanChartFieldButton extends JPanel {
private final AttrTooltipFormat tooltipFormat;
private final boolean showDataFunction;
private final boolean showIntervalTime;
private UIToggleButton fieldButton;
private UIButton addButton;
private DataFunction dataFunction = new NoneFunction();
public VanChartFieldButton(String fieldName, AttrTooltipFormat format, VanChartFieldListener listener) {
this(fieldName, format, false, false, listener);
}
public VanChartFieldButton(String fieldName, AttrTooltipFormat format, boolean showDataFunction, VanChartFieldListener listener) {
this(fieldName, format, showDataFunction, false, listener);
}
public VanChartFieldButton(String fieldName, AttrTooltipFormat format, boolean showDataFunction, boolean showIntervalTime, VanChartFieldListener listener) {
this.fieldName = fieldName;
this.tooltipFormat = format;
this.showDataFunction = showDataFunction;
this.showIntervalTime = showIntervalTime;
this.fieldId = format == null ? StringUtils.EMPTY : format.getFormatJSONKey();
@ -72,6 +85,20 @@ public class VanChartFieldButton extends JPanel {
this.tooltipFormat.setFormat(format);
}
public IntervalTimeFormat getIntervalTimeFormat() {
if (tooltipFormat instanceof AttrTooltipDurationFormat) {
return ((AttrTooltipDurationFormat) tooltipFormat).getIntervalTimeFormat();
}
return IntervalTimeFormat.DAY;
}
public void setIntervalTimeFormat(IntervalTimeFormat intervalTime) {
if (tooltipFormat instanceof AttrTooltipDurationFormat) {
((AttrTooltipDurationFormat) tooltipFormat).setIntervalTimeFormat(intervalTime);
}
}
public DataFunction getDataFunction() {
return dataFunction;
}
@ -84,6 +111,10 @@ public class VanChartFieldButton extends JPanel {
return showDataFunction;
}
public boolean isShowIntervalTime() {
return showIntervalTime;
}
public String getFormatJs() {
return this.tooltipFormat.getJs();
}

24
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartFieldListPane.java

@ -11,11 +11,13 @@ import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.TableFieldCollection;
import com.fr.plugin.chart.base.TableFieldDefinition;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFieldFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
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.base.format.IntervalTimeFormat;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
@ -52,7 +54,7 @@ public class VanChartFieldListPane extends JPanel {
List<String> richEditorFieldNames = VanChartRichEditorPane.getFieldNames();
this.tableFieldNameList = richEditorFieldNames == null ? new ArrayList<>() : richEditorFieldNames;
this.tableFieldNameList = (!supportAddField() || richEditorFieldNames == null) ? new ArrayList<>() : richEditorFieldNames;
this.fieldAttrPane = fieldAttrPane;
this.richEditorPane = richEditorPane;
@ -131,6 +133,10 @@ public class VanChartFieldListPane extends JPanel {
new AttrTooltipPercentFormat(), false, fieldListener);
}
protected boolean supportAddField() {
return true;
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(categoryNameButton);
fieldPane.add(seriesNameButton);
@ -242,10 +248,13 @@ public class VanChartFieldListPane extends JPanel {
}
Format format = fieldButton.getFormat();
IntervalTimeFormat intervalTime = fieldButton.getIntervalTimeFormat();
AbstractDataFunction dataFunction = (AbstractDataFunction) fieldButton.getDataFunction();
boolean showDataFunction = fieldButton.isShowDataFunction();
boolean showIntervalTime = fieldButton.isShowIntervalTime();
fieldAttrPane.populate(format, dataFunction, showDataFunction);
fieldAttrPane.populate(format, intervalTime, dataFunction, showDataFunction, showIntervalTime);
}
public void updateFieldFormatPane() {
@ -256,6 +265,7 @@ public class VanChartFieldListPane extends JPanel {
}
fieldButton.setFormat(fieldAttrPane.updateFormat());
fieldButton.setIntervalTimeFormat(fieldAttrPane.updateIntervalTime());
fieldButton.setDataFunction(fieldAttrPane.updateDataFunction());
if (tableFieldNameList.contains(fieldName)) {
@ -276,7 +286,7 @@ public class VanChartFieldListPane extends JPanel {
}
});
fieldAttrPane.registerChangeListener(new UIObserverListener() {
fieldAttrPane.registerFormatListener(new UIObserverListener() {
public void doChange() {
fieldListener.updateFieldFormatPane();
}
@ -317,6 +327,10 @@ public class VanChartFieldListPane extends JPanel {
button.setEnable(format.isEnable());
button.setFormat(format.getFormat());
if (button.isShowIntervalTime() && format instanceof AttrTooltipDurationFormat) {
button.setIntervalTimeFormat(((AttrTooltipDurationFormat) format).getIntervalTimeFormat());
}
}
public void populateTableField(AttrTooltipContent tooltipContent) {
@ -378,5 +392,9 @@ public class VanChartFieldListPane extends JPanel {
format.setEnable(button.isEnable());
format.setFormat(button.getFormat());
if (button.isShowIntervalTime() && format instanceof AttrTooltipDurationFormat) {
((AttrTooltipDurationFormat) format).setIntervalTimeFormat(button.getIntervalTimeFormat());
}
}
}

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichEditorPane.java

@ -3,6 +3,7 @@ package com.fr.van.chart.designer.component.richText;
import com.fr.base.TableData;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartdata.MoreNameCDDefinition;
import com.fr.chart.chartdata.OneValueCDDefinition;
import com.fr.data.TableDataSource;
@ -17,6 +18,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.PlotFactory;
import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.JSValue;
import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter;
@ -51,6 +53,12 @@ public class VanChartRichEditorPane {
return;
}
Plot plot = chart.getPlot();
if (plot == null || !PlotFactory.plotSupportAddTableField(plot)) {
return;
}
TopDefinitionProvider definition = chart.getFilterDefinition();
if (definition == null) {

18
designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/RefreshTooltipContentPaneWithOutSeries.java

@ -29,14 +29,6 @@ public class RefreshTooltipContentPaneWithOutSeries extends TooltipContentPaneWi
setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected double[] getRowSize(double p){
return new double[]{p,p,p,p,p};
}
@ -50,14 +42,4 @@ public class RefreshTooltipContentPaneWithOutSeries extends TooltipContentPaneWi
new Component[]{getChangedPercentFormatPane(),null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

53
designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java

@ -1,10 +1,17 @@
package com.fr.van.chart.designer.component.tooltip;
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.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
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;
@ -33,31 +40,33 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartFieldListPaneWithOutSeries(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextCategoryNameFormatPane(),
getRichTextValueFormatPane(),
getRichTextPercentFormatPane()
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value"),
Toolkit.i18nText("Fine-Design_Chart_Use_Percent")
};
}
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
attrTooltipContent.getRichTextCategoryFormat(),
attrTooltipContent.getRichTextValueFormat(),
attrTooltipContent.getRichTextPercentFormat()
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipCategoryFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
}
}

34
designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/VanChartFieldListPaneWithOutSeries.java

@ -0,0 +1,34 @@
package com.fr.van.chart.designer.component.tooltip;
import com.fr.design.ui.ModernUIPane;
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.VanChartRichEditorModel;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartFieldListPaneWithOutSeries extends VanChartFieldListPane {
public VanChartFieldListPaneWithOutSeries(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getCategoryNameButton());
fieldPane.add(getValueButton());
fieldPane.add(getPercentButton());
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getCategoryNameButton());
fieldButtonList.add(getValueButton());
fieldButtonList.add(getPercentButton());
return fieldButtonList;
}
}

65
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelLabelContentPane.java

@ -1,18 +1,21 @@
package com.fr.van.chart.funnel.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.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
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.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane;
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.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.format.VanChartFormatPaneWithoutCheckBox;
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;
@ -38,14 +41,6 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane {
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null}
};
}
@Override
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setCategoryNameFormatPane(new CategoryNameFormatPaneWithCheckBox(parent, showOnPane));
@ -54,32 +49,34 @@ public class VanChartFunnelLabelContentPane extends VanChartLabelContentPane {
setPercentFormatPane(new FunnelPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextSeriesNameFormatPane(),
getRichTextValueFormatPane(),
getRichTextPercentFormatPane()
};
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartFunnelRichTextFieldListPane(fieldAttrPane, richEditor);
}
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
attrTooltipContent.getRichTextSeriesFormat(),
attrTooltipContent.getRichTextValueFormat(),
attrTooltipContent.getRichTextPercentFormat()
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value"),
Toolkit.i18nText("Fine-Design_Chart_Value_Conversion")
};
}
checkRichEditorState(attrTooltipContent);
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipNameFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
protected AttrTooltipContent createAttrTooltip() {

18
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelRefreshTooltipContentPane.java

@ -29,14 +29,6 @@ public class VanChartFunnelRefreshTooltipContentPane extends VanChartFunnelToolt
setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected double[] getRowSize(double p){
return new double[]{p,p,p,p,p};
}
@ -50,14 +42,4 @@ public class VanChartFunnelRefreshTooltipContentPane extends VanChartFunnelToolt
new Component[]{getChangedPercentFormatPane(), null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

62
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelRichTextFieldListPane.java

@ -0,0 +1,62 @@
package com.fr.van.chart.funnel.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;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartFunnelRichTextFieldListPane extends VanChartFieldListPane {
public VanChartFunnelRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener fieldListener = getFieldListener();
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"),
new AttrTooltipCategoryFormat(), false, fieldListener);
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
new AttrTooltipNameFormat(), 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_Value_Conversion"),
new AttrTooltipPercentFormat(), false, fieldListener);
setCategoryNameButton(categoryNameButton);
setSeriesNameButton(seriesNameButton);
setValueButton(valueButton);
setPercentButton(percentButton);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getSeriesNameButton());
fieldPane.add(getValueButton());
fieldPane.add(getPercentButton());
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(getValueButton());
fieldButtonList.add(getPercentButton());
return fieldButtonList;
}
}

65
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java

@ -1,17 +1,20 @@
package com.fr.van.chart.funnel.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.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
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.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.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.format.VanChartFormatPaneWithoutCheckBox;
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;
@ -37,14 +40,6 @@ public class VanChartFunnelTooltipContentPane extends VanChartTooltipContentPane
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null}
};
}
@Override
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setCategoryNameFormatPane(new CategoryNameFormatPaneWithCheckBox(parent, showOnPane));
@ -53,32 +48,34 @@ public class VanChartFunnelTooltipContentPane extends VanChartTooltipContentPane
setPercentFormatPane(new FunnelPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextSeriesNameFormatPane(),
getRichTextValueFormatPane(),
getRichTextPercentFormatPane()
};
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartFunnelRichTextFieldListPane(fieldAttrPane, richEditor);
}
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
attrTooltipContent.getRichTextSeriesFormat(),
attrTooltipContent.getRichTextValueFormat(),
attrTooltipContent.getRichTextPercentFormat()
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value"),
Toolkit.i18nText("Fine-Design_Chart_Value_Conversion")
};
}
checkRichEditorState(attrTooltipContent);
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipNameFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
protected AttrTooltipContent createAttrTooltip() {

107
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttRichTextFieldListPane.java

@ -0,0 +1,107 @@
package com.fr.van.chart.gantt.designer.style.tooltip;
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.AttrTooltipDurationFormat;
import com.fr.plugin.chart.base.format.AttrTooltipEndTimeFormat;
import com.fr.plugin.chart.base.format.AttrTooltipProcessesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipProgressFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipStartTimeFormat;
import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent;
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;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartGanttRichTextFieldListPane extends VanChartFieldListPane {
private VanChartFieldButton richTextProcessesFormatPane;
private VanChartFieldButton richTextStartTimeFormatPane;
private VanChartFieldButton richTextEndTimeFormatPane;
private VanChartFieldButton richTextDurationFormatPane;
private VanChartFieldButton richTextProgressFormatPane;
public VanChartGanttRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener listener = getFieldListener();
richTextProcessesFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Project_Name"),
new AttrTooltipProcessesFormat(), false, listener);
setSeriesNameButton(new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
new AttrTooltipSeriesFormat(), false, listener));
richTextStartTimeFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Start_Time"),
new AttrTooltipStartTimeFormat(), false, listener);
richTextEndTimeFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_End_Time"),
new AttrTooltipEndTimeFormat(), false, listener);
richTextDurationFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Duration_Time"),
new AttrTooltipDurationFormat(), false, true, listener);
richTextProgressFormatPane = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Process"),
new AttrTooltipProgressFormat(), false, listener);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(richTextProcessesFormatPane);
fieldPane.add(getSeriesNameButton());
fieldPane.add(richTextStartTimeFormatPane);
fieldPane.add(richTextEndTimeFormatPane);
fieldPane.add(richTextDurationFormatPane);
fieldPane.add(richTextProgressFormatPane);
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(richTextProcessesFormatPane);
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(richTextStartTimeFormatPane);
fieldButtonList.add(richTextEndTimeFormatPane);
fieldButtonList.add(richTextDurationFormatPane);
fieldButtonList.add(richTextProgressFormatPane);
return fieldButtonList;
}
public void populateDefaultField(AttrTooltipContent tooltipContent) {
super.populateDefaultField(tooltipContent);
if (tooltipContent instanceof AttrGanttTooltipContent) {
AttrGanttTooltipContent gantt = (AttrGanttTooltipContent) tooltipContent;
populateButtonFormat(richTextProcessesFormatPane, gantt.getRichTextProcessesFormat());
populateButtonFormat(richTextStartTimeFormatPane, gantt.getRichTextStartTimeFormat());
populateButtonFormat(richTextEndTimeFormatPane, gantt.getRichTextEndTimeFormat());
populateButtonFormat(richTextDurationFormatPane, gantt.getRichTextDurationFormat());
populateButtonFormat(richTextProgressFormatPane, gantt.getRichTextProgressFormat());
}
}
public void updateDefaultField(AttrTooltipContent tooltipContent) {
super.updateDefaultField(tooltipContent);
if (tooltipContent instanceof AttrGanttTooltipContent) {
AttrGanttTooltipContent gantt = (AttrGanttTooltipContent) tooltipContent;
updateButtonFormat(richTextProcessesFormatPane, gantt.getRichTextProcessesFormat());
updateButtonFormat(richTextStartTimeFormatPane, gantt.getRichTextStartTimeFormat());
updateButtonFormat(richTextEndTimeFormatPane, gantt.getRichTextEndTimeFormat());
updateButtonFormat(richTextDurationFormatPane, gantt.getRichTextDurationFormat());
updateButtonFormat(richTextProgressFormatPane, gantt.getRichTextProgressFormat());
}
}
}

131
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/tooltip/VanChartGanttTooltipContentPane.java

@ -1,10 +1,11 @@
package com.fr.van.chart.gantt.designer.style.tooltip;
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.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipDurationFormat;
import com.fr.plugin.chart.base.format.AttrTooltipEndTimeFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipProcessesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipProgressFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
@ -12,14 +13,15 @@ import com.fr.plugin.chart.base.format.AttrTooltipStartTimeFormat;
import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
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.VanChartFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
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;
import java.awt.Component;
import java.util.Map;
/**
* Created by hufan on 2017/1/13.
@ -31,12 +33,6 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
private VanChartFormatComBoxWithCheckBox durationFormatPane;
private VanChartFormatPaneWithCheckBox progressFormatPane;
private VanChartFormatPaneWithoutCheckBox richTextProcessesFormatPane;
private VanChartDateFormatPaneWithoutCheckBox richTextStartTimeFormatPane;
private VanChartDateFormatPaneWithoutCheckBox richTextEndTimeFormatPane;
private VanChartFormatComBoxWithoutCheckBox richTextDurationFormatPane;
private VanChartFormatPaneWithoutCheckBox richTextProgressFormatPane;
public VanChartGanttTooltipContentPane(VanChartStylePane parent, JPanel showOnPane) {
super(parent, showOnPane);
}
@ -70,28 +66,39 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
};
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
richTextProcessesFormatPane = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane){
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Project_Name");
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartGanttRichTextFieldListPane(fieldAttrPane, richEditor);
}
};
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
richTextStartTimeFormatPane = new VanChartDateFormatPaneWithoutCheckBox(parent, showOnPane){
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Start_Time");
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
richTextEndTimeFormatPane = new VanChartDateFormatPaneWithoutCheckBox(parent, showOnPane){
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_End_Time");
}
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Project_Name"),
Toolkit.i18nText("Fine-Design_Chart_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Start_Time"),
Toolkit.i18nText("Fine-Design_Chart_End_Time"),
Toolkit.i18nText("Fine-Design_Chart_Duration_Time"),
Toolkit.i18nText("Fine-Design_Chart_Process")
};
richTextDurationFormatPane = new VanChartFormatComBoxWithoutCheckBox();
richTextProgressFormatPane = new VanChartFormatPaneWithoutCheckBox(parent, showOnPane){
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Process");
}
}
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipProcessesFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipStartTimeFormat(),
new AttrTooltipEndTimeFormat(),
new AttrTooltipDurationFormat(),
new AttrTooltipProgressFormat()
};
}
@ -106,17 +113,6 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{richTextProcessesFormatPane,null},
new Component[]{getRichTextSeriesNameFormatPane(),null},
new Component[]{richTextStartTimeFormatPane,null},
new Component[]{richTextEndTimeFormatPane,null},
new Component[]{richTextDurationFormatPane, null},
new Component[]{richTextProgressFormatPane, null}
};
}
protected double[] getRowSize(double p){
return new double[]{p,p,p,p,p,p};
}
@ -135,43 +131,6 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
}
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
if(attrTooltipContent instanceof AttrGanttTooltipContent){
setRichTextAttr(new AttrTooltipRichText());
AttrGanttTooltipContent ganttTooltipContent = (AttrGanttTooltipContent) attrTooltipContent;
Map<String, String> params = getRichTextAttr().getParams();
AttrTooltipProcessesFormat processesFormat = ganttTooltipContent.getRichTextProcessesFormat();
richTextProcessesFormatPane.populate(processesFormat);
richTextProcessesFormatPane.updateFormatParams(params, processesFormat.getJs());
AttrTooltipSeriesFormat seriesFormat = ganttTooltipContent.getRichTextSeriesFormat();
getRichTextSeriesNameFormatPane().populate(seriesFormat);
getRichTextSeriesNameFormatPane().updateFormatParams(params, seriesFormat.getJs());
AttrTooltipStartTimeFormat startTimeFormat = ganttTooltipContent.getRichTextStartTimeFormat();
richTextStartTimeFormatPane.populate(startTimeFormat);
richTextStartTimeFormatPane.updateFormatParams(params, startTimeFormat.getJs());
AttrTooltipEndTimeFormat endTimeFormat = ganttTooltipContent.getRichTextEndTimeFormat();
richTextEndTimeFormatPane.populate(endTimeFormat);
richTextEndTimeFormatPane.updateFormatParams(params, endTimeFormat.getJs());
AttrTooltipDurationFormat durationFormat = ganttTooltipContent.getRichTextDurationFormat();
richTextDurationFormatPane.populate(durationFormat);
richTextDurationFormatPane.updateFormatParams(params, durationFormat.getJs());
AttrTooltipProgressFormat progressFormat = ganttTooltipContent.getRichTextProgressFormat();
richTextProgressFormatPane.populate(progressFormat);
richTextProgressFormatPane.updateFormatParams(params, progressFormat.getJs());
populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
}
}
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) {
if (attrTooltipContent instanceof AttrGanttTooltipContent){
AttrGanttTooltipContent ganttTooltipContent = (AttrGanttTooltipContent) attrTooltipContent;
@ -184,16 +143,18 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane
}
}
protected void updateRichEditor(AttrTooltipContent attrTooltipContent) {
if(attrTooltipContent instanceof AttrGanttTooltipContent) {
AttrGanttTooltipContent ganttTooltipContent = (AttrGanttTooltipContent) attrTooltipContent;
protected void updateTooltipFormat(AttrTooltipContent target, AttrTooltipContent source) {
super.updateTooltipFormat(target, source);
if (target instanceof AttrGanttTooltipContent && source instanceof AttrGanttTooltipContent) {
AttrGanttTooltipContent targetGantt = (AttrGanttTooltipContent) target;
AttrGanttTooltipContent sourceGantt = (AttrGanttTooltipContent) source;
richTextProcessesFormatPane.update(ganttTooltipContent.getRichTextProcessesFormat());
getRichTextSeriesNameFormatPane().update(ganttTooltipContent.getRichTextSeriesFormat());
richTextStartTimeFormatPane.update(ganttTooltipContent.getRichTextStartTimeFormat());
richTextEndTimeFormatPane.update(ganttTooltipContent.getRichTextEndTimeFormat());
richTextDurationFormatPane.update(ganttTooltipContent.getRichTextDurationFormat());
richTextProgressFormatPane.update(ganttTooltipContent.getRichTextProgressFormat());
targetGantt.setRichTextProcessesFormat(sourceGantt.getRichTextProcessesFormat());
targetGantt.setRichTextStartTimeFormat(sourceGantt.getRichTextStartTimeFormat());
targetGantt.setRichTextEndTimeFormat(sourceGantt.getRichTextEndTimeFormat());
targetGantt.setRichTextDurationFormat(sourceGantt.getRichTextDurationFormat());
targetGantt.setRichTextProgressFormat(sourceGantt.getRichTextProgressFormat());
}
}

20
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.style.label;
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.AttrTooltipAreaNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
@ -14,7 +15,12 @@ import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheck
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox;
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 com.fr.van.chart.map.designer.style.VanChartMapRichTextFieldListPane;
import javax.swing.JPanel;
@ -35,6 +41,20 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane {
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartMapRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Area_Name"),

21
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapRefreshTooltipContentPane.java

@ -3,9 +3,7 @@ package com.fr.van.chart.map.designer.style.tooltip;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -35,14 +33,6 @@ public class VanChartMapRefreshTooltipContentPane extends VanChartMapTooltipCont
setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected Component[][] getPaneComponents(){
return new Component[][]{
new Component[]{getCategoryNameFormatPane(), null},
@ -54,17 +44,6 @@ public class VanChartMapRefreshTooltipContentPane extends VanChartMapTooltipCont
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
@Override
protected AttrTooltipContent createAttrTooltip() {
AttrTooltipContent content = new AttrTooltipContent();

20
designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.map.designer.style.tooltip;
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.AttrTooltipAreaNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
@ -13,7 +14,12 @@ import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheck
import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox;
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 com.fr.van.chart.map.designer.style.VanChartMapRichTextFieldListPane;
import javax.swing.JPanel;
@ -33,6 +39,20 @@ public class VanChartMapTooltipContentPane extends VanChartTooltipContentPane {
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartMapRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Area_Name"),

41
designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapRichTextFieldListPane.java

@ -0,0 +1,41 @@
package com.fr.van.chart.map.line;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.ModernUIPane;
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipStartAndEndNameFormat;
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 VanChartLineMapRichTextFieldListPane extends VanChartFieldListPane {
public VanChartLineMapRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener fieldListener = getFieldListener();
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Start_And_End"),
new AttrTooltipStartAndEndNameFormat(), 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);
}
}

48
designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java

@ -1,15 +1,21 @@
package com.fr.van.chart.map.line;
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.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipStartAndEndNameFormat;
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
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;
@ -30,12 +36,36 @@ public class VanChartLineMapTooltipContentPane extends VanChartTooltipContentPan
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new StartAndEndNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane));
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartLineMapRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Start_And_End"),
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 AttrTooltipStartAndEndNameFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
@Override

47
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java

@ -1,13 +1,21 @@
package com.fr.van.chart.multilayer.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.AttrTooltipFormat;
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.multilayer.style.AttrTooltipMultiLevelNameFormat;
import com.fr.plugin.chart.type.TextAlign;
import com.fr.van.chart.designer.component.VanChartLabelContentPane;
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.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;
@ -28,12 +36,35 @@ public class VanChartMultiPieLabelContentPane extends VanChartLabelContentPane {
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new MultiPieLevelNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new MultiPieSeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane));
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartMultiPieRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Level_Name"),
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value"),
Toolkit.i18nText("Fine-Design_Chart_Use_Percent")
};
}
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipMultiLevelNameFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
protected AttrTooltipContent createAttrTooltip() {

41
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieRichTextFieldListPane.java

@ -0,0 +1,41 @@
package com.fr.van.chart.multilayer.style;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.ModernUIPane;
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.multilayer.style.AttrTooltipMultiLevelNameFormat;
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 VanChartMultiPieRichTextFieldListPane extends VanChartFieldListPane {
public VanChartMultiPieRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener fieldListener = getFieldListener();
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Level_Name"),
new AttrTooltipMultiLevelNameFormat(), false, fieldListener);
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_MultiPie_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);
}
}

47
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java

@ -1,12 +1,20 @@
package com.fr.van.chart.multilayer.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.AttrTooltipFormat;
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.multilayer.style.AttrTooltipMultiLevelNameFormat;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
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.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;
@ -27,12 +35,35 @@ public class VanChartMultiPieTooltipContentPane extends VanChartTooltipContentPa
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new MultiPieLevelNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextSeriesNameFormatPane(new MultiPieSeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane));
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartMultiPieRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Level_Name"),
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value"),
Toolkit.i18nText("Fine-Design_Chart_Use_Percent")
};
}
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipMultiLevelNameFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
@Override

20
designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMutiPieRefreshTooltipContentPane.java

@ -31,14 +31,6 @@ public class VanChartMutiPieRefreshTooltipContentPane extends VanChartMultiPieTo
setChangedPercentFormatPane(new ChangedPercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
setRichTextChangedValueFormatPane(new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextChangedPercentFormatPane(new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane));
}
protected double[] getRowSize(double p){
return new double[]{p,p,p,p,p,p};
}
@ -53,16 +45,4 @@ public class VanChartMutiPieRefreshTooltipContentPane extends VanChartMultiPieTo
new Component[]{getChangedPercentFormatPane(), null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

80
designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieCategoryLabelContentPane.java

@ -1,16 +1,20 @@
package com.fr.van.chart.pie.style;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.ui.ModernUIPane;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipCategoryFormat;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSummaryValueFormat;
import com.fr.plugin.chart.pie.attr.PieCategoryLabelContent;
import com.fr.van.chart.designer.component.VanChartLabelContentPane;
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.SummaryValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SummaryValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
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;
@ -25,8 +29,6 @@ public class VanChartPieCategoryLabelContentPane extends VanChartLabelContentPan
private SummaryValueFormatPaneWithCheckBox summaryValueFormatPane;
private SummaryValueFormatPaneWithoutCheckBox richTextSummaryValueFormatPane;
public VanChartPieCategoryLabelContentPane(VanChartStylePane parent, JPanel showOnPane, boolean inCondition) {
super(parent, showOnPane, inCondition);
}
@ -42,25 +44,39 @@ public class VanChartPieCategoryLabelContentPane extends VanChartLabelContentPan
summaryValueFormatPane = new SummaryValueFormatPaneWithCheckBox(parent, showOnPane);
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextCategoryNameFormatPane(new CategoryNameFormatPaneWithoutCheckBox(parent, showOnPane));
richTextSummaryValueFormatPane = new SummaryValueFormatPaneWithoutCheckBox(parent, showOnPane);
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartPieCategoryRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{getCategoryNameFormatPane(), null},
new Component[]{summaryValueFormatPane, null},
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Category_Use_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Summary_Value")
};
}
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipCategoryFormat(),
new AttrTooltipSummaryValueFormat()
};
}
@Override
protected Component[][] getRichTextComponents() {
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{richTextSummaryValueFormatPane, null},
new Component[]{getCategoryNameFormatPane(), null},
new Component[]{summaryValueFormatPane, null},
};
}
@ -81,23 +97,15 @@ public class VanChartPieCategoryLabelContentPane extends VanChartLabelContentPan
summaryValueFormatPane.populate(pieCategoryLabelContent.getSummaryValueFormat());
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
PieCategoryLabelContent pieCategoryLabelContent = (PieCategoryLabelContent) attrTooltipContent;
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextCategoryNameFormatPane(),
richTextSummaryValueFormatPane
};
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
pieCategoryLabelContent.getRichTextCategoryFormat(),
pieCategoryLabelContent.getRichTextSummaryValueFormat()
};
protected void updateTooltipFormat(AttrTooltipContent target, AttrTooltipContent source) {
super.updateTooltipFormat(target, source);
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(pieCategoryLabelContent.getRichTextAttr());
if (target instanceof PieCategoryLabelContent && source instanceof PieCategoryLabelContent) {
PieCategoryLabelContent targetPieCategory = (PieCategoryLabelContent) target;
PieCategoryLabelContent sourcePieCategory = (PieCategoryLabelContent) source;
checkRichEditorState(pieCategoryLabelContent);
targetPieCategory.setRichTextSummaryValueFormat(sourcePieCategory.getRichTextSummaryValueFormat());
}
}
@Override
@ -107,12 +115,6 @@ public class VanChartPieCategoryLabelContentPane extends VanChartLabelContentPan
summaryValueFormatPane.update(pieCategoryLabelContent.getSummaryValueFormat());
}
protected void updateRichEditor(AttrTooltipContent attrTooltipContent) {
PieCategoryLabelContent pieCategoryLabelContent = (PieCategoryLabelContent) attrTooltipContent;
super.updateRichEditor(pieCategoryLabelContent);
richTextSummaryValueFormatPane.update(pieCategoryLabelContent.getRichTextSummaryValueFormat());
}
@Override
public void setDirty(boolean isDirty) {
getCategoryNameFormatPane().setDirty(isDirty);

70
designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieCategoryRichTextFieldListPane.java

@ -0,0 +1,70 @@
package com.fr.van.chart.pie.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.AttrTooltipSummaryValueFormat;
import com.fr.plugin.chart.pie.attr.PieCategoryLabelContent;
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;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartPieCategoryRichTextFieldListPane extends VanChartFieldListPane {
private VanChartFieldButton summaryValueButton;
public VanChartPieCategoryRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
super.initDefaultFieldButton();
VanChartFieldListener listener = getFieldListener();
summaryValueButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Use_Summary_Value"),
new AttrTooltipSummaryValueFormat(), false, listener);
}
protected boolean supportAddField() {
return false;
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getCategoryNameButton());
fieldPane.add(summaryValueButton);
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getCategoryNameButton());
fieldButtonList.add(summaryValueButton);
return fieldButtonList;
}
public void populateDefaultField(AttrTooltipContent tooltipContent) {
super.populateDefaultField(tooltipContent);
if (tooltipContent instanceof PieCategoryLabelContent) {
PieCategoryLabelContent pieCategory = (PieCategoryLabelContent) tooltipContent;
populateButtonFormat(summaryValueButton, pieCategory.getRichTextSummaryValueFormat());
}
}
public void updateDefaultField(AttrTooltipContent tooltipContent) {
super.updateDefaultField(tooltipContent);
if (tooltipContent instanceof PieCategoryLabelContent) {
PieCategoryLabelContent pieCategory = (PieCategoryLabelContent) tooltipContent;
updateButtonFormat(summaryValueButton, pieCategory.getRichTextSummaryValueFormat());
}
}
}

56
designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieValueLabelContentPane.java

@ -1,12 +1,20 @@
package com.fr.van.chart.pie.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.AttrTooltipFormat;
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.VanChartLabelContentPane;
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;
@ -35,11 +43,34 @@ public class VanChartPieValueLabelContentPane extends VanChartLabelContentPane {
setPercentFormatPane(new PercentFormatPaneWithCheckBox(parent, showOnPane));
}
@Override
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
setRichTextSeriesNameFormatPane(new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextValueFormatPane(new ValueFormatPaneWithoutCheckBox(parent, showOnPane));
setRichTextPercentFormatPane(new PercentFormatPaneWithoutCheckBox(parent, showOnPane));
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartPieValueRichTextFieldListPane(fieldAttrPane, richEditor);
}
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
}
protected String[] getRichTextFieldNames() {
return new String[]{
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 AttrTooltipSeriesFormat(),
new AttrTooltipValueFormat(),
new AttrTooltipPercentFormat()
};
}
@Override
@ -56,15 +87,6 @@ public class VanChartPieValueLabelContentPane extends VanChartLabelContentPane {
};
}
@Override
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null}
};
}
@Override
public void setDirty(boolean isDirty) {
getSeriesNameFormatPane().setDirty(isDirty);

34
designer-chart/src/main/java/com/fr/van/chart/pie/style/VanChartPieValueRichTextFieldListPane.java

@ -0,0 +1,34 @@
package com.fr.van.chart.pie.style;
import com.fr.design.ui.ModernUIPane;
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.VanChartRichEditorModel;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartPieValueRichTextFieldListPane extends VanChartFieldListPane {
public VanChartPieValueRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getSeriesNameButton());
fieldPane.add(getValueButton());
fieldPane.add(getPercentButton());
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(getValueButton());
fieldButtonList.add(getPercentButton());
return fieldButtonList;
}
}

50
designer-chart/src/main/java/com/fr/van/chart/scatter/VanChartScatterRefreshTooltipContentPane.java

@ -1,13 +1,9 @@
package com.fr.van.chart.scatter;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.scatter.attr.ScatterAttrTooltipContent;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -19,7 +15,6 @@ import java.awt.Component;
public class VanChartScatterRefreshTooltipContentPane extends VanChartScatterTooltipContentPane {
private ChangedValueFormatPaneWithCheckBox changedSizeFormatPane;
private ChangedValueFormatPaneWithoutCheckBox richTextChangedSizeFormatPane;
public VanChartScatterRefreshTooltipContentPane(VanChartStylePane parent, JPanel showOnPane) {
super(null, showOnPane);
@ -33,14 +28,6 @@ public class VanChartScatterRefreshTooltipContentPane extends VanChartScatterToo
setChangedPercentFormatPane(changedPercentFormatPane);
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
richTextChangedSizeFormatPane = new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane);
ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane = new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane);
setRichTextChangedPercentFormatPane(richTextChangedPercentFormatPane);
}
protected boolean supportRichEditor() {
return false;
}
@ -60,12 +47,6 @@ public class VanChartScatterRefreshTooltipContentPane extends VanChartScatterToo
};
}
@Override
protected Component[][] getRichTextComponents() {
return null;
}
@Override
protected void populateFormatPane(AttrTooltipContent attrTooltipContent) {
super.populateFormatPane(attrTooltipContent);
@ -77,27 +58,6 @@ public class VanChartScatterRefreshTooltipContentPane extends VanChartScatterToo
}
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
super.populateRichEditor(attrTooltipContent);
if (attrTooltipContent instanceof ScatterAttrTooltipContent) {
ScatterAttrTooltipContent scatterAttrTooltipContent = (ScatterAttrTooltipContent) attrTooltipContent;
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
richTextChangedSizeFormatPane,
getRichTextChangedPercentFormatPane()
};
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
scatterAttrTooltipContent.getRichTextChangeSizeFormat(),
scatterAttrTooltipContent.getRichTextChangedSizePercentFormat()
};
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
}
}
@Override
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) {
super.updateFormatPane(attrTooltipContent);
@ -108,16 +68,6 @@ public class VanChartScatterRefreshTooltipContentPane extends VanChartScatterToo
}
}
protected void updateRichEditor(AttrTooltipContent attrTooltipContent) {
super.updateRichEditor(attrTooltipContent);
if (attrTooltipContent instanceof ScatterAttrTooltipContent) {
ScatterAttrTooltipContent scatterAttrTooltipContent = (ScatterAttrTooltipContent) attrTooltipContent;
richTextChangedSizeFormatPane.update(scatterAttrTooltipContent.getRichTextChangeSizeFormat());
getRichTextChangedPercentFormatPane().update(scatterAttrTooltipContent.getRichTextChangedSizePercentFormat());
}
}
@Override
public void setDirty(boolean isDirty) {
super.setDirty(isDirty);

22
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureRefreshTooltipContentPane.java

@ -1,9 +1,7 @@
package com.fr.van.chart.structure.desinger.style;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -28,16 +26,6 @@ public class VanChartStructureRefreshTooltipContentPane extends VanChartStructur
setChangedPercentFormatPane(changedPercentFormatPane);
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane = new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane);
ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane = new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane);
setRichTextChangedValueFormatPane(richTextChangedValueFormatPane);
setRichTextChangedPercentFormatPane(richTextChangedPercentFormatPane);
}
protected boolean supportRichEditor() {
return false;
}
@ -55,14 +43,4 @@ public class VanChartStructureRefreshTooltipContentPane extends VanChartStructur
new Component[]{getChangedPercentFormatPane(), null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

61
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureRichTextFieldListPane.java

@ -0,0 +1,61 @@
package com.fr.van.chart.structure.desinger.style;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.ModernUIPane;
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.multilayer.style.AttrTooltipMultiLevelNameFormat;
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;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
public class VanChartStructureRichTextFieldListPane extends VanChartFieldListPane {
public VanChartStructureRichTextFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditorPane) {
super(fieldAttrPane, richEditorPane);
}
protected void initDefaultFieldButton() {
VanChartFieldListener fieldListener = getFieldListener();
VanChartFieldButton categoryNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_Node_Name"),
new AttrTooltipMultiLevelNameFormat(), false, fieldListener);
VanChartFieldButton seriesNameButton = new VanChartFieldButton(Toolkit.i18nText("Fine-Design_Chart_MultiPie_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);
}
protected void addDefaultFieldButton(JPanel fieldPane) {
fieldPane.add(getCategoryNameButton());
fieldPane.add(getSeriesNameButton());
fieldPane.add(getValueButton());
}
protected List<VanChartFieldButton> getDefaultFieldButtonList() {
List<VanChartFieldButton> fieldButtonList = new ArrayList<>();
fieldButtonList.add(getCategoryNameButton());
fieldButtonList.add(getSeriesNameButton());
fieldButtonList.add(getValueButton());
return fieldButtonList;
}
}

72
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java

@ -2,20 +2,21 @@ package com.fr.van.chart.structure.desinger.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.AttrTooltipRichText;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat;
import com.fr.plugin.chart.base.format.AttrTooltipValueFormat;
import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat;
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.format.VanChartFormatPaneWithoutCheckBox;
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;
@ -38,15 +39,6 @@ public class VanChartStructureTooltipContentPane extends VanChartTooltipContentP
};
}
@Override
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null}
};
}
@Override
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) {
CategoryNameFormatPaneWithCheckBox categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane) {
@ -70,44 +62,34 @@ public class VanChartStructureTooltipContentPane 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_Node_Name");
protected VanChartRichTextPane createRichTextPane(ModernUIPane<VanChartRichEditorModel> richEditorPane) {
return new VanChartRichTextPane(richEditorPane) {
protected VanChartFieldListPane createFieldListPane(VanChartFieldAttrPane fieldAttrPane, ModernUIPane<VanChartRichEditorModel> richEditor) {
return new VanChartStructureRichTextFieldListPane(fieldAttrPane, richEditor);
}
};
SeriesNameFormatPaneWithoutCheckBox richTextSeriesNameFormatPane = new SeriesNameFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name");
protected AttrTooltipContent getInitialTooltipContent() {
return createAttrTooltip();
}
};
ValueFormatPaneWithoutCheckBox richTextValueFormatPane = new ValueFormatPaneWithoutCheckBox(parent, showOnPane);
PercentFormatPaneWithoutCheckBox richTextPercentFormatPane = new PercentFormatPaneWithoutCheckBox(parent, showOnPane);
setRichTextCategoryNameFormatPane(richTextCategoryNameFormatPane);
setRichTextSeriesNameFormatPane(richTextSeriesNameFormatPane);
setRichTextValueFormatPane(richTextValueFormatPane);
setRichTextPercentFormatPane(richTextPercentFormatPane);
}
protected void populateRichEditor(AttrTooltipContent attrTooltipContent) {
VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{
getRichTextCategoryNameFormatPane(),
getRichTextSeriesNameFormatPane(),
getRichTextValueFormatPane()
protected String[] getRichTextFieldNames() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Node_Name"),
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Use_Value")
};
}
AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{
attrTooltipContent.getRichTextCategoryFormat(),
attrTooltipContent.getRichTextSeriesFormat(),
attrTooltipContent.getRichTextValueFormat()
protected AttrTooltipFormat[] getRichTextFieldFormats() {
return new AttrTooltipFormat[]{
new AttrTooltipMultiLevelNameFormat(),
new AttrTooltipSeriesFormat(),
new AttrTooltipValueFormat()
};
setRichTextAttr(new AttrTooltipRichText());
populateRichTextFormat(formatPaneGroup, formatGroup);
populateRichText(attrTooltipContent.getRichTextAttr());
checkRichEditorState(attrTooltipContent);
}
@Override

28
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudRefreshTooltipContentPane.java

@ -3,9 +3,7 @@ package com.fr.van.chart.wordcloud.designer.style;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedPercentFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.ChangedValueFormatPaneWithoutCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -36,21 +34,6 @@ public class VanChartWordCloudRefreshTooltipContentPane extends VanChartWordClou
setChangedPercentFormatPane(changedPercentFormatPane);
}
protected void initRichTextFormatPane(VanChartStylePane parent, JPanel showOnPane) {
super.initRichTextFormatPane(parent, showOnPane);
ChangedValueFormatPaneWithoutCheckBox richTextChangedValueFormatPane = new ChangedValueFormatPaneWithoutCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Change_Word_Value");
}
};
ChangedPercentFormatPaneWithoutCheckBox richTextChangedPercentFormatPane = new ChangedPercentFormatPaneWithoutCheckBox(parent, showOnPane);
setRichTextChangedValueFormatPane(richTextChangedValueFormatPane);
setRichTextChangedPercentFormatPane(richTextChangedPercentFormatPane);
}
protected boolean supportRichEditor() {
return false;
}
@ -69,15 +52,4 @@ public class VanChartWordCloudRefreshTooltipContentPane extends VanChartWordClou
new Component[]{getChangedPercentFormatPane(), null},
};
}
protected Component[][] getRichTextComponents() {
return new Component[][]{
new Component[]{getRichTextCategoryNameFormatPane(), null},
new Component[]{getRichTextSeriesNameFormatPane(), null},
new Component[]{getRichTextValueFormatPane(), null},
new Component[]{getRichTextChangedValueFormatPane(), null},
new Component[]{getRichTextPercentFormatPane(), null},
new Component[]{getRichTextChangedPercentFormatPane(), null}
};
}
}

Loading…
Cancel
Save