|
|
|
@ -11,8 +11,10 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.GeneralUtils; |
|
|
|
|
import com.fr.locale.InterProviderFactory; |
|
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
@ -36,12 +38,14 @@ public class AboutPane extends JPanel {
|
|
|
|
|
private static final String BUILD_PREFIX = " "; |
|
|
|
|
private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("help.compNo"); |
|
|
|
|
private static final String PRESIDENT_PHONE = CloudCenter.getInstance().acquireUrlByKind("help.PNo"); |
|
|
|
|
private static final String LEFT_BRACKET = "("; |
|
|
|
|
private static final String RIGHT_BRACKET = ")"; |
|
|
|
|
|
|
|
|
|
private int maxWidth; |
|
|
|
|
|
|
|
|
|
public AboutPane() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
this.maxWidth = GraphHelper.getWidth(getBuildTitle() + GeneralUtils.readFullBuildNO() + |
|
|
|
|
this.maxWidth = GraphHelper.getWidth(getBuildTitle() + getVersionBuildNO() + |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO") + |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO_OK")); |
|
|
|
|
//center panel
|
|
|
|
@ -53,7 +57,7 @@ public class AboutPane extends JPanel {
|
|
|
|
|
|
|
|
|
|
BoxCenterAlignmentCopyablePane buildCopyPane = new BoxCenterAlignmentCopyablePane( |
|
|
|
|
getBuildTitle(), |
|
|
|
|
GeneralUtils.readFullBuildNO(), |
|
|
|
|
getVersionBuildNO(), |
|
|
|
|
new String[]{ |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO"), |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Copy_Build_NO_OK") |
|
|
|
@ -95,6 +99,15 @@ public class AboutPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getVersionBuildNO() { |
|
|
|
|
String version = GeneralUtils.getVersion(); |
|
|
|
|
String build = GeneralUtils.readFullBuildNO(); |
|
|
|
|
String notInstalledVersion = InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build"); |
|
|
|
|
if (ComparatorUtils.equals(notInstalledVersion, build)) |
|
|
|
|
return notInstalledVersion; |
|
|
|
|
return version + LEFT_BRACKET + build + RIGHT_BRACKET; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
return new Dimension(this.maxWidth, super.getPreferredSize().height); |
|
|
|
|