Browse Source

CHART-15259 切换国际化获取当前模板的分辨率空指针

feature/big-screen
白岳 4 years ago
parent
commit
ea120a784d
  1. 5
      designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java

5
designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java

@ -1,12 +1,12 @@
package com.fr.design.chart; package com.fr.design.chart;
import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChartPainter; import com.fr.base.chart.BaseChartPainter;
import com.fr.base.chart.chartdata.CallbackEvent; import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.base.chart.result.WebChartIDInfo; import com.fr.base.chart.result.WebChartIDInfo;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLable; import com.fr.stable.xml.XMLable;
@ -79,7 +79,8 @@ public class ChartIcon implements Icon, XMLable {
BaseChartPainter chartPainter = getChartPainter(); BaseChartPainter chartPainter = getChartPainter();
int resolution = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getJTemplateResolution(); //插入图表的宽度是固定的,resolution直接获取屏幕分辨率,resolution现在只会影响到老图表
int resolution = ScreenResolution.getScreenResolution();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
Paint oldPaint = g2d.getPaint(); Paint oldPaint = g2d.getPaint();

Loading…
Cancel
Save