Browse Source

update: 去除不必要的方法。

pull/19/head
zjz1993 5 years ago
parent
commit
e0f727939e
  1. 8
      src/main/java/com/fanruan/api/cal/ParameterKit.java
  2. 17
      src/main/java/com/fanruan/api/design/ui/editor/ValueEditors.java
  3. 13
      src/test/java/com/fanruan/api/cal/ParameterKitTest.java

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

@ -109,12 +109,4 @@ public class ParameterKit {
return ParameterHelper.analyzeAndUnionSameParameters(paramTexts, ps); return ParameterHelper.analyzeAndUnionSameParameters(paramTexts, ps);
} }
/**
* 将ParameterProvider类型数组转换为Parameter类型数组
* @param providers ParameterProvider类型数组
* @return Parameter类型数组
* */
public static Parameter[] providers2Parameter(ParameterProvider[] providers) {
return Parameter.providers2Parameter(providers);
}
} }

17
src/main/java/com/fanruan/api/design/ui/editor/ValueEditors.java

@ -4,7 +4,22 @@ import com.fanruan.api.design.DesignKit;
import com.fanruan.api.design.ui.component.table.model.ParameterTableModel; import com.fanruan.api.design.ui.component.table.model.ParameterTableModel;
import com.fanruan.api.util.StringKit; import com.fanruan.api.util.StringKit;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.design.editor.editor.*; import com.fr.design.editor.editor.BooleanEditor;
import com.fr.design.editor.editor.ColumnRowEditor;
import com.fr.design.editor.editor.ColumnRowGroupEditor;
import com.fr.design.editor.editor.ColumnSelectedEditor;
import com.fr.design.editor.editor.ConstantsEditor;
import com.fr.design.editor.editor.CursorEditor;
import com.fr.design.editor.editor.DateEditor;
import com.fr.design.editor.editor.DoubleEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.editor.editor.IntegerEditor;
import com.fr.design.editor.editor.NoneEditor;
import com.fr.design.editor.editor.ParameterEditor;
import com.fr.design.editor.editor.SpinnerIntegerEditor;
import com.fr.design.editor.editor.TextEditor;
import com.fr.design.editor.editor.WidgetNameEditor;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

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

@ -114,17 +114,4 @@ public class ParameterKitTest extends Prepare {
Assert.assertEquals(provider.getName(),"p1"); Assert.assertEquals(provider.getName(),"p1");
Assert.assertEquals("", provider.getValue()); Assert.assertEquals("", provider.getValue());
} }
@Test
public void providers2Parameter() {
ParameterProvider[] parameters = new ParameterProvider[]{
ParameterKit.newParameter("p1", 100),
ParameterKit.newParameter("p2", 200)
};
Parameter [] result = new Parameter[]{
new Parameter("p1", 100),
new Parameter("p2", 200)
};
Assert.assertEquals(ParameterKit.providers2Parameter(parameters), result);
}
} }
Loading…
Cancel
Save