From 67db510afb14fad2c7648860115138650137f83c Mon Sep 17 00:00:00 2001 From: Kalven Date: Thu, 5 Sep 2019 10:06:40 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-1161=20=E6=A0=B9=E6=8D=AE=E8=A6=81?= =?UTF-8?q?=E6=B1=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/api/cal/CalculatorKit.java | 10 ++++++++++ .../api/cal/namespace/TreeLayerNameSpace.java | 16 ---------------- .../{ => design}/macro/XCreatorConstants.java | 2 +- .../api/design/work/EncoderCellRenderer.java | 2 +- .../java/com/fanruan/api/util/GeneralKit.java | 19 ------------------- .../com/fanruan/api/util/GeneralKitTest.java | 13 ------------- 6 files changed, 12 insertions(+), 50 deletions(-) delete mode 100644 src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java rename src/main/java/com/fanruan/api/{ => design}/macro/XCreatorConstants.java (86%) diff --git a/src/main/java/com/fanruan/api/cal/CalculatorKit.java b/src/main/java/com/fanruan/api/cal/CalculatorKit.java index 5cdfb6b..195141d 100644 --- a/src/main/java/com/fanruan/api/cal/CalculatorKit.java +++ b/src/main/java/com/fanruan/api/cal/CalculatorKit.java @@ -8,6 +8,7 @@ import com.fr.data.TableDataSource; import com.fr.report.core.namespace.SimpleCellValueNameSpace; import com.fr.report.report.Report; import com.fr.script.Calculator; +import com.fr.script.TreeLayerNameSpace; import com.fr.stable.StringUtils; import com.fr.stable.script.CalculatorProvider; import com.fr.stable.script.NameSpace; @@ -95,4 +96,13 @@ public class CalculatorKit { public static NameSpace createSimpleCellValueNameSpace() { return SimpleCellValueNameSpace.getInstance(); } + + /** + * 创建一个计算树状组件的命名空间 + * @param layIndexMap 树状组件中的值 + * @return 树状组件的命名空间 + */ + public static NameSpace createTreeLayerNameSpace(Map layIndexMap) { + return new TreeLayerNameSpace(layIndexMap); + } } \ No newline at end of file diff --git a/src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java b/src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java deleted file mode 100644 index 03dd058..0000000 --- a/src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.fanruan.api.cal.namespace; - -import java.util.Map; - -/** - * 树状控件命名空间,存放相关公式和键值对 - * @author Kalven - * @version 10.0 - * Created by Kalven on 2019/9/4 - */ -public class TreeLayerNameSpace extends com.fr.script.TreeLayerNameSpace { - - public TreeLayerNameSpace(Map layIndexMap) { - super(layIndexMap); - } -} diff --git a/src/main/java/com/fanruan/api/macro/XCreatorConstants.java b/src/main/java/com/fanruan/api/design/macro/XCreatorConstants.java similarity index 86% rename from src/main/java/com/fanruan/api/macro/XCreatorConstants.java rename to src/main/java/com/fanruan/api/design/macro/XCreatorConstants.java index 2e99d7f..ea51fa8 100644 --- a/src/main/java/com/fanruan/api/macro/XCreatorConstants.java +++ b/src/main/java/com/fanruan/api/design/macro/XCreatorConstants.java @@ -1,4 +1,4 @@ -package com.fanruan.api.macro; +package com.fanruan.api.design.macro; /** * 存放XCreator的常量 diff --git a/src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java b/src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java index 08ae95a..d5f617c 100644 --- a/src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java +++ b/src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java @@ -6,7 +6,7 @@ import com.fr.design.designer.properties.Encoder; * @author Kalven * @version 10.0 * Created by Kalven on 2019/9/4 - * + * 根据控件属性渲染单元格 */ public class EncoderCellRenderer extends com.fr.design.mainframe.widget.renderer.EncoderCellRenderer { public EncoderCellRenderer(Encoder encoder) { diff --git a/src/main/java/com/fanruan/api/util/GeneralKit.java b/src/main/java/com/fanruan/api/util/GeneralKit.java index b7beed8..60d642b 100644 --- a/src/main/java/com/fanruan/api/util/GeneralKit.java +++ b/src/main/java/com/fanruan/api/util/GeneralKit.java @@ -97,24 +97,5 @@ public class GeneralKit { return FRContext.getLocale(); } - /** - * 从输入源中读取xml - * @param reader 输入源 - * @return xml文件 - */ - public static XMLable readXMLable(XMLableReader reader) { - return GeneralXMLTools.readXMLable(reader); - } - - /** - * 写XMLable - * @param writer 输出源 - * @param xml xml文件 - * @param tagName 标签名 - */ - public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { - GeneralXMLTools.writeXMLable(writer, xml, tagName); - } - } diff --git a/src/test/java/com/fanruan/api/util/GeneralKitTest.java b/src/test/java/com/fanruan/api/util/GeneralKitTest.java index 3de04c5..6ba3bf6 100644 --- a/src/test/java/com/fanruan/api/util/GeneralKitTest.java +++ b/src/test/java/com/fanruan/api/util/GeneralKitTest.java @@ -55,17 +55,4 @@ public class GeneralKitTest extends Prepare { Assert.assertEquals(GeneralKit.getLocale(), Locale.CHINA); } - @Test - public void readXMLable() { - try { - XMLableReader xmLableReader = XMLableReader.createXMLableReader("asd"); - GeneralKit.readXMLable(xmLableReader); - } catch (Exception e) { - - } - } - - @Test - public void writeXMLable() { - } } \ No newline at end of file