Browse Source

REPORT-53601 & REPORT-53614 结果文本框框设置不可编辑。进度条更新设置

feature/10.0
pengda 4 years ago
parent
commit
7edab03d09
  1. 13
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  2. 1
      designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java

13
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

@ -40,7 +40,6 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.JDialog; import javax.swing.JDialog;
@ -330,13 +329,14 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
@Override @Override
public void onDownloadSuccess() { public void onDownloadSuccess() {
deleteForDesignerUpdate(installLib); deleteForDesignerUpdate(installLib);
if (differentPlugins.size() > 0) {
//主jar下载成功之后再卸载安装插件 //主jar下载成功之后再卸载安装插件
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0);
new SwingWorker<JSONArray, Void>() { new SwingWorker<JSONArray, Void>() {
@Override @Override
protected JSONArray doInBackground() { protected JSONArray doInBackground() {
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0);
return VersionCheckUtils.syncPlugins(differentPlugins); return VersionCheckUtils.syncPlugins(differentPlugins);
} }
@ -356,6 +356,9 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
helper.restartForUpdate(frame); helper.restartForUpdate(frame);
} }
}.execute(); }.execute();
} else {
helper.restartForUpdate(frame);
}
} }
@Override @Override
@ -369,12 +372,12 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
}.execute(); }.execute();
} else { } else {
//到这边说明主jar是一致的,就只尝试同步插件 //到这边说明主jar是一致的,就只尝试同步插件
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0);
new SwingWorker<JSONArray, Void>() { new SwingWorker<JSONArray, Void>() {
@Override @Override
protected JSONArray doInBackground() { protected JSONArray doInBackground() {
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0);
return VersionCheckUtils.syncPlugins(differentPlugins); return VersionCheckUtils.syncPlugins(differentPlugins);
} }

1
designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java vendored

@ -77,6 +77,7 @@ public class SyncFailedPluginsDialog extends JDialog {
detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n"); detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n");
} }
detailsTextArea.setText(detailsText.toString()); detailsTextArea.setText(detailsText.toString());
detailsTextArea.setEditable(false);
scrollPane = new JScrollPane(detailsTextArea); scrollPane = new JScrollPane(detailsTextArea);
centerPanel.add(detailsTitlePanel,BorderLayout.NORTH); centerPanel.add(detailsTitlePanel,BorderLayout.NORTH);
centerPanel.add(scrollPane,BorderLayout.CENTER); centerPanel.add(scrollPane,BorderLayout.CENTER);

Loading…
Cancel
Save