|
|
@ -96,8 +96,6 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
private LoadingLabel loadingLabel; |
|
|
|
private LoadingLabel loadingLabel; |
|
|
|
//更新按钮
|
|
|
|
//更新按钮
|
|
|
|
private UIButton updateButton; |
|
|
|
private UIButton updateButton; |
|
|
|
//有新版本提示标签
|
|
|
|
|
|
|
|
private UILabel updateLabel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//jar包版本信息面板,包括当前版本和最新版本
|
|
|
|
//jar包版本信息面板,包括当前版本和最新版本
|
|
|
|
private JPanel jarVersionInfoPane; |
|
|
|
private JPanel jarVersionInfoPane; |
|
|
@ -160,13 +158,8 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
progressBar.setStringPainted(true); |
|
|
|
progressBar.setStringPainted(true); |
|
|
|
progressBar.setPreferredSize(PROGRESSBAR); |
|
|
|
progressBar.setPreferredSize(PROGRESSBAR); |
|
|
|
|
|
|
|
|
|
|
|
updateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_New_Version_Available")); |
|
|
|
|
|
|
|
updateLabel.setHorizontalAlignment(SwingConstants.RIGHT); |
|
|
|
|
|
|
|
updateLabel.setVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
progressBarPane.add(GUICoreUtils.createBorderLayoutPane( |
|
|
|
progressBarPane.add(GUICoreUtils.createBorderLayoutPane( |
|
|
|
progressBar, BorderLayout.CENTER, |
|
|
|
progressBar, BorderLayout.CENTER |
|
|
|
updateLabel, BorderLayout.EAST |
|
|
|
|
|
|
|
), BorderLayout.CENTER); |
|
|
|
), BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
updateActionPane = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
updateActionPane = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
@ -186,7 +179,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
double[] rowUpdatePaneSize = {UPDATE_PANE_ROW_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
double[] rowUpdatePaneSize = {UPDATE_PANE_ROW_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdatePaneSize = {TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdatePaneSize = {TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED}; |
|
|
|
double[] rowUpdateContentPaneSize = {TableLayout.PREFERRED}; |
|
|
|
double[] rowUpdateContentPaneSize = {TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdateContentPaneSize = {TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdateContentPaneSize = {TableLayout.PREFERRED, TableLayout.FILL}; |
|
|
|
double[] rowUpdateSubContentPaneSize = {UPDATE_CONTENT_PANE_ROW_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, UPDATE_CONTENT_PANE_ROW_SIZE}; |
|
|
|
double[] rowUpdateSubContentPaneSize = {UPDATE_CONTENT_PANE_ROW_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, UPDATE_CONTENT_PANE_ROW_SIZE}; |
|
|
|
double[] columnUpdateSubContentPaneSize = {UPDATE_CONTENT_PANE_COLUMN_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdateSubContentPaneSize = {UPDATE_CONTENT_PANE_COLUMN_SIZE, TableLayout.PREFERRED, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdateSubContentPaneLabelSize = {UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE, TableLayout.PREFERRED}; |
|
|
|
double[] columnUpdateSubContentPaneLabelSize = {UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE, TableLayout.PREFERRED}; |
|
|
@ -198,7 +191,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
JPanel jarUpdateContentPane2 = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
JPanel jarUpdateContentPane2 = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()}, |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()}, |
|
|
|
new Component[]{new UILabel(), updateVersionReminderPane, 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("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_JAR_Version")), jarCurrentLabel), jarRestoreLabel}, |
|
|
|
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Latest_JAR")), loadingLabel), |
|
|
|
new Component[]{new UILabel(), initPaneContent(Color.WHITE, rowUpdateContentPaneSize, columnUpdateSubContentPaneLabelSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Latest_JAR")), loadingLabel), |
|
|
|
getNewFeatureActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Latest_Feature_Detail"))}, |
|
|
|
getNewFeatureActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Latest_Feature_Detail"))}, |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()} |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()} |
|
|
@ -207,7 +200,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
jarUpdateContentPane.add(jarUpdateContentPane2); |
|
|
|
jarUpdateContentPane.add(jarUpdateContentPane2); |
|
|
|
jarVersionInfoPane = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
jarVersionInfoPane = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{ |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()}, |
|
|
|
new Component[]{new UILabel(), new UILabel(), 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(), initPaneContent(getBackground(), rowUpdateContentPaneSize, columnUpdateContentPaneSize, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_JarUpdate")), new UILabel()), new UILabel()}, |
|
|
|
new Component[]{new UILabel(), jarUpdateContentPane, new UILabel()} |
|
|
|
new Component[]{new UILabel(), jarUpdateContentPane, new UILabel()} |
|
|
|
}, rowUpdatePaneSize, columnUpdatePaneSize, LayoutConstants.VGAP_LARGE); |
|
|
|
}, rowUpdatePaneSize, columnUpdatePaneSize, LayoutConstants.VGAP_LARGE); |
|
|
|
} |
|
|
|
} |
|
|
@ -225,7 +218,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()} |
|
|
|
new Component[]{new UILabel(), new UILabel(), new UILabel()} |
|
|
|
}, searchRow, searchColumn, LayoutConstants.VGAP_LARGE); |
|
|
|
}, searchRow, searchColumn, LayoutConstants.VGAP_LARGE); |
|
|
|
|
|
|
|
|
|
|
|
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")}; |
|
|
|
String[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Version"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Content"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_SignHeader")}; |
|
|
|
initUpdateInfoTable(columnNames); |
|
|
|
initUpdateInfoTable(columnNames); |
|
|
|
|
|
|
|
|
|
|
|
UIScrollPane uiScrollPane = new UIScrollPane(updateInfoTable); |
|
|
|
UIScrollPane uiScrollPane = new UIScrollPane(updateInfoTable); |
|
|
@ -236,31 +229,32 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initUpdateInfoTable(String[] columnNames) { |
|
|
|
private void initUpdateInfoTable(String[] columnNames) { |
|
|
|
int updateTimeColIndex = 0; |
|
|
|
|
|
|
|
int updateTitleColIndex = 1; |
|
|
|
|
|
|
|
int updateSignColIndex = 2; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateInfoTable = new UpdateInfoTable(columnNames); |
|
|
|
updateInfoTable = new UpdateInfoTable(columnNames); |
|
|
|
|
|
|
|
|
|
|
|
updateInfoTable.setShowGrid(false); |
|
|
|
updateInfoTable.setShowGrid(false); |
|
|
|
updateInfoTable.setCellSelectionEnabled(false); |
|
|
|
updateInfoTable.setCellSelectionEnabled(false); |
|
|
|
TableRowSorter<UpdateInfoTableModel> sorter = new TableRowSorter<>(updateInfoTable.getDataModel()); |
|
|
|
TableRowSorter<UpdateInfoTableModel> sorter = new TableRowSorter<>(updateInfoTable.getDataModel()); |
|
|
|
sorter.setSortable(updateTimeColIndex, true); |
|
|
|
sorter.setSortable(UpdateInfoTable.UPDATE_DATE_INDEX, true); |
|
|
|
sorter.setSortable(updateTitleColIndex, false); |
|
|
|
sorter.setSortable(UpdateInfoTable.UPDATE_VERSION_INDEX, true); |
|
|
|
sorter.setSortable(updateSignColIndex, false); |
|
|
|
sorter.setSortable(UpdateInfoTable.UPDATE_TITLE_INDEX, false); |
|
|
|
|
|
|
|
sorter.setSortable(UpdateInfoTable.SIGN_INDEX, false); |
|
|
|
updateInfoTable.setRowSorter(sorter); |
|
|
|
updateInfoTable.setRowSorter(sorter); |
|
|
|
List<RowSorter.SortKey> sortKeys = new ArrayList<>(); |
|
|
|
List<RowSorter.SortKey> sortKeys = new ArrayList<>(); |
|
|
|
sortKeys.add(new RowSorter.SortKey(updateTimeColIndex, SortOrder.DESCENDING)); |
|
|
|
sortKeys.add(new RowSorter.SortKey(UpdateInfoTable.UPDATE_DATE_INDEX, SortOrder.DESCENDING)); |
|
|
|
|
|
|
|
sortKeys.add(new RowSorter.SortKey(UpdateInfoTable.UPDATE_VERSION_INDEX, SortOrder.DESCENDING)); |
|
|
|
sorter.setSortKeys(sortKeys); |
|
|
|
sorter.setSortKeys(sortKeys); |
|
|
|
|
|
|
|
|
|
|
|
updateInfoTable.getTableHeader().setReorderingAllowed(false); |
|
|
|
updateInfoTable.getTableHeader().setReorderingAllowed(false); |
|
|
|
updateInfoTable.getColumnModel().getColumn(updateTimeColIndex).setMaxWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.UPDATE_DATE_INDEX).setMaxWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getColumnModel().getColumn(updateTimeColIndex).setMinWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.UPDATE_DATE_INDEX).setMinWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getColumnModel().getColumn(updateSignColIndex).setMaxWidth(0); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.UPDATE_VERSION_INDEX).setMaxWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getColumnModel().getColumn(updateSignColIndex).setMinWidth(0); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.UPDATE_VERSION_INDEX).setMinWidth(UPDATE_INFO_TABLE_HEADER_TIME_WIDTH); |
|
|
|
updateInfoTable.getTableHeader().getColumnModel().getColumn(updateSignColIndex).setMaxWidth(0); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.SIGN_INDEX).setMaxWidth(0); |
|
|
|
updateInfoTable.getTableHeader().getColumnModel().getColumn(updateSignColIndex).setMinWidth(0); |
|
|
|
updateInfoTable.getColumnModel().getColumn(UpdateInfoTable.SIGN_INDEX).setMinWidth(0); |
|
|
|
|
|
|
|
updateInfoTable.getTableHeader().getColumnModel().getColumn(UpdateInfoTable.SIGN_INDEX).setMaxWidth(0); |
|
|
|
|
|
|
|
updateInfoTable.getTableHeader().getColumnModel().getColumn(UpdateInfoTable.SIGN_INDEX).setMinWidth(0); |
|
|
|
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_Date")).setCellRenderer(new UpdateInfoTableCellRender()); |
|
|
|
|
|
|
|
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Version")).setCellRenderer(new UpdateInfoTableCellRender()); |
|
|
|
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Content")).setCellRenderer(new UpdateInfoTextAreaCellRender()); |
|
|
|
updateInfoTable.getColumn(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Content")).setCellRenderer(new UpdateInfoTextAreaCellRender()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -304,18 +298,18 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
updateButton.setEnabled(false); |
|
|
|
updateButton.setEnabled(false); |
|
|
|
|
|
|
|
|
|
|
|
double[] rowSize = {TableLayout.PREFERRED}; |
|
|
|
double[] rowSize = {TableLayout.PREFERRED}; |
|
|
|
|
|
|
|
double[] colSize = {TableLayout.PREFERRED}; |
|
|
|
|
|
|
|
UILabel versionLabel = new UILabel(UpdateConstants.DEFAULT_APP_NAME + StringUtils.BLANK + ProductConstants.VERSION); |
|
|
|
|
|
|
|
versionLabel.setFont(new Font("Default", Font.BOLD, 16)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double[] colSize = {UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE, TableLayout.PREFERRED}; |
|
|
|
|
|
|
|
updateVersionReminderPane = initPaneContent( |
|
|
|
updateVersionReminderPane = initPaneContent( |
|
|
|
Color.WHITE, rowSize, colSize, |
|
|
|
Color.WHITE, rowSize, colSize, versionLabel |
|
|
|
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Designer_Version")), |
|
|
|
|
|
|
|
new UILabel(UpdateConstants.DEFAULT_APP_NAME + StringUtils.BLANK + ProductConstants.VERSION) |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
String notInstallVersion = InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build"); |
|
|
|
String notInstallVersion = InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build"); |
|
|
|
String versionBuildNo = GeneralUtils.getVersion() + HYPHEN + GeneralUtils.readBuildNO(); |
|
|
|
String versionBuildNo = GeneralUtils.getVersion() + HYPHEN + GeneralUtils.readBuildNO(); |
|
|
|
jarCurrentLabel = new UILabel(ComparatorUtils.equals(notInstallVersion, GeneralUtils.readBuildNO()) ? notInstallVersion : versionBuildNo, SwingConstants.CENTER); |
|
|
|
jarCurrentLabel = new UILabel(ComparatorUtils.equals(notInstallVersion, GeneralUtils.readBuildNO()) ? notInstallVersion : versionBuildNo, 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); |
|
|
|
UpdateActionLabel jarRestorePreviousRevision = new UpdateActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Restore"), false); |
|
|
|
jarRestorePreviousRevision.setForeground(new Color(RESTORE_LABEL_COLOR)); |
|
|
|
jarRestorePreviousRevision.setForeground(new Color(RESTORE_LABEL_COLOR)); |
|
|
|
jarRestorePreviousRevision.addActionListener(new ActionListener() { |
|
|
|
jarRestorePreviousRevision.addActionListener(new ActionListener() { |
|
|
@ -327,7 +321,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
}); |
|
|
|
}); |
|
|
|
//choose RestoreLabel to show
|
|
|
|
//choose RestoreLabel to show
|
|
|
|
boolean isNeedRestore = ArrayUtils.isNotEmpty(UpdateFileUtils.listBackupVersions()); |
|
|
|
boolean isNeedRestore = ArrayUtils.isNotEmpty(UpdateFileUtils.listBackupVersions()); |
|
|
|
jarRestoreLabel = isNeedRestore ? jarRestorePreviousRevision : noJarPreviousRevision; |
|
|
|
jarRestoreLabel = isNeedRestore ? jarRestorePreviousRevision : null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initComponents() { |
|
|
|
private void initComponents() { |
|
|
@ -542,7 +536,8 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
private ArrayList<Object[]> generateUpdateInfoList(JSONArray jsonArray, String keyword) throws Exception { |
|
|
|
private ArrayList<Object[]> generateUpdateInfoList(JSONArray jsonArray, String keyword) throws Exception { |
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
JSONObject jo = (JSONObject) jsonArray.get(i); |
|
|
|
JSONObject jo = (JSONObject) jsonArray.get(i); |
|
|
|
String updateTitle = (String) jo.get("jiraId") + jo.get("info"); |
|
|
|
String updateTitle = (String) jo.get("jiraId") + " " + jo.get("info"); |
|
|
|
|
|
|
|
String updateVersionStr = (String) jo.get("version"); |
|
|
|
String updateTimeStr = (String) jo.get("updateTime"); |
|
|
|
String updateTimeStr = (String) jo.get("updateTime"); |
|
|
|
Date updateTime = UPDATELOG_FORMAT.parse(updateTimeStr); |
|
|
|
Date updateTime = UPDATELOG_FORMAT.parse(updateTimeStr); |
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
|
//形如 Build#release-2018.07.31.03.03.52.80
|
|
|
@ -557,7 +552,7 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (isValidLogInfo(updateTitle)) { |
|
|
|
if (isValidLogInfo(updateTitle)) { |
|
|
|
updateInfoList.add(new Object[]{UPDATE_INFO_TABLE_FORMAT.format(updateTime), updateTitle, updateTime.after(curJarDate)}); |
|
|
|
updateInfoList.add(new Object[]{UPDATE_INFO_TABLE_FORMAT.format(updateTime), updateVersionStr, updateTitle, updateTime.after(curJarDate)}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new ArrayList<>(updateInfoList); |
|
|
|
return new ArrayList<>(updateInfoList); |
|
|
@ -590,14 +585,12 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
|
Date currentDate = (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss")).parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1)); |
|
|
|
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) { |
|
|
|
if (DateUtils.subtractDate(jarDate, currentDate, DateUtils.SECOND) > 0) { |
|
|
|
updateButton.setEnabled(true); |
|
|
|
updateButton.setEnabled(true); |
|
|
|
updateLabel.setVisible(true); |
|
|
|
|
|
|
|
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); |
|
|
|
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Already_Latest_Version")); |
|
|
|
loadingLabel.stopLoading(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Already_Latest_Version")); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
updateButton.setEnabled(true); |
|
|
|
updateButton.setEnabled(true); |
|
|
|
updateLabel.setVisible(true); |
|
|
|
|
|
|
|
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); |
|
|
|
loadingLabel.stopLoading(buildNO.contains("-") ? buildNO.substring(buildNO.lastIndexOf("-") + 1) : buildNO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -666,7 +659,8 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private ActionLabel getNewFeatureActionLabel(final String text){ |
|
|
|
private ActionLabel getNewFeatureActionLabel(final String text){ |
|
|
|
ActionLabel actionLabel = new ActionLabel(text); |
|
|
|
ActionLabel actionLabel = new ActionLabel(text, new Color(RESTORE_LABEL_COLOR)); |
|
|
|
|
|
|
|
actionLabel.setDrawUnderLine(false); |
|
|
|
actionLabel.addActionListener(new NewFeatureAction()); |
|
|
|
actionLabel.addActionListener(new NewFeatureAction()); |
|
|
|
return actionLabel; |
|
|
|
return actionLabel; |
|
|
|
} |
|
|
|
} |
|
|
@ -701,7 +695,6 @@ public class UpdateMainDialog extends UIDialog { |
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); |
|
|
|
progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); |
|
|
|
UpdateCallBack callBack = new UpdateProgressCallBack(progressBar); |
|
|
|
UpdateCallBack callBack = new UpdateProgressCallBack(progressBar); |
|
|
|
updateButton.setEnabled(false); |
|
|
|
updateButton.setEnabled(false); |
|
|
|
updateLabel.setVisible(false); |
|
|
|
|
|
|
|
RestoreResultDialog.deletePreviousPropertyFile(); |
|
|
|
RestoreResultDialog.deletePreviousPropertyFile(); |
|
|
|
final String installLib = StableUtils.pathJoin(StableUtils.getInstallHome(), ProjectConstants.LOGS_NAME, UpdateConstants.INSTALL_LIB); |
|
|
|
final String installLib = StableUtils.pathJoin(StableUtils.getInstallHome(), ProjectConstants.LOGS_NAME, UpdateConstants.INSTALL_LIB); |
|
|
|
final JFrame frame = DesignerContext.getDesignerFrame(); |
|
|
|
final JFrame frame = DesignerContext.getDesignerFrame(); |
|
|
|