Browse Source

KERNEL-1198 JSON插件第一波FineKit提交。

pull/1/head
Mars.Ma 5 years ago
parent
commit
64ea8befd0
  1. 4
      src/main/java/com/fanruan/api/cal/Parameter.java
  2. 9
      src/main/java/com/fanruan/api/data/TableDataKit.java
  3. 11
      src/main/java/com/fanruan/api/data/impl/NameDatabaseConnection.java
  4. 17
      src/main/java/com/fanruan/api/design/ui/component/UITableEditorPane.java
  5. 10
      src/main/java/com/fanruan/api/design/ui/container/AbstractTableDataPane.java
  6. 11
      src/main/java/com/fanruan/api/design/ui/container/UISQLEditPane.java
  7. 19
      src/main/java/com/fanruan/api/util/TemplateKit.java

4
src/main/java/com/fanruan/api/cal/Parameter.java

@ -0,0 +1,4 @@
package com.fanruan.api.cal;
public class Parameter extends com.fr.base.Parameter {
}

9
src/main/java/com/fanruan/api/data/TableDataKit.java

@ -3,6 +3,7 @@ package com.fanruan.api.data;
import com.fr.base.TableData;
import com.fr.data.TableDataSource;
import com.fr.data.api.TableDataAssist;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.file.TableDataConfig;
import com.fr.script.Calculator;
import com.fr.stable.script.CalculatorProvider;
@ -74,4 +75,12 @@ public class TableDataKit {
public static void renameTableData(@NotNull String oldName, @NotNull String newName) {
TableDataConfig.getInstance().renameTableData(oldName, newName);
}
/**
* 直接预览数据集没有实际值和显示值
* @param tableData 数据集
*/
public static void previewTableData(TableData tableData) {
PreviewTablePane.previewTableData(tableData);
}
}

11
src/main/java/com/fanruan/api/data/impl/NameDatabaseConnection.java

@ -0,0 +1,11 @@
package com.fanruan.api.data.impl;
/**
* 列表数据连接组件
*/
public class NameDatabaseConnection extends com.fr.data.impl.NameDatabaseConnection {
public NameDatabaseConnection() { super();}
public NameDatabaseConnection(String name) {
super(name);
}
}

17
src/main/java/com/fanruan/api/design/ui/component/UITableEditorPane.java

@ -0,0 +1,17 @@
package com.fanruan.api.design.ui.component;
import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
/**
* 表格编辑面板
* @param <T>
*/
public class UITableEditorPane<T> extends com.fr.design.gui.itableeditorpane.UITableEditorPane<T> {
public UITableEditorPane(UITableModelAdapter<T> model){
super(model);
}
public UITableEditorPane(UITableModelAdapter<T> model, String string){
super(model, string);
}
}

10
src/main/java/com/fanruan/api/design/ui/container/AbstractTableDataPane.java

@ -0,0 +1,10 @@
package com.fanruan.api.design.ui.container;
import com.fr.base.TableData;
/**
* 表格面板
* @param <T>
*/
public abstract class AbstractTableDataPane<T extends TableData> extends com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane<T> {
}

11
src/main/java/com/fanruan/api/design/ui/container/UISQLEditPane.java

@ -0,0 +1,11 @@
package com.fanruan.api.design.ui.container;
/**
* SQL编辑面板
*/
public class UISQLEditPane extends com.fr.design.data.datapane.sqlpane.SQLEditPane {
public UISQLEditPane(){ super();}
public UISQLEditPane(boolean bool) {
super(bool);
}
}

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

@ -0,0 +1,19 @@
package com.fanruan.api.util;
import com.fr.base.TemplateUtils;
import java.util.Map;
public class TemplateKit {
/**
* 根据参数, 来计算文档字符串
* @param tpl 文档来源
* @param context 参数map
* @return 计算后结果
* @throws Exception
*/
public static String renderParameter4Tpl(String tpl, Map context) throws Exception {
return TemplateUtils.renderParameter4Tpl(tpl, context);
}
}
Loading…
Cancel
Save