|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
package com.fr.design.update.ui.dialog; |
|
|
|
|
|
|
|
|
|
import com.fanruan.product.ProductConstants; |
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
|
import com.fr.decision.update.data.UpdateConstants; |
|
|
|
|
import com.fr.decision.update.info.UpdateCallBack; |
|
|
|
|
import com.fr.decision.update.info.UpdateProgressCallBack; |
|
|
|
@ -14,7 +13,6 @@ import com.fr.design.gui.icontainer.UIScrollPane;
|
|
|
|
|
import com.fr.design.gui.ilable.ActionLabel; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.i18n.DesignSizeI18nManager; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
@ -62,6 +60,7 @@ import java.util.*;
|
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
|
|
|
|
|
|
import static com.fine.theme.utils.FineUIScale.scale; |
|
|
|
|
import static java.nio.charset.StandardCharsets.*; |
|
|
|
|
import static javax.swing.JOptionPane.QUESTION_MESSAGE; |
|
|
|
|
|
|
|
|
@ -72,11 +71,10 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
public static final Dimension DEFAULT = new Dimension(660, 620); |
|
|
|
|
|
|
|
|
|
private static final Dimension PROGRESSBAR = new Dimension(120, 15); |
|
|
|
|
private static final Dimension UPDATE_BUTTON = new Dimension(80, 24); |
|
|
|
|
private static final int UPDATE_PANE_ROW_SIZE = 30; |
|
|
|
|
private static final int UPDATE_CONTENT_PANE_ROW_SIZE = 10; |
|
|
|
|
private static final int UPDATE_CONTENT_PANE_COLUMN_SIZE = 10; |
|
|
|
|
private static final int UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE = 100; |
|
|
|
|
private static final int UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE = 120; |
|
|
|
|
private static final int SEARCH_PANE_ROW_SIZE = 50; |
|
|
|
|
private static final int SEARCH_PANE_TEXT_COLUMN = 130; |
|
|
|
|
private static final int SEARCH_PANE_COLUMN_GAP = 3; |
|
|
|
@ -159,7 +157,7 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
progressBar.setForeground(UpdateConstants.BAR_COLOR); |
|
|
|
|
progressBar.setVisible(false); |
|
|
|
|
progressBar.setStringPainted(true); |
|
|
|
|
progressBar.setPreferredSize(PROGRESSBAR); |
|
|
|
|
progressBar.setPreferredSize(scale(PROGRESSBAR)); |
|
|
|
|
|
|
|
|
|
progressBarPane.add(GUICoreUtils.createBorderLayoutPane( |
|
|
|
|
progressBar, BorderLayout.CENTER |
|
|
|
@ -298,7 +296,6 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
loadingLabel = new LoadingLabel(); |
|
|
|
|
loadingLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Checking_Jar_Update")); |
|
|
|
|
updateButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Update")); |
|
|
|
|
updateButton.setPreferredSize(FineUIScale.scale(UPDATE_BUTTON)); |
|
|
|
|
updateButton.setEnabled(false); |
|
|
|
|
|
|
|
|
|
double[] rowSize = {TableLayout.PREFERRED}; |
|
|
|
@ -692,7 +689,7 @@ public class UpdateMainDialog extends UIDialog {
|
|
|
|
|
* 显示窗口 |
|
|
|
|
*/ |
|
|
|
|
public void showDialog() { |
|
|
|
|
setSize(DEFAULT); |
|
|
|
|
setSize(scale(DEFAULT)); |
|
|
|
|
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_UpdateAndUpgrade")); |
|
|
|
|
GUICoreUtils.centerWindow(this); |
|
|
|
|
setVisible(true); |
|
|
|
|