|
|
@ -6,6 +6,7 @@ import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.extra.PluginConstants; |
|
|
|
import com.fr.design.extra.PluginConstants; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
@ -22,6 +23,8 @@ import javax.swing.JFrame; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.JOptionPane; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JProgressBar; |
|
|
|
import javax.swing.JProgressBar; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.FileOutputStream; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.InputStream; |
|
|
@ -76,10 +79,18 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { |
|
|
|
try { |
|
|
|
try { |
|
|
|
httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind(siteKind)); |
|
|
|
httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind(siteKind)); |
|
|
|
} catch (SiteBlockedException e) { |
|
|
|
} catch (SiteBlockedException e) { |
|
|
|
FineJOptionPane.showConfirmDialog(null, |
|
|
|
FineJOptionPane.showConfirmDialogWithOkListener(null, |
|
|
|
e.getMessage(), |
|
|
|
e.getMessage(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.DEFAULT_OPTION, |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), null, null, |
|
|
|
FineJOptionPane.WARNING_MESSAGE, null, OPTION_OK_CANCEL, null); |
|
|
|
new ActionListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
|
|
|
DesignUtils.visitEnvServerByParameters( |
|
|
|
|
|
|
|
"#management/system/normal", |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
null); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (httpClient.getResponseCode() != HttpURLConnection.HTTP_OK) { |
|
|
|
if (httpClient.getResponseCode() != HttpURLConnection.HTTP_OK) { |
|
|
|