|
|
|
@ -1,10 +1,8 @@
|
|
|
|
|
package com.fr.widgettheme.theme.panel; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
|
import com.fr.base.background.ColorBackground; |
|
|
|
|
import com.fr.base.theme.FormTheme; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.chart.chartattr.Title; |
|
|
|
|
import com.fr.chart.chartdata.NormalChartData; |
|
|
|
|
import com.fr.chart.charttypes.ChartTypeManager; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
@ -16,8 +14,6 @@ import com.fr.general.Background;
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.plugin.chart.PiePlot4VanChart; |
|
|
|
|
import com.fr.plugin.chart.attr.VanChartLegend; |
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
|
import com.fr.plugin.chart.base.AttrLabel; |
|
|
|
|
import com.fr.plugin.chart.base.VanChartTools; |
|
|
|
|
import com.fr.plugin.chart.column.VanChartColumnPlot; |
|
|
|
|
import com.fr.plugin.chart.type.GradientType; |
|
|
|
@ -36,7 +32,9 @@ import java.awt.Graphics2D;
|
|
|
|
|
import java.awt.geom.Rectangle2D; |
|
|
|
|
|
|
|
|
|
import static com.fr.design.i18n.Toolkit.i18nText; |
|
|
|
|
import static com.fr.widgettheme.util.ThemePreviewPaneInitHelper.*; |
|
|
|
|
import static com.fr.widgettheme.util.ThemePreviewPaneInitHelper.initColumnPlot; |
|
|
|
|
import static com.fr.widgettheme.util.ThemePreviewPaneInitHelper.initVanChartYAxis; |
|
|
|
|
import static com.fr.widgettheme.util.ThemePreviewPaneInitHelper.initVanChartsTools; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 主题界面预览控frm界面,就是主jar里的那个界面,做了简单的修改 |
|
|
|
@ -130,13 +128,7 @@ public class WidgetDisplayFormThemePreviewPane extends TemplateThemePreviewPane<
|
|
|
|
|
private ChartCollection initColumnChart() { |
|
|
|
|
try { |
|
|
|
|
VanChart chart = (VanChart) ChartTypeManager.getInstance().getCharts(VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID)[0].clone(); |
|
|
|
|
chart.getTitle().setTitleVisible(false); |
|
|
|
|
initVanChartsTools(chart.getVanChartTools()); |
|
|
|
|
VanChartColumnPlot plot = chart.getPlot(); |
|
|
|
|
//Form中独有的setPosition,和Report中不同,先单独放在这里,不写在initPlot中
|
|
|
|
|
plot.getLegend().setPosition(Constants.TOP); |
|
|
|
|
initPlot(plot); |
|
|
|
|
initVanChartYAxis(plot.getDefaultYAxis()); |
|
|
|
|
initColumnChartDetail(chart); |
|
|
|
|
Object[] category = { |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Category") + "1", |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Category") + "2", |
|
|
|
@ -160,6 +152,17 @@ public class WidgetDisplayFormThemePreviewPane extends TemplateThemePreviewPane<
|
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initColumnChartDetail(VanChart chart) { |
|
|
|
|
chart.getTitle().setTitleVisible(false); |
|
|
|
|
initVanChartsTools(chart.getVanChartTools()); |
|
|
|
|
VanChartColumnPlot plot = chart.getPlot(); |
|
|
|
|
//Form中独有的setPosition,和Report中不同,先单独放在这里,不写在initPlot中
|
|
|
|
|
plot.getLegend().setPosition(Constants.TOP); |
|
|
|
|
initColumnPlot(plot); |
|
|
|
|
initVanChartYAxis(plot.getDefaultYAxis()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 初始化饼图 |
|
|
|
|
* |
|
|
|
|