|
|
@ -24,18 +24,13 @@ import java.util.concurrent.ExecutionException; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by vito on 2016/9/28. |
|
|
|
* Created by vito on 2016/9/28. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class WebDialogFactory { |
|
|
|
public class WebDialog { |
|
|
|
private static final String LATEST = "latest"; |
|
|
|
private static final String LATEST = "latest"; |
|
|
|
private static final String SHOP_SCRIPTS = "shop_scripts"; |
|
|
|
private static final String SHOP_SCRIPTS = "shop_scripts"; |
|
|
|
private static final int VERSION_8 = 8; |
|
|
|
private static final int VERSION_8 = 8; |
|
|
|
|
|
|
|
private static String installHome = StableUtils.getInstallHome(); |
|
|
|
|
|
|
|
|
|
|
|
private String installHome; |
|
|
|
public static void createPluginDialog() { |
|
|
|
|
|
|
|
|
|
|
|
public WebDialogFactory() { |
|
|
|
|
|
|
|
this.installHome = StableUtils.getInstallHome(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void createPluginDialog() { |
|
|
|
|
|
|
|
UIDialog dlg; |
|
|
|
UIDialog dlg; |
|
|
|
if (StableUtils.getMajorJavaVersion() >= VERSION_8) { |
|
|
|
if (StableUtils.getMajorJavaVersion() >= VERSION_8) { |
|
|
|
String relativePath = "/scripts/store/web/index.html"; |
|
|
|
String relativePath = "/scripts/store/web/index.html"; |
|
|
@ -84,7 +79,7 @@ public class WebDialogFactory { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Component initTraditionalStore() { |
|
|
|
private static Component initTraditionalStore() { |
|
|
|
UITabbedPane tabbedPane = new UITabbedPane(); |
|
|
|
UITabbedPane tabbedPane = new UITabbedPane(); |
|
|
|
PluginInstalledPane installedPane = new PluginInstalledPane(); |
|
|
|
PluginInstalledPane installedPane = new PluginInstalledPane(); |
|
|
|
tabbedPane.addTab(installedPane.tabTitle(), installedPane); |
|
|
|
tabbedPane.addTab(installedPane.tabTitle(), installedPane); |
|
|
@ -93,7 +88,7 @@ public class WebDialogFactory { |
|
|
|
return tabbedPane; |
|
|
|
return tabbedPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void downloadShopScripts(final String scriptsId) { |
|
|
|
private static void downloadShopScripts(final String scriptsId) { |
|
|
|
new SwingWorker<Boolean, Void>() { |
|
|
|
new SwingWorker<Boolean, Void>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Boolean doInBackground() throws Exception { |
|
|
|
protected Boolean doInBackground() throws Exception { |
|
|
@ -143,7 +138,7 @@ public class WebDialogFactory { |
|
|
|
}.execute(); |
|
|
|
}.execute(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void updateShopScripts(final String scriptsId) { |
|
|
|
private static void updateShopScripts(final String scriptsId) { |
|
|
|
new SwingWorker<Void, Void>() { |
|
|
|
new SwingWorker<Void, Void>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
protected Void doInBackground() throws Exception { |