Browse Source

REPORT-10763 & REPORT-10562 & REPORT-10541

final/10.0
Mata.Li 6 years ago
parent
commit
aedb9ae71f
  1. 4
      designer-base/src/main/java/com/fr/design/onlineupdate/actions/FileDownloader.java
  2. 2
      designer-base/src/main/java/com/fr/design/onlineupdate/actions/SoftwareUpdateAction.java
  3. 6
      designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/RestoreDialog.java
  4. 16
      designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/RestoreResultDialog.java
  5. 36
      designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/UpdateMainDialog.java
  6. 7
      designer-realize/src/main/java/com/fr/onlineupdate/actions/FileDownloader.java
  7. 7
      designer-realize/src/main/java/com/fr/onlineupdate/domain/DownloadItem.java
  8. 7
      designer-realize/src/main/java/com/fr/onlineupdate/factory/DirectoryOperationFactory.java

4
designer-base/src/main/java/com/fr/design/onlineupdate/actions/FileDownloader.java

@ -46,8 +46,8 @@ public abstract class FileDownloader extends SwingWorker<Boolean, DownloadItem>
}
if (item.getTotalLength() != item.getDownloadLength()) {
JOptionPane.showMessageDialog(null,
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Download_Failed"),
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Alert"), JOptionPane.ERROR_MESSAGE);
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Download_Failed"),
InterProviderFactory.getProvider().getLocText("Fine-Design_Updater_Alert"), JOptionPane.ERROR_MESSAGE);
return false;
} else {
item.setDownloadLength(0);

2
designer-base/src/main/java/com/fr/design/onlineupdate/actions/SoftwareUpdateAction.java

@ -15,7 +15,7 @@ public class SoftwareUpdateAction extends UpdateAction {
public SoftwareUpdateAction() {
setName(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_UpdateAndUpgrade"));
setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_UpdateAndUpgrade"));
setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/update/update_new.png"));
}

6
designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/RestoreDialog.java

@ -53,8 +53,8 @@ public class RestoreDialog extends JDialog {
}
private void initButton() {
okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Ok"));
cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Cancel"));
okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Ok"));
cancelButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Cancel"));
okButton.setEnabled(false);
okButton.addActionListener(new ActionListener() {
@ -114,7 +114,7 @@ public class RestoreDialog extends JDialog {
*/
public void showDialog() {
this.setSize(RESTOREJAR);
this.setTitle(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Jar_Restore"));
this.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Jar_Restore"));
GUICoreUtils.centerWindow(this);
this.setVisible(true);
}

16
designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/RestoreResultDialog.java

@ -47,7 +47,7 @@ public class RestoreResultDialog extends JDialog {
public RestoreResultDialog(Frame parent, boolean modal, String jarDir) {
super(parent, modal);
this.jarRestoreDir = jarDir;
if (ComparatorUtils.equals(jarDir, com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Restore_Old_Version"))) {
if (ComparatorUtils.equals(jarDir, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restore_Old_Version"))) {
initOldVersionRestoreComps();
} else {
initCommonComponents();
@ -61,8 +61,8 @@ public class RestoreResultDialog extends JDialog {
pane.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setContentPane(pane);
UIButton restartButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Restart_Designer"));
UIButton restartLaterButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Restart_Later"));
UIButton restartButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restart_Designer"));
UIButton restartLaterButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restart_Later"));
restartButton.setFont(new Font("Default", Font.PLAIN, 12));
restartButton.setEnabled(false);
@ -86,7 +86,7 @@ public class RestoreResultDialog extends JDialog {
pane.add(buttonPane, BorderLayout.SOUTH);
JPanel progressLabelPane = new JPanel(new BorderLayout());
UILabel jarProgressLabel = new UILabel((com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Restore_To")) + " " + jarRestoreDir + " " + (com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_WorksAfterRestart")));
UILabel jarProgressLabel = new UILabel((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restore_To")) + " " + jarRestoreDir + " " + (com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_WorksAfterRestart")));
jarProgressLabel.setFont(new Font("Default", Font.PLAIN, 12));
jarProgressLabel.setVisible(true);
progressLabelPane.add(jarProgressLabel);
@ -98,7 +98,7 @@ public class RestoreResultDialog extends JDialog {
restartButton.setEnabled(true);
restartLaterButton.setEnabled(true);
this.setSize(RESTORE);
this.setTitle(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Jar_Restore"));
this.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Jar_Restore"));
}
private void initOldVersionRestoreComps() {
@ -108,7 +108,7 @@ public class RestoreResultDialog extends JDialog {
pane.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setContentPane(pane);
UIButton okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Ok"));
UIButton okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Ok"));
okButton.setFont(new Font("Default", Font.PLAIN, 12));
okButton.addActionListener(new AbstractAction() {
@Override
@ -123,10 +123,10 @@ public class RestoreResultDialog extends JDialog {
JPanel infoPane = new JPanel(new BorderLayout());
JTextArea jTextArea = new JTextArea(
com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Already_Backup_Old_Project")
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Already_Backup_Old_Project")
+ StringUtils.BLANK
+ StableUtils.pathJoin(StableUtils.getInstallHome(), UpdateConstants.DESIGNER_BACKUP_DIR)
+ com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Unzip_Replace_Restore")
+ com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Unzip_Replace_Restore")
);
jTextArea.setLineWrap(true);
jTextArea.setEditable(false);

36
designer-base/src/main/java/com/fr/design/onlineupdate/ui/dialog/UpdateMainDialog.java

@ -166,7 +166,7 @@ public class UpdateMainDialog extends UIDialog {
progressBar.setStringPainted(true);
progressBar.setPreferredSize(PROGRESSBAR);
updateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_New_Version_Available"));
updateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_New_Version_Available"));
updateLabel.setHorizontalAlignment(SwingConstants.RIGHT);
updateLabel.setVisible(false);
@ -204,15 +204,15 @@ public class UpdateMainDialog extends UIDialog {
JPanel jarUpdateContentPane2 = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{
new Component[]{new UILabel(), new UILabel(), new UILabel()},
new Component[]{new UILabel(), updateVersionReminderPane, new UILabel()},
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_JAR_Version")), jarCurrentLabel), new UILabel()},
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Latest_JAR")), loadingLabel), new UILabel()},
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_JAR_Version")), jarCurrentLabel), new UILabel()},
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Latest_JAR")), loadingLabel), new UILabel()},
new Component[]{new UILabel(), new UILabel(), new UILabel()}
}, rowUpdateSubContentPaneSize, columnUpdateSubContentPaneSize, LayoutConstants.VGAP_LARGE);
jarUpdateContentPane2.setBackground(Color.WHITE);
jarUpdateContentPane.add(jarUpdateContentPane2);
jarVersionInfoPane = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{
new Component[]{new UILabel(), new UILabel(), new UILabel()},
new Component[]{new UILabel(), initPaneContent(getBackground(), rowUpdateContentPaneSize, columnUpdateContentPaneSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_JarUpdate")), new UILabel(), jarRestoreLabel), new UILabel()},
new Component[]{new UILabel(), initPaneContent(getBackground(), rowUpdateContentPaneSize, columnUpdateContentPaneSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_JarUpdate")), new UILabel(), jarRestoreLabel), new UILabel()},
new Component[]{new UILabel(), jarUpdateContentPane, new UILabel()}
}, rowUpdatePaneSize, columnUpdatePaneSize, LayoutConstants.VGAP_LARGE);
}
@ -230,7 +230,7 @@ public class UpdateMainDialog extends UIDialog {
new Component[]{new UILabel(), new UILabel(), new UILabel()}
}, searchRow, searchColumn, LayoutConstants.VGAP_LARGE);
String[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Date"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Content"), com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_SignHeader")};
String[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Content"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_SignHeader")};
initUpdateInfoTable(columnNames);
UIScrollPane uiScrollPane = new UIScrollPane(updateInfoTable);
@ -265,8 +265,8 @@ public class UpdateMainDialog extends UIDialog {
updateInfoTable.getColumnModel().getColumn(updateSignColIndex).setMinWidth(0);
updateInfoTable.getTableHeader().getColumnModel().getColumn(updateSignColIndex).setMaxWidth(0);
updateInfoTable.getTableHeader().getColumnModel().getColumn(updateSignColIndex).setMinWidth(0);
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Date")).setCellRenderer(new UpdateInfoTableCellRender());
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Content")).setCellRenderer(new UpdateInfoTextAreaCellRender());
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Date")).setCellRenderer(new UpdateInfoTableCellRender());
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Content")).setCellRenderer(new UpdateInfoTextAreaCellRender());
}
private void initUpdateInfoSearchPane() {
@ -289,7 +289,7 @@ public class UpdateMainDialog extends UIDialog {
public void changedUpdate(DocumentEvent e) {
}
});
searchUpdateInfoBtn = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Search"));
searchUpdateInfoBtn = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Search"));
searchUpdateInfoBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -303,8 +303,8 @@ public class UpdateMainDialog extends UIDialog {
private void initButtonAndLabel() {
loadingLabel = new LoadingLabel();
loadingLabel.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Checking_Jar_Update"));
updateButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Update"));
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(UPDATE_BUTTON);
updateButton.setEnabled(false);
@ -313,14 +313,14 @@ public class UpdateMainDialog extends UIDialog {
double[] colSize = {UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE, TableLayout.PREFERRED};
updateVersionReminderPane = initPaneContent(
Color.WHITE, rowSize, colSize,
new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Designer-Updater_Designer_Version")),
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Designer_Version")),
new UILabel(UpdateConstants.DEFAULT_APP_NAME + StringUtils.BLANK + ProductConstants.VERSION)
);
jarCurrentLabel = new UILabel(StringUtils.isEmpty(GeneralUtils.readBuildNO()) ? com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Not_Install_Version") : GeneralUtils.readBuildNO(), SwingConstants.CENTER);
UILabel noJarPreviousRevision = new UILabel(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_No_Previous_Version"));
UpdateActionLabel jarRestorePreviousRevision = new UpdateActionLabel(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Restore"), false);
jarCurrentLabel = new UILabel(StringUtils.isEmpty(GeneralUtils.readBuildNO()) ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Not_Install_Version") : GeneralUtils.readBuildNO(), SwingConstants.CENTER);
UILabel noJarPreviousRevision = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_No_Previous_Version"));
UpdateActionLabel jarRestorePreviousRevision = new UpdateActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restore"), false);
jarRestorePreviousRevision.setForeground(new Color(RESTORE_LABEL_COLOR));
jarRestorePreviousRevision.addActionListener(new ActionListener() {
@Override
@ -532,7 +532,7 @@ public class UpdateMainDialog extends UIDialog {
}
private void stopLoading() {
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Connect_VersionUpdateServer_Failed"));
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Connect_VersionUpdateServer_Failed"));
}
@ -557,7 +557,7 @@ public class UpdateMainDialog extends UIDialog {
updateLabel.setVisible(true);
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO);
} else {
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Already_Latest_Version"));
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Already_Latest_Version"));
}
} else {
updateButton.setEnabled(true);
@ -638,7 +638,7 @@ public class UpdateMainDialog extends UIDialog {
backup();
putNewFiles();
updateSuccessful = true;
updateButton.setText(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_Restart_Designer"));
updateButton.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restart_Designer"));
}
@Override
@ -804,7 +804,7 @@ public class UpdateMainDialog extends UIDialog {
*/
public void showDialog() {
setSize(DEFAULT);
setTitle(com.fr.design.i18n.Toolkit.i18nText("FR-Desinger-Updater_UpdateAndUpgrade"));
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_UpdateAndUpgrade"));
GUICoreUtils.centerWindow(this);
setVisible(true);
}

7
designer-realize/src/main/java/com/fr/onlineupdate/actions/FileDownloader.java

@ -1,7 +0,0 @@
package com.fr.onlineupdate.actions;
/**
* Created by XINZAI on 2018/8/21.
*/
public class FileDownloader {
}

7
designer-realize/src/main/java/com/fr/onlineupdate/domain/DownloadItem.java

@ -1,7 +0,0 @@
package com.fr.onlineupdate.domain;
/**
* Created by XINZAI on 2018/8/21.
*/
public class DownloadItem {
}

7
designer-realize/src/main/java/com/fr/onlineupdate/factory/DirectoryOperationFactory.java

@ -1,7 +0,0 @@
package com.fr.onlineupdate.factory;
/**
* Created by XINZAI on 2018/8/21.
*/
public class DirectoryOperationFactory {
}
Loading…
Cancel
Save