From 80679d363422359b0bd28d585208d7a45176fc89 Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 10:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E8=A6=81=E6=B1=82=E5=A2=9E=E6=B7=BB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/Formula/BaseFormula.java | 12 ++++++ .../design/ui/layout/FRGUIPaneFactoryKit.java | 40 +++++++++++++++++++ .../fanruan/api/macro/XCreatorConstants.java | 12 ++++++ .../fanruan/api/report/form/WidgetName.java | 9 +++++ .../java/com/fanruan/api/util/CodeKit.java | 10 +++++ src/main/java/com/fanruan/api/xml/XmlKit.java | 13 +++++- .../com/fanruan/api/util/CodeKitTest.java | 11 +++++ 7 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/fanruan/api/Formula/BaseFormula.java create mode 100644 src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java create mode 100644 src/main/java/com/fanruan/api/macro/XCreatorConstants.java create mode 100644 src/main/java/com/fanruan/api/report/form/WidgetName.java diff --git a/src/main/java/com/fanruan/api/Formula/BaseFormula.java b/src/main/java/com/fanruan/api/Formula/BaseFormula.java new file mode 100644 index 0000000..a97da3a --- /dev/null +++ b/src/main/java/com/fanruan/api/Formula/BaseFormula.java @@ -0,0 +1,12 @@ +package com.fanruan.api.Formula; + +/** + * @author Palin + * @version 10.0 + * Created by Palin on 2019/9/16 0016 + */ +public abstract class BaseFormula extends com.fr.base.BaseFormula{ + public BaseFormula(String var1) { + this.content = var1; + } +} diff --git a/src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java b/src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java new file mode 100644 index 0000000..3a657d7 --- /dev/null +++ b/src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java @@ -0,0 +1,40 @@ +package com.fanruan.api.design.ui.layout; + +import com.fr.design.layout.FRGUIPaneFactory; +import javax.swing.JPanel; +import java.awt.LayoutManager; +import java.awt.FlowLayout; +import java.awt.BorderLayout; + +/** + * @author Palin + * @version 10.0 + * Created by Palin on 2019/9/16 0016 + */ +public class FRGUIPaneFactoryKit { + + /** + * 创建边框 + */ + public static LayoutManager createBorderLayout() { + return new BorderLayout(); + } + + /** + * 创建边框布局框格 + */ + public static JPanel createBorderLayout_S_Pane() { + JPanel var0 = new JPanel(); + var0.setLayout(createBorderLayout()); + return var0; + } + + /** + * 创建普通流内部容器框格 + */ + public static JPanel createNormalFlowInnerContainer_S_Pane() { + JPanel var0 = new JPanel(); + var0.setLayout(new FlowLayout(0)); + return var0; + } +} diff --git a/src/main/java/com/fanruan/api/macro/XCreatorConstants.java b/src/main/java/com/fanruan/api/macro/XCreatorConstants.java new file mode 100644 index 0000000..242b24c --- /dev/null +++ b/src/main/java/com/fanruan/api/macro/XCreatorConstants.java @@ -0,0 +1,12 @@ +package com.fanruan.api.macro; + +/** + * @author Palin + * @version 10.0 + * Created by Palin on 2019/9/16 0016 + * 常量 + */ +public class XCreatorConstants { + public static final String PROPERTY_CATEGORY = "category"; + +} diff --git a/src/main/java/com/fanruan/api/report/form/WidgetName.java b/src/main/java/com/fanruan/api/report/form/WidgetName.java new file mode 100644 index 0000000..5881e70 --- /dev/null +++ b/src/main/java/com/fanruan/api/report/form/WidgetName.java @@ -0,0 +1,9 @@ +package com.fanruan.api.report.form; + +/** + * @author Palin + * @version 10.0 + * Created by Palin on 2019/9/13 0013 + */ +public class WidgetName extends com.fr.stable.js.WidgetName{ +} diff --git a/src/main/java/com/fanruan/api/util/CodeKit.java b/src/main/java/com/fanruan/api/util/CodeKit.java index 5c89421..0e1b128 100644 --- a/src/main/java/com/fanruan/api/util/CodeKit.java +++ b/src/main/java/com/fanruan/api/util/CodeKit.java @@ -22,4 +22,14 @@ public class CodeKit { public static String cjkDecode(String text) throws Exception { return CodeUtils.cjkDecode(text); } + + /** + * 将经过处理的中日韩文字符串解码成原先的中日韩文 + * @param text 经过处理的中日韩文字 + * @return 中日韩文字 + * @throws Exception + */ + public static String encodeURIComponent(String text) { + return CommonCodeUtils.encodeURIComponent(text); + } } diff --git a/src/main/java/com/fanruan/api/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index dc2cfc1..8b04292 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -61,6 +61,7 @@ public class XmlKit { /** * 从xml中读取数据连接对象 + * * @param reader xml读取器 * @return 数据连接对象 */ @@ -79,7 +80,8 @@ public class XmlKit { } /** - *读出xml参数 + * 读出xml参数 + * * @param reader xml读出对象 * @return 返回保存参数数组 */ @@ -87,4 +89,13 @@ public class XmlKit { return StableXMLUtils.readParameter(reader); } + /** + * 读出xml参数 + * + * @param writer xml读出对象 + * @return 返回保存参数数组 + */ + public static void writeParameters(XMLPrintWriter writer, ParameterProvider[] parameter) { + writer.startTAG("Parameters"); + } } diff --git a/src/test/java/com/fanruan/api/util/CodeKitTest.java b/src/test/java/com/fanruan/api/util/CodeKitTest.java index 5224324..5c07d12 100644 --- a/src/test/java/com/fanruan/api/util/CodeKitTest.java +++ b/src/test/java/com/fanruan/api/util/CodeKitTest.java @@ -21,6 +21,17 @@ public class CodeKitTest { Assert.assertTrue(s.equals(decode)); } catch (Exception e) { + } + } + public void encodeURIComponent() { + String s = "中文 한글 日本語"; + String encode = CodeUtils.encodeURIComponent(s); + + try { + String decode = CodeKit.encodeURIComponent(encode); + Assert.assertTrue(s.equals(decode)); + } catch (Exception e) { + } } }