Browse Source

KERNEL-1161 根据要求修改

master
Kalven 5 years ago
parent
commit
67db510afb
  1. 10
      src/main/java/com/fanruan/api/cal/CalculatorKit.java
  2. 16
      src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java
  3. 2
      src/main/java/com/fanruan/api/design/macro/XCreatorConstants.java
  4. 2
      src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java
  5. 19
      src/main/java/com/fanruan/api/util/GeneralKit.java
  6. 13
      src/test/java/com/fanruan/api/util/GeneralKitTest.java

10
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.core.namespace.SimpleCellValueNameSpace;
import com.fr.report.report.Report; import com.fr.report.report.Report;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.script.TreeLayerNameSpace;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.script.CalculatorProvider; import com.fr.stable.script.CalculatorProvider;
import com.fr.stable.script.NameSpace; import com.fr.stable.script.NameSpace;
@ -95,4 +96,13 @@ public class CalculatorKit {
public static NameSpace createSimpleCellValueNameSpace() { public static NameSpace createSimpleCellValueNameSpace() {
return SimpleCellValueNameSpace.getInstance(); return SimpleCellValueNameSpace.getInstance();
} }
/**
* 创建一个计算树状组件的命名空间
* @param layIndexMap 树状组件中的值
* @return 树状组件的命名空间
*/
public static NameSpace createTreeLayerNameSpace(Map layIndexMap) {
return new TreeLayerNameSpace(layIndexMap);
}
} }

16
src/main/java/com/fanruan/api/cal/namespace/TreeLayerNameSpace.java

@ -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);
}
}

2
src/main/java/com/fanruan/api/macro/XCreatorConstants.java → 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的常量 * 存放XCreator的常量

2
src/main/java/com/fanruan/api/design/work/EncoderCellRenderer.java

@ -6,7 +6,7 @@ import com.fr.design.designer.properties.Encoder;
* @author Kalven * @author Kalven
* @version 10.0 * @version 10.0
* Created by Kalven on 2019/9/4 * Created by Kalven on 2019/9/4
* * 根据控件属性渲染单元格
*/ */
public class EncoderCellRenderer extends com.fr.design.mainframe.widget.renderer.EncoderCellRenderer { public class EncoderCellRenderer extends com.fr.design.mainframe.widget.renderer.EncoderCellRenderer {
public EncoderCellRenderer(Encoder encoder) { public EncoderCellRenderer(Encoder encoder) {

19
src/main/java/com/fanruan/api/util/GeneralKit.java

@ -97,24 +97,5 @@ public class GeneralKit {
return FRContext.getLocale(); 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);
}
} }

13
src/test/java/com/fanruan/api/util/GeneralKitTest.java

@ -55,17 +55,4 @@ public class GeneralKitTest extends Prepare {
Assert.assertEquals(GeneralKit.getLocale(), Locale.CHINA); Assert.assertEquals(GeneralKit.getLocale(), Locale.CHINA);
} }
@Test
public void readXMLable() {
try {
XMLableReader xmLableReader = XMLableReader.createXMLableReader("<x>asd<x>");
GeneralKit.readXMLable(xmLableReader);
} catch (Exception e) {
}
}
@Test
public void writeXMLable() {
}
} }
Loading…
Cancel
Save