Browse Source

Merge pull request #1579 in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit '0cd9cbb974947e035410cd0a485387c844b9e6fd':
  CHART-13460 FR地图资源缺失下载提示
feature/big-screen
Bjorn 5 years ago
parent
commit
90aaec900e
  1. 4
      designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java
  2. 28
      designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java

4
designer-chart/src/main/java/com/fr/design/chart/ChartDesignerActivator.java

@ -1,6 +1,7 @@
package com.fr.design.chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.chart.gui.ChartComponent;
@ -17,6 +18,7 @@ import com.fr.module.Activator;
import com.fr.module.extension.Prepare;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import com.fr.van.chart.DownloadOnlineSourcesHelper;
import com.fr.van.chart.map.server.ChartMapEditorAction;
/**
@ -47,6 +49,8 @@ public class ChartDesignerActivator extends Activator implements Prepare {
DesignModuleFactory.registerExtraWidgetOptions(ChartTypeInterfaceManager.initWidgetOption());
GEOJSONHelper.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper());
ChartTypeInterfaceManager.addPluginChangedListener();
}

28
designer-chart/src/main/java/com/fr/van/chart/DownloadOnlineSourcesHelper.java

@ -6,26 +6,32 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.extra.PluginConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.general.CloudCenter;
import com.fr.general.IOUtils;
import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.DownloadSourcesEvent;
import com.fr.stable.CommonUtils;
import com.fr.stable.StableUtils;
import com.fr.workspace.WorkContext;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
/**
* Created by shine on 2017/8/21.
@ -51,13 +57,6 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
//总共字节数
private double totalBytes = 0;
private static final double PHANTOM_MB = 96.1 * 1024 * 1024;
public void addPhantomSiteInfo() {
this.addSiteInfo("plugin.phantomjs", ChartConstants.PHANTOMJS_URL, PHANTOM_MB);
}
private static final double MAP_JSON_MB = 4.5 * 1024 * 1024;
public void addMapJSONSiteInfo() {
@ -219,7 +218,6 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
@Override
public void downloadSources() {
this.addMapJSONSiteInfo();
this.addPhantomSiteInfo();
this.installOnline();
}

Loading…
Cancel
Save