Browse Source

REPORT-75998 添加监控刷新JS

feature/x
Destiny.Lin 2 years ago
parent
commit
da1d28d62d
  1. 28
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/js/SearchChartJSAction.java
  2. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

28
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/js/SearchChartJSAction.java

@ -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();

1
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

@ -130,7 +130,6 @@ public class ITReplaceNorthPanel {
public void setLimitSize(int width) {
width = Math.max(LIMIT_WIDTH, width);
upPanel.setMaximumSize(new Dimension(width, 161));
//upPanel.setMinimumSize(new Dimension(width, 161));
upPanel.setPreferredSize(new Dimension(width, 161));
}

Loading…
Cancel
Save