From d00644216f17cc15d1b50eb71bcffe9a28a191a7 Mon Sep 17 00:00:00 2001 From: Hades Date: Mon, 12 Aug 2019 11:42:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-20267=20=E9=9D=9E=E7=AE=80=E7=B9=81?= =?UTF-8?q?=E8=8B=B1=E6=97=A5=E9=9F=A9=20=E6=B5=B7=E5=A4=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=BB=98=E8=AE=A4=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E9=97=AE=E9=A2=98=20&&=20MOBILE-22490=20=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/DesignerEnvManager.java | 13 ++++++++++++- .../ui/designer/mobile/ParaMobileDefinePane.java | 10 ++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 7370d4d55d..fdb4cb4f5d 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -24,6 +24,7 @@ import com.fr.general.ComparatorUtils; import com.fr.general.FRLogFormatter; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; +import com.fr.general.SupportLocale; import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.LocaleMark; import com.fr.general.xml.GeneralXMLTools; @@ -1316,7 +1317,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { String tmpVal; if ((tmpVal = reader.getElementValue()) != null) { if (!CommonUtils.isNumber(tmpVal)) { - setLanguage(CommonUtils.stringToLocale(tmpVal)); + setLanguage(checkLocale(CommonUtils.stringToLocale(tmpVal))); } else { // 用于兼容10.0之前的版本 int value = Integer.parseInt(tmpVal); @@ -1365,6 +1366,16 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } + /** + * 对国际化进行校验 + * 非简繁英日韩的默认环境 设计器全部默认为英文版本 + * @param locale + * @return + */ + private Locale checkLocale(Locale locale) { + return SupportLocale.getInstance().isSupport(locale) ? locale : Locale.US; + } + private void readReportLengthUnit(XMLableReader reader) { String tmpVal; if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index b924b5c55a..cf909618c4 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java @@ -19,6 +19,7 @@ import com.fr.design.mainframe.MobileWidgetListPane; import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WSortLayout; +import com.fr.general.CloudCenter; import com.fr.general.ComparatorUtils; import com.fr.general.SiteCenter; import com.fr.log.FineLoggerFactory; @@ -87,9 +88,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { double[] rowSize = {p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}}; - if (ExtraReportClassManager.getInstance().getArray(MobileParamStyleProvider.MARK_STRING).size() != 0) { - tipLabel = null; - } else { + if (ExtraReportClassManager.getInstance().getArray(MobileParamStyleProvider.MARK_STRING).isEmpty()) { ((WParameterLayout) (paraCreator.toData())).setProvider((MobileParamStyleProvider) ((Item) paramLocationComboBox.getItemAt(0)).getValue()); } Component[][] components = new Component[][]{ @@ -127,10 +126,9 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { @Override public void mouseClicked(MouseEvent e) { try { - //todo 添加对应插件下载地址 - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("plugin.download"))); + Desktop.getDesktop().browse(new URI(CloudCenter.getInstance().acquireUrlByKind("plugin.mobile.style"))); } catch (Exception exp) { - + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } } @Override