Browse Source

KERNEL-1117 修改函数名和参数名

pull/1/head
Kalven 5 years ago
parent
commit
2e34e07f24
  1. 2
      src/main/java/com/fanruan/api/cal/ParameterKit.java
  2. 10
      src/main/java/com/fanruan/api/design/DesignKit.java
  3. 7
      src/main/java/com/fanruan/api/design/ui/container/HistoryTemplateListPane.java
  4. 4
      src/test/java/com/fanruan/api/cal/ParameterKitTest.java

2
src/main/java/com/fanruan/api/cal/ParameterKit.java

@ -42,7 +42,7 @@ public class ParameterKit {
* @param name 参数名 * @param name 参数名
* @return 参数对象 * @return 参数对象
*/ */
public static @NotNull ParameterProvider createNewParameter(String name) { public static @NotNull ParameterProvider newParameter(String name) {
return new Parameter(name); return new Parameter(name);
} }

10
src/main/java/com/fanruan/api/design/DesignKit.java

@ -2,9 +2,11 @@ package com.fanruan.api.design;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.JTemplate;
public class DesignKit { public class DesignKit {
/** /**
@ -41,4 +43,12 @@ public class DesignKit {
public static DesignerFrame getDesignerFrame() { public static DesignerFrame getDesignerFrame() {
return DesignerContext.getDesignerFrame(); return DesignerContext.getDesignerFrame();
} }
/**
* 得到当前在修改的模板
* @return 返回当前正在编辑的模板
*/
public static JTemplate<?, ?> getCurrentEditingTemplate(){
return HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
}
} }

7
src/main/java/com/fanruan/api/design/ui/container/HistoryTemplateListPane.java

@ -1,7 +0,0 @@
package com.fanruan.api.design.ui.container;
/**
* 存放历史模板的列表容器
*/
public class HistoryTemplateListPane extends com.fr.design.file.HistoryTemplateListPane {
}

4
src/test/java/com/fanruan/api/cal/ParameterKitTest.java

@ -109,8 +109,8 @@ public class ParameterKitTest extends Prepare {
} }
@Test @Test
public void createNewParameter() { public void newParameter2() {
ParameterProvider provider = ParameterKit.createNewParameter("p1"); ParameterProvider provider = ParameterKit.newParameter("p1");
Assert.assertEquals(provider.getName(),"p1"); Assert.assertEquals(provider.getName(),"p1");
Assert.assertEquals("", provider.getValue()); Assert.assertEquals("", provider.getValue());
} }

Loading…
Cancel
Save