From 80679d363422359b0bd28d585208d7a45176fc89 Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 10:34:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8C=89=E8=A6=81=E6=B1=82=E5=A2=9E?= =?UTF-8?q?=E6=B7=BB=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) { + } } } From 9a3d0aed7dc703579892d6d27b88744187e7c5be Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 10:54:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/com/fanruan/api/util/CodeKitTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/fanruan/api/util/CodeKitTest.java b/src/test/java/com/fanruan/api/util/CodeKitTest.java index 5c07d12..af99858 100644 --- a/src/test/java/com/fanruan/api/util/CodeKitTest.java +++ b/src/test/java/com/fanruan/api/util/CodeKitTest.java @@ -23,8 +23,10 @@ public class CodeKitTest { } } + + @Test public void encodeURIComponent() { - String s = "中文 한글 日本語"; + String s = "123"; String encode = CodeUtils.encodeURIComponent(s); try { From 755cc2909d2353ff012e1ebc86f94aa9d6389f23 Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 10:57:42 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fanruan/api/util/CodeKit.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fanruan/api/util/CodeKit.java b/src/main/java/com/fanruan/api/util/CodeKit.java index 0e1b128..84f6e45 100644 --- a/src/main/java/com/fanruan/api/util/CodeKit.java +++ b/src/main/java/com/fanruan/api/util/CodeKit.java @@ -24,9 +24,9 @@ public class CodeKit { } /** - * 将经过处理的中日韩文字符串解码成原先的中日韩文 - * @param text 经过处理的中日韩文字 - * @return 中日韩文字 + * 将经过处理字符串解码成原先字符串 + * @param text 经过处理的字符串 + * @return 字符串 * @throws Exception */ public static String encodeURIComponent(String text) { From e76d14bd1d6674a48cfd8e5bab5c0214888e5833 Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 15:35:19 +0800 Subject: [PATCH 4/5] =?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/report/form/WidgetName.java | 9 ----- src/main/java/com/fanruan/api/xml/XmlKit.java | 4 +- 4 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/Formula/BaseFormula.java delete mode 100644 src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java delete 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 deleted file mode 100644 index a97da3a..0000000 --- a/src/main/java/com/fanruan/api/Formula/BaseFormula.java +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 3a657d7..0000000 --- a/src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java +++ /dev/null @@ -1,40 +0,0 @@ -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/report/form/WidgetName.java b/src/main/java/com/fanruan/api/report/form/WidgetName.java deleted file mode 100644 index 5881e70..0000000 --- a/src/main/java/com/fanruan/api/report/form/WidgetName.java +++ /dev/null @@ -1,9 +0,0 @@ -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/xml/XmlKit.java b/src/main/java/com/fanruan/api/xml/XmlKit.java index 8b04292..9d74d58 100644 --- a/src/main/java/com/fanruan/api/xml/XmlKit.java +++ b/src/main/java/com/fanruan/api/xml/XmlKit.java @@ -91,11 +91,9 @@ public class XmlKit { /** * 读出xml参数 - * * @param writer xml读出对象 - * @return 返回保存参数数组 */ public static void writeParameters(XMLPrintWriter writer, ParameterProvider[] parameter) { - writer.startTAG("Parameters"); + StableXMLUtils.writeParameters(writer,parameter); } } From 1076d141f5336629a997f5fd7c7b3387d232bc59 Mon Sep 17 00:00:00 2001 From: Palin Date: Mon, 16 Sep 2019 15:39:30 +0800 Subject: [PATCH 5/5] =?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/macro/XCreatorConstants.java | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/macro/XCreatorConstants.java diff --git a/src/main/java/com/fanruan/api/macro/XCreatorConstants.java b/src/main/java/com/fanruan/api/macro/XCreatorConstants.java deleted file mode 100644 index 242b24c..0000000 --- a/src/main/java/com/fanruan/api/macro/XCreatorConstants.java +++ /dev/null @@ -1,12 +0,0 @@ -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"; - -}