forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~QINGHUI.LIU/design:release/10.0 to release/10.0 * commit '72133b25c5c72b76575f494b35bfa466dc37079c': 新增字段支持部分图表类型 调整富文本参数顺序 适配仪表盘,清理代码 适配饼图 适配箱型图 适配甘特图 适配框架图 适配漏斗图 适配流向地图 适配地图 适配多层饼图 设计新增字段的idfeature/big-screen
ju|剧浩宇
4 years ago
37 changed files with 1225 additions and 849 deletions
@ -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()); |
||||
} |
||||
} |
||||
|
||||
} |
@ -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; |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
|
||||
} |
@ -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()); |
||||
} |
||||
} |
||||
|
||||
} |
@ -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); |
||||
} |
||||
} |
@ -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); |
||||
} |
||||
} |
@ -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()); |
||||
} |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
Loading…
Reference in new issue