|
|
|
@ -10,7 +10,9 @@ import com.fr.design.i18n.Toolkit;
|
|
|
|
|
import com.fr.js.NameJavaScript; |
|
|
|
|
|
|
|
|
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
|
|
|
|
import com.fr.plugin.chart.base.RefreshMoreLabel; |
|
|
|
|
import com.fr.plugin.chart.base.VanChartHtmlLabel; |
|
|
|
|
import com.fr.plugin.chart.vanchart.VanChart; |
|
|
|
|
import com.fr.stable.collections.combination.Pair; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
@ -42,7 +44,7 @@ public class SearchChartJSAction {
|
|
|
|
|
ITContent htmlITContent = ITContent.copy(content); |
|
|
|
|
htmlITContent.addOtherPos(Toolkit.i18nText("Fine-Design_Chart_Chart")); |
|
|
|
|
SearchJSUtils.addJSInfosFromHtmlLabel(htmlITContent, htmlLabels, jsInfos); |
|
|
|
|
//图表-特效-交互属性
|
|
|
|
|
//图表-特效-交互属性-超级链接
|
|
|
|
|
ITContent conditionContent = ITContent.copy(content); |
|
|
|
|
conditionContent.addOtherPos( |
|
|
|
|
Toolkit.i18nText("Fine-Design_Chart_Chart"), |
|
|
|
@ -51,13 +53,37 @@ public class SearchChartJSAction {
|
|
|
|
|
); |
|
|
|
|
SearchJSUtils.addJSInfosFromNameJS(conditionContent, nameJavaScripts, jsInfos); |
|
|
|
|
|
|
|
|
|
//图表-特效-交互属性-监控刷新
|
|
|
|
|
dealMonitorRefreshJS(conditionContent,chartCollection,jsInfos); |
|
|
|
|
for (int i = 0; i < chartCollection.getChartCount(); i++) { |
|
|
|
|
ITContent chartContent = ITContent.copy(content); |
|
|
|
|
chartContent.addOtherPos(chartCollection.getChart(i).getChartName()); |
|
|
|
|
searchAxisJS(jsInfos, chartContent, chartCollection.getChart(i)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void dealMonitorRefreshJS(ITContent conditionContent, ChartCollection chartCollection, List<JSInfo> jsInfos) { |
|
|
|
|
for (int i = 0 ; i < chartCollection.getChartCount() ; i ++){ |
|
|
|
|
if (chartCollection.getChart(i) instanceof VanChart){ |
|
|
|
|
VanChart chart = (VanChart) chartCollection.getChart(i); |
|
|
|
|
if (isMonitorValid(chart.getRefreshMoreLabel())){ |
|
|
|
|
VanChartHtmlLabel htmlLabel = chart.getRefreshMoreLabel().getAttrTooltip().getContent().getHtmlLabel(); |
|
|
|
|
if (htmlLabel != null){ |
|
|
|
|
ITContent content = ITContent.copy(conditionContent); |
|
|
|
|
content.addOtherPos(Toolkit.i18nText("Fine-Design_Chart_Moniter_refresh")); |
|
|
|
|
content.setReplaceObject(htmlLabel); |
|
|
|
|
jsInfos.add(new JSInfo(content)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean isMonitorValid(RefreshMoreLabel moreLabel){ |
|
|
|
|
return moreLabel.isMoreLabel() && moreLabel.getAttrTooltip() != null && moreLabel.getAttrTooltip().isEnable(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void searchAxisJS(List<JSInfo> jsInfos, ITContent chartContent, Chart chart) { |
|
|
|
|
if (chart.getPlot() != null){ |
|
|
|
|
Axis xAxis = chart.getPlot().getxAxis(); |
|
|
|
|