Browse Source

按要求增添修改

master
Palin 5 years ago
parent
commit
80679d3634
  1. 12
      src/main/java/com/fanruan/api/Formula/BaseFormula.java
  2. 40
      src/main/java/com/fanruan/api/design/ui/layout/FRGUIPaneFactoryKit.java
  3. 12
      src/main/java/com/fanruan/api/macro/XCreatorConstants.java
  4. 9
      src/main/java/com/fanruan/api/report/form/WidgetName.java
  5. 10
      src/main/java/com/fanruan/api/util/CodeKit.java
  6. 13
      src/main/java/com/fanruan/api/xml/XmlKit.java
  7. 11
      src/test/java/com/fanruan/api/util/CodeKitTest.java

12
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;
}
}

40
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;
}
}

12
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";
}

9
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{
}

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

13
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");
}
}

11
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) {
}
}
}

Loading…
Cancel
Save