diff --git a/build.xml b/build.xml
index 3620cb1..653cfce 100644
--- a/build.xml
+++ b/build.xml
@@ -1,20 +1,20 @@
-
+
+
-
-
+
@@ -30,6 +30,9 @@
+
+
+
@@ -45,7 +48,7 @@
-
+
@@ -60,11 +63,15 @@
target="${target_jdk_version}"
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}"
executable="${compile_jdk_version}/bin/javac">
-
+
+
+
+
+
@@ -81,8 +88,8 @@
-
-
+
+
@@ -94,6 +101,7 @@
+
@@ -107,12 +115,16 @@
+
+
+
+
+
-
-
+
-
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..3385763
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,29 @@
+
+
+ 4.0.0
+
+
+ com.fr.plugin
+ starter
+ 10.0
+
+
+ jar
+ plugin-ztree
+
+
+ ../../../webroot/WEB-INF/plugins/plugin-com.fr.solution.plugin.design.formula.script-1.0/classes
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 8
+
+
+
+
+
\ No newline at end of file
diff --git a/readme.md b/readme.md
index a193ea6..afb2a54 100644
--- a/readme.md
+++ b/readme.md
@@ -7,7 +7,7 @@
三种类型的截图如下
-![widget](screenshots/styles.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/styles.png)
## 控件数据设置方式
**注意:**该控件仅支持手动添加层级的方式作为树的数据
@@ -19,14 +19,14 @@
## 使用方式(示例模板见reportlets目录下的ztree.cpt)
1. 安装插件(安装了插件才能打开ztree.cpt,否则打开会报错,如果要查看使用数据查询的实例,查看ztree4db.cpt,所使用的数据结构在tree.sql中)
2. 打开报表参数界面,可以看到多了一个"ZTree的下拉树"控件
-![widget](screenshots/widget.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/widget.png)
3. 将控件拖到参数界面上,选中该控件可以看到该控件的各种属性,如果需要多选树,把模式属性更改为"多选"即可
-![widget](screenshots/properties.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/properties.png)
4. 点击"数据"项,可以看到点击数据设置的地方
-![widget](screenshots/data_set.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_set.png)
5. 点击上图圆圈的地方,会弹出树控件的数据设置界面,默认会添加一个层级,选择适合的数据字典类型
-![widget](screenshots/data_ui.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_ui.png)
6. 需要添加多层级的时候,点击工具栏上的"添加"图标,如下图示例,添加了4层的树
-![widget](screenshots/data_result.png)
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_result.png)
7. 预览该报表就可以看到下拉树的效果了
-![widget](screenshots/web_ui.png)
\ No newline at end of file
+![widget](src/main/resources/com/fr/plugin/widget/ztree/screenshots/web_ui.png)
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java b/src/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java
deleted file mode 100644
index 1b9d5ef..0000000
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.fr.plugin.widget.ztree.core;
-
-import com.fr.plugin.widget.ztree.tools.ZTreeConstants;
-import com.fr.stable.fun.FunctionHelper;
-import com.fr.stable.fun.impl.AbstractFunctionProcessor;
-
-/**
- * Created by richie on 15/12/2.
- */
-public class ZTreeFunctionProcessor extends AbstractFunctionProcessor {
-
- private static ZTreeFunctionProcessor instance = new ZTreeFunctionProcessor();
-
- public static ZTreeFunctionProcessor getInstance() {
- return instance;
- }
-
- public int getId() {
- return FunctionHelper.generateFunctionID(ZTreeConstants.PLUGIN_ID);
- }
-
- @Override
- public String getLocaleKey() {
- return "Plugin-ZTree_Widget_Name";
- }
-}
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/CssFileLoader.java b/src/main/java/com/fr/plugin/widget/ztree/CssFileLoader.java
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/CssFileLoader.java
rename to src/main/java/com/fr/plugin/widget/ztree/CssFileLoader.java
diff --git a/src/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java b/src/main/java/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java
rename to src/main/java/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java
diff --git a/src/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java b/src/main/java/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java
rename to src/main/java/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTree.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java
similarity index 59%
rename from src/com/fr/plugin/widget/ztree/core/ZTree.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java
index eead773..6d17cc2 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTree.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java
@@ -1,32 +1,39 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.form.ui.CustomWriteAbleRepeatEditor;
-import com.fr.form.ui.DataControl;
-import com.fr.form.ui.WidgetValue;
-import com.fr.general.Inter;
-import com.fr.general.ModuleContext;
-import com.fr.general.xml.GeneralXMLTools;
-import com.fr.json.JSONArray;
-import com.fr.json.JSONException;
-import com.fr.json.JSONObject;
-import com.fr.plugin.ExtraClassManager;
-import com.fr.plugin.PluginLicense;
-import com.fr.plugin.PluginLicenseManager;
-import com.fr.plugin.widget.ztree.tools.ZTreeConstants;
-import com.fr.script.Calculator;
-import com.fr.stable.core.NodeVisitor;
-import com.fr.stable.fun.FunctionProcessor;
-import com.fr.stable.web.Repository;
+import com.fanruan.api.design.DesignKit;
+import com.fanruan.api.net.NetworkKit;
+import com.fanruan.api.report.form.CustomWriteAbleRepeatEditor;
+import com.fanruan.api.runtime.PluginKit;
+import com.fanruan.api.xml.XmlKit;
+
+
+import com.fr.intelli.record.Focus;
+import com.fr.record.analyzer.EnableMetrics;
+import com.fr.stable.fun.FunctionProcessor;//过时
+import com.fr.general.ModuleContext;//过时方法
+
+import com.fr.form.ui.WidgetValue;//DataControl中定义了抽象方法,参数为WidgetValue,无法重写
+import com.fr.json.JSONArray;//抽象方法
+import com.fr.json.JSONException;//抽象方法
+import com.fr.json.JSONObject;//抽象方法
+import com.fr.stable.core.NodeVisitor;//抽象方法
+import com.fr.web.core.TemplateSessionIDInfo;//抽象方法
+
+//open
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader;
-import com.fr.web.core.SessionIDInfor;
-import com.fr.web.utils.WebUtils;
+import com.fr.script.Calculator;
+import com.fr.stable.web.Repository;
+//接口
+import com.fr.form.ui.DataControl;
import javax.servlet.http.HttpServletRequest;
+import com.fr.plugin.ExtraClassManager;
/**
* Created by richie on 15/11/17.
*/
+@EnableMetrics
public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
private WidgetValue widgetValue;
@@ -36,6 +43,16 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
private ZTreeAttr treeAttr = new ZTreeAttr();
+ @Override
+ public String getFormatText() {
+ return null;
+ }
+
+ @Override
+ public String getDataBindDefaultValue(Calculator calculator) {
+ return null;
+ }
+
/**
* 控件初始值的可能类型
*
@@ -103,31 +120,32 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
return "ztree";
}
+
@Override
public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException {
JSONObject conf = super.createJSONConfig(repo, c, toFindChart);
if (treeAttr != null) {
treeAttr.mixConfig(conf);
}
- FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
- if (processor != null) {
- processor.recordFunction(ZTreeFunctionProcessor.getInstance());
- }
+// FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
+// if (processor != null) {
+// processor.recordFunction(ZTreeFunctionProcessor.getInstance());
+// }
return conf;
}
@Override
- public JSONArray createJSONData(SessionIDInfor sessionIDInfor, Calculator c, HttpServletRequest req) throws Exception {
+ public JSONArray createJSONData(TemplateSessionIDInfo sessionIDInfor, Calculator c, HttpServletRequest req) throws Exception {
if (treeNode == null) {
return new JSONArray();
}
- PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(ZTreeConstants.PLUGIN_ID);
- if ((pluginLicense != null && pluginLicense.isAvailable()) || isDesign()) {
- String pv = WebUtils.getHTTPRequestParameter(req, "pv");
- int level = WebUtils.getHTTPRequestIntParameter(req, "level", ZTreeNode.ROOT_LEVEL);
- String text = WebUtils.getHTTPRequestParameter(req, "text");
- String value = WebUtils.getHTTPRequestParameter(req, "value");
- boolean checked = WebUtils.getHTTPRequestBoolParameter(req, "checked");
+// PluginLicense pluginLicense = PluginLicenseManager.getInstance().getPluginLicenseByID(ZTreeConstants.PLUGIN_ID);
+ if ((PluginKit.isCurrentPluginAvailable() || isDesign())) {
+ String pv = NetworkKit.getHTTPRequestParameter(req, "pv");
+ int level = NetworkKit.getHTTPRequestIntParameter(req, "level", ZTreeNode.ROOT_LEVEL);
+ String text = NetworkKit.getHTTPRequestParameter(req, "text");
+ String value = NetworkKit.getHTTPRequestParameter(req, "value");
+ boolean checked = NetworkKit.getHTTPRequestBoolParameter(req, "checked");
ZTreeNode node = treeNode.findNode(level);
if (node != null) {
return node.toJSONArray(c, level, text, value, pv, checked && treeAttr.getCascade().isCascade());
@@ -136,7 +154,7 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
}
} else {
JSONArray errorMsg = new JSONArray();
- errorMsg.put(new JSONObject().put("text", Inter.getLocText("Plugin-ZTree_License_Expired")).put("value", Inter.getLocText("Plugin-ZTree_License_Expired")));
+ errorMsg.put(new JSONObject().put("text", DesignKit.i18nText("Plugin-ZTree_License_Expired")).put("value", DesignKit.i18nText("Plugin-ZTree_License_Expired")));
return errorMsg;
}
}
@@ -153,9 +171,9 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
if (reader.isChildNode()) {
String tagName = reader.getTagName();
if (ZTreeNode.XML_TAG.equals(tagName)) {
- treeNode = (ZTreeNode) GeneralXMLTools.readXMLable(reader);
+ treeNode = (ZTreeNode) XmlKit.readXMLable(reader);
} else if (ZTreeAttr.XML_TAG.equals(tagName)) {
- treeAttr = (ZTreeAttr) GeneralXMLTools.readXMLable(reader);
+ treeAttr = (ZTreeAttr) XmlKit.readXMLable(reader);
}
}
}
@@ -164,10 +182,10 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
public void writeXML(XMLPrintWriter writer) {
super.writeXML(writer);
if (treeNode != null) {
- GeneralXMLTools.writeXMLable(writer, treeNode, ZTreeNode.XML_TAG);
+ XmlKit.writeXMLable(writer, treeNode, ZTreeNode.XML_TAG);
}
if (treeAttr != null) {
- GeneralXMLTools.writeXMLable(writer, treeAttr, ZTreeAttr.XML_TAG);
+ XmlKit.writeXMLable(writer, treeAttr, ZTreeAttr.XML_TAG);
}
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeAttr.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
similarity index 95%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
index 2367a93..488894f 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
@@ -1,11 +1,15 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.json.JSONException;
-import com.fr.json.JSONObject;
+import com.fr.json.JSONException;//抽象
+import com.fr.json.JSONObject;//这个换ZTree也要换,所以不能动
+
+//open
import com.fr.stable.xml.XMLPrintWriter;
-import com.fr.stable.xml.XMLable;
import com.fr.stable.xml.XMLableReader;
+//接口
+import com.fr.stable.xml.XMLable;
+
/**
* Created by richie on 15/11/18.
*/
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeCascade.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
similarity index 83%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
index 56023a0..3db47cf 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
@@ -1,7 +1,7 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.general.ComparatorUtils;
-import com.fr.general.Inter;
+import com.fanruan.api.i18n.I18nKit;
+import com.fanruan.api.util.StringKit;
/**
* Created by richie on 15/12/10.
@@ -21,7 +21,7 @@ public enum ZTreeCascade {
}
public String toLocaleText() {
- return Inter.getLocText(localeKey);
+ return I18nKit.getLocText(localeKey);
}
public String toLocaleKey() {
@@ -39,7 +39,7 @@ public enum ZTreeCascade {
public static ZTreeCascade parser(String type) {
for (ZTreeCascade style : values()) {
- if (ComparatorUtils.equals(type, style.type)) {
+ if (StringKit.equals(type, style.type)) {
return style;
}
}
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeConstants.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeConstants.java
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeConstants.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeConstants.java
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
similarity index 79%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
index 8b2e476..22c013e 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
@@ -1,12 +1,13 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.design.beans.BasicBeanPane;
-import com.fr.design.fun.CellWidgetOptionProvider;
+
+import com.fanruan.api.i18n.I18nKit;
import com.fr.design.fun.impl.AbstractCellWidgetOptionProvider;
-import com.fr.form.ui.Widget;
-import com.fr.general.Inter;
-import com.fr.plugin.widget.ztree.ui.XZTree;
import com.fr.plugin.widget.ztree.ui.ZTreeDefinePane;
+//open
+import com.fr.design.beans.BasicBeanPane;
+
+import com.fr.form.ui.Widget;//抽象
/**
* Created by richie on 15/11/17.
@@ -35,6 +36,6 @@ public class ZTreeMarkInCell extends AbstractCellWidgetOptionProvider {
@Override
public String nameForWidget() {
- return Inter.getLocText("Plugin-ZTree_Widget_Name");
+ return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
similarity index 79%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
index 252fdfb..ef44da1 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
@@ -1,13 +1,12 @@
package com.fr.plugin.widget.ztree.core;
+import com.fanruan.api.i18n.I18nKit;
import com.fr.design.fun.ParameterWidgetOptionProvider;
import com.fr.design.fun.impl.AbstractFormWidgetOptionProvider;
-import com.fr.form.ui.Widget;
-import com.fr.general.Inter;
-import com.fr.plugin.widget.ztree.tools.*;
-import com.fr.plugin.widget.ztree.tools.ZTreeConstants;
import com.fr.plugin.widget.ztree.ui.XZTree;
-import com.fr.stable.fun.Authorize;
+
+//抽象
+import com.fr.form.ui.Widget;
/**
* Created by richie on 15/11/17.
@@ -36,6 +35,6 @@ public class ZTreeMarkInForm extends AbstractFormWidgetOptionProvider implements
@Override
public String nameForWidget() {
- return Inter.getLocText("Plugin-ZTree_Widget_Name");
+ return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeNode.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeNode.java
similarity index 82%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeNode.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeNode.java
index cba8e2d..aab08ed 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeNode.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeNode.java
@@ -1,20 +1,25 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.data.Dictionary;
-import com.fr.general.GeneralUtils;
-import com.fr.general.xml.GeneralXMLTools;
+
+import com.fanruan.api.cal.CalculatorKit;
+import com.fanruan.api.util.GeneralKit;
+import com.fanruan.api.xml.XmlKit;
+import com.fr.plugin.widget.ztree.tools.ZTreeHelper;
+
+//需要用子类传入时用CalculatorProvider出错
+import com.fr.script.Calculator;
+
+//open
+import com.fr.stable.xml.XMLPrintWriter;
+import com.fr.stable.xml.XMLableReader;
+//放下
import com.fr.json.JSONArray;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
-import com.fr.plugin.widget.ztree.tools.ZTreeHelper;
-import com.fr.script.Calculator;
-import com.fr.script.TreeLayerNameSpace;
-import com.fr.stable.StableUtils;
+//接口
+import com.fr.data.Dictionary;
import com.fr.stable.script.NameSpace;
-import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLable;
-import com.fr.stable.xml.XMLableReader;
-import com.fr.web.core.SessionIDInfor;
import java.util.HashMap;
import java.util.Iterator;
@@ -85,11 +90,11 @@ public class ZTreeNode implements XMLable {
if (pv != null) {
String[] parentValues = pv.split("\\$\\$");
for (int i = 0, len = parentValues.length; i < len; i ++) {
- layerMap.put(GeneralUtils.objectToString(i + 1), parentValues[i]);
+ layerMap.put(GeneralKit.objectToString(i + 1), parentValues[i]);
}
}
- layerMap.put(GeneralUtils.objectToString(level + 1), value);
- NameSpace ns = new TreeLayerNameSpace(layerMap);
+ layerMap.put(GeneralKit.objectToString(level + 1), value);
+ NameSpace ns = CalculatorKit.createTreeLayerNameSpace(layerMap);
c.pushNameSpace(ns);
JSONArray data = new JSONArray();
@@ -114,9 +119,9 @@ public class ZTreeNode implements XMLable {
if (reader.isChildNode()) {
String tagName = reader.getTagName();
if (tagName.equals(Dictionary.XML_TAG)) {
- dictionary = (Dictionary) GeneralXMLTools.readXMLable(reader);
+ dictionary = (Dictionary) XmlKit.readXMLable(reader);
} else if (tagName.equals(ZTreeNode.XML_TAG)) {
- child = (ZTreeNode) GeneralXMLTools.readXMLable(reader);
+ child = (ZTreeNode) XmlKit.readXMLable(reader);
}
}
}
@@ -124,10 +129,10 @@ public class ZTreeNode implements XMLable {
@Override
public void writeXML(XMLPrintWriter writer) {
if (dictionary != null) {
- GeneralXMLTools.writeXMLable(writer, dictionary, Dictionary.XML_TAG);
+ XmlKit.writeXMLable(writer, dictionary, Dictionary.XML_TAG);
}
if (child != null) {
- GeneralXMLTools.writeXMLable(writer, child, ZTreeNode.XML_TAG);
+ XmlKit.writeXMLable(writer, child, ZTreeNode.XML_TAG);
}
}
diff --git a/src/com/fr/plugin/widget/ztree/core/ZTreeStyle.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
similarity index 81%
rename from src/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
rename to src/main/java/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
index 99b6bbd..836881f 100644
--- a/src/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
@@ -1,7 +1,7 @@
package com.fr.plugin.widget.ztree.core;
-import com.fr.general.ComparatorUtils;
-import com.fr.general.Inter;
+import com.fanruan.api.i18n.I18nKit;
+import com.fanruan.api.util.StringKit;
/**
* Created by richie on 15/11/18.
@@ -21,7 +21,7 @@ public enum ZTreeStyle {
}
public String toLocaleText() {
- return Inter.getLocText(localeKey);
+ return I18nKit.getLocText(localeKey);
}
public String toLocaleKey() {
@@ -34,7 +34,7 @@ public enum ZTreeStyle {
public static ZTreeStyle parser(String type) {
for (ZTreeStyle style : values()) {
- if (ComparatorUtils.equals(type, style.type)) {
+ if (StringKit.equals(type, style.type)) {
return style;
}
}
diff --git a/src/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java b/src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java
rename to src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java
diff --git a/src/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java b/src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
similarity index 63%
rename from src/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
rename to src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
index 229dd63..c08b373 100644
--- a/src/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
@@ -1,7 +1,7 @@
package com.fr.plugin.widget.ztree.tools;
-import com.fr.stable.ArrayUtils;
-import com.fr.stable.StringUtils;
+import com.fanruan.api.util.ArrayKit;
+import com.fanruan.api.util.StringKit;
/**
* Created by richie on 15/11/18.
@@ -9,13 +9,13 @@ import com.fr.stable.StringUtils;
public class ZTreeHelper {
public static String join(String[] arr, String delimiter) {
- if (ArrayUtils.isEmpty(arr)) {
- return StringUtils.EMPTY;
+ if (ArrayKit.isEmpty(arr)) {
+ return StringKit.EMPTY;
}
StringBuilder sb = new StringBuilder();
- for (int i = 0, len = ArrayUtils.getLength(arr); i < len ; i++) {
+ for (int i = 0, len = ArrayKit.getLength(arr); i < len ; i++) {
String segment = arr[i];
- if (StringUtils.isNotEmpty(segment)) {
+ if (StringKit.isNotEmpty(segment)) {
sb.append(segment);
if (i != len - 1) {
sb.append(delimiter);
diff --git a/src/com/fr/plugin/widget/ztree/ui/XZTree.java b/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java
similarity index 75%
rename from src/com/fr/plugin/widget/ztree/ui/XZTree.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java
index 55f6e55..ed6c2aa 100644
--- a/src/com/fr/plugin/widget/ztree/ui/XZTree.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java
@@ -1,11 +1,17 @@
package com.fr.plugin.widget.ztree.ui;
-import com.fr.design.designer.creator.*;
-import com.fr.design.form.util.XCreatorConstants;
-import com.fr.design.gui.itextfield.UITextField;
-import com.fr.design.layout.FRGUIPaneFactory;
-import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
-import com.fr.general.Inter;
+import com.fanruan.api.design.ui.component.UITextField;
+
+//import com.fr.design.designer.creator.*;
+import com.fanruan.api.design.util.GUICoreKit;
+import com.fanruan.api.design.work.form.creator.XFieldEditor;
+import com.fanruan.api.design.work.form.editor.WidgetValueEditor;
+import com.fanruan.api.design.work.form.macro.XCreatorConstants;
+import com.fanruan.api.i18n.I18nKit;
+import com.fanruan.api.util.ArrayKit;
+import com.fr.design.designer.creator.XLayoutContainer;
+import com.fr.design.designer.creator.XWScaleLayout;
+
import com.fr.plugin.widget.ztree.core.ZTree;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeCascadeEditor;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeModelEditor;
@@ -13,7 +19,10 @@ import com.fr.plugin.widget.ztree.ui.editor.ZTreeStyleEditor;
import com.fr.plugin.widget.ztree.ui.renderer.ZTreeCascadeRenderer;
import com.fr.plugin.widget.ztree.ui.renderer.ZTreeModelRenderer;
import com.fr.plugin.widget.ztree.ui.renderer.ZTreeStyleRenderer;
-import com.fr.stable.ArrayUtils;
+//import com.fr.stable.ArrayUtils;
+
+//有问题
+import com.fr.design.designer.creator.CRPropertyDescriptor;
import javax.swing.*;
import java.awt.*;
@@ -34,30 +43,30 @@ public class XZTree extends XFieldEditor {
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] crp = new CRPropertyDescriptor[]{
new CRPropertyDescriptor("widgetValue", this.toData().getClass()).setI18NName(
- Inter.getLocText("Plugin-ZTree_Widget_Value")).setEditorClass(WidgetValueEditor.class),
+ I18nKit.getLocText("Plugin-ZTree_Widget_Value")).setEditorClass(WidgetValueEditor.class),
new CRPropertyDescriptor("treeNode", this.toData().getClass()).setI18NName(
- Inter.getLocText("Plugin-ZTree_Widget_Data")).setEditorClass(ZTreeModelEditor.class).setRendererClass(
+ I18nKit.getLocText("Plugin-ZTree_Widget_Data")).setEditorClass(ZTreeModelEditor.class).setRendererClass(
ZTreeModelRenderer.class),
new CRPropertyDescriptor("popupHeight", this.data.getClass())
- .setI18NName(Inter.getLocText("Plugin-ZTree_Widget_Popup_Height"))
+ .setI18NName(I18nKit.getLocText("Plugin-ZTree_Widget_Popup_Height"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("selectStyle", this.toData().getClass())
- .setI18NName(Inter.getLocText("Plugin-ZTree_Mode"))
+ .setI18NName(I18nKit.getLocText("Plugin-ZTree_Mode"))
.setEditorClass(ZTreeStyleEditor.class)
.setRendererClass(ZTreeStyleRenderer.class)
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("cascade", this.data.getClass())
- .setI18NName(Inter.getLocText("Plugin-ZTree_Cascade"))
+ .setI18NName(I18nKit.getLocText("Plugin-ZTree_Cascade"))
.setEditorClass(ZTreeCascadeEditor.class)
.setRendererClass(ZTreeCascadeRenderer.class)
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
};
- return (CRPropertyDescriptor[])ArrayUtils.addAll(super.supportedDescriptor(), crp);
+ return (CRPropertyDescriptor[]) ArrayKit.addAll(super.supportedDescriptor(), crp);
}
protected JComponent initEditor() {
if (editor == null) {
- editor = FRGUIPaneFactory.createBorderLayout_S_Pane();
+ editor = GUICoreKit.createBorderLayoutPane();
UITextField textField = new UITextField(5);
textField.setOpaque(false);
editor.add(textField, BorderLayout.CENTER);
diff --git a/src/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java b/src/main/java/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
similarity index 70%
rename from src/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
index 8390056..5b2f282 100644
--- a/src/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
@@ -1,9 +1,8 @@
package com.fr.plugin.widget.ztree.ui;
-import com.fr.design.widget.ui.AbstractDataModify;
-import com.fr.general.Inter;
+import com.fanruan.api.design.work.form.container.AbstractDataModify;
+import com.fanruan.api.i18n.I18nKit;
import com.fr.plugin.widget.ztree.core.ZTree;
-
/**
* Created by richie on 15/11/17.
*/
@@ -20,6 +19,6 @@ public class ZTreeDefinePane extends AbstractDataModify {
@Override
protected String title4PopupWindow() {
- return Inter.getLocText("Plugin-ZTree_Widget_Name");
+ return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}
\ No newline at end of file
diff --git a/src/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java b/src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
similarity index 84%
rename from src/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
index 108fdf8..121b555 100644
--- a/src/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
@@ -1,14 +1,19 @@
package com.fr.plugin.widget.ztree.ui.control;
-import com.fr.base.BaseUtils;
-import com.fr.design.actions.UpdateAction;
+import com.fanruan.api.design.ui.action.UpdateAction;
+import com.fanruan.api.design.ui.component.UIList;
+import com.fanruan.api.design.ui.toolbar.ToolBarDef;
+import com.fanruan.api.design.util.GUICoreKit;
+import com.fanruan.api.i18n.I18nKit;
+import com.fanruan.api.util.IOKit;
+
+import com.fr.plugin.widget.ztree.core.ZTreeNode;
+
+//open
import com.fr.design.dialog.BasicPane;
-import com.fr.design.gui.ilist.UIList;
+
+//com.fr包中方法返回该类,无法封装,父类对象无法赋值给子类
import com.fr.design.gui.itoolbar.UIToolbar;
-import com.fr.design.menu.ToolBarDef;
-import com.fr.design.utils.gui.GUICoreUtils;
-import com.fr.general.Inter;
-import com.fr.plugin.widget.ztree.core.ZTreeNode;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@@ -21,7 +26,7 @@ import java.awt.event.ActionEvent;
*/
public class ZTreeControlPane extends BasicPane {
private static final Dimension N_D = new Dimension(200, 24);
- private static final String LAYER_NAME = Inter.getLocText("Plugin-ZTree_Layer");
+ private static final String LAYER_NAME = I18nKit.getLocText("Plugin-ZTree_Layer");
private ZTreeNodePane treeNodePane;
private DefaultListModel listModel;
@@ -64,7 +69,7 @@ public class ZTreeControlPane extends BasicPane {
});
- JPanel westPane = GUICoreUtils.createBorderLayoutPane(
+ JPanel westPane = GUICoreKit.createBorderLayoutPane(
toolbar, BorderLayout.NORTH,
list, BorderLayout.CENTER
);
@@ -74,7 +79,7 @@ public class ZTreeControlPane extends BasicPane {
treeNodePane = new ZTreeNodePane();
JLabel label = new JLabel();
label.setPreferredSize(N_D);
- add(GUICoreUtils.createBorderLayoutPane(
+ add(GUICoreKit.createBorderLayoutPane(
label, BorderLayout.NORTH,
treeNodePane, BorderLayout.CENTER
), BorderLayout.CENTER);
@@ -135,9 +140,9 @@ public class ZTreeControlPane extends BasicPane {
private class AddNodeAction extends UpdateAction {
public AddNodeAction() {
- this.setName(Inter.getLocText("Plugin-ZTree_Add_Node"));
+ this.setName(I18nKit.getLocText("Plugin-ZTree_Add_Node"));
this.setMnemonic('A');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/plugin/widget/ztree/images/add.png"));
+ this.setSmallIcon(IOKit.readIcon("/com/fr/plugin/widget/ztree/images/add.png"));
}
@Override
@@ -151,9 +156,9 @@ public class ZTreeControlPane extends BasicPane {
private class RemoveNodeAction extends UpdateAction {
public RemoveNodeAction() {
- this.setName(Inter.getLocText("Plugin-ZTree_Remove_Node"));
+ this.setName(I18nKit.getLocText("Plugin-ZTree_Remove_Node"));
this.setMnemonic('R');
- this.setSmallIcon(BaseUtils.readIcon("/com/fr/plugin/widget/ztree/images/remove.png"));
+ this.setSmallIcon(IOKit.readIcon("/com/fr/plugin/widget/ztree/images/remove.png"));
}
@Override
diff --git a/src/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java b/src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
similarity index 85%
rename from src/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
index 2ae87d8..1be9b23 100644
--- a/src/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
@@ -1,11 +1,13 @@
package com.fr.plugin.widget.ztree.ui.control;
-import com.fr.data.Dictionary;
+
+import com.fanruan.api.design.ui.component.present.DictionaryPane;
import com.fr.design.beans.BasicBeanPane;
-import com.fr.design.layout.FRGUIPaneFactory;
-import com.fr.design.present.dict.DictionaryPane;
import com.fr.plugin.widget.ztree.core.ZTreeNode;
+//接口
+import com.fr.data.Dictionary;
+
import java.awt.*;
/**
@@ -20,7 +22,7 @@ public class ZTreeNodePane extends BasicBeanPane {
}
private void initComponents(){
- this.setLayout(FRGUIPaneFactory.createBorderLayout());
+ this.setLayout(new BorderLayout());
dataRadioPane = new DictionaryPane();
this.add(dataRadioPane, BorderLayout.CENTER);
}
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
similarity index 92%
rename from src/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
index 89e7417..b089cd1 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
@@ -1,11 +1,15 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.dialog.BasicDialog;
-import com.fr.design.dialog.DialogActionAdapter;
-import com.fr.design.mainframe.widget.accessibles.UneditableAccessibleEditor;
+
+import com.fanruan.api.design.work.form.basic.UneditableAccessibleEditor;
import com.fr.plugin.widget.ztree.core.ZTreeNode;
import com.fr.plugin.widget.ztree.ui.control.ZTreeControlPane;
+//接口
+import com.fr.design.dialog.DialogActionAdapter;
+//open
+import com.fr.design.dialog.BasicDialog;
+
import javax.swing.*;
/**
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
similarity index 70%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
index 510a825..975cc35 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
@@ -1,8 +1,8 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.designer.properties.items.Item;
-import com.fr.design.mainframe.widget.editors.ItemCellEditor;
-import com.fr.general.Inter;
+import com.fanruan.api.design.work.form.basic.Item;
+import com.fanruan.api.design.work.form.basic.ItemCellEditor;
+import com.fanruan.api.i18n.I18nKit;
import com.fr.plugin.widget.ztree.core.ZTreeCascade;
/**
@@ -21,7 +21,7 @@ public class ZTreeCascadeEditor extends ItemCellEditor {
Item[] items = new Item[len];
for (int i = 0; i < len; i ++) {
ZTreeCascade style = cascades[i];
- items[i] = new Item(Inter.getLocText(style.toLocaleKey()), style);
+ items[i] = new Item(I18nKit.getLocText(style.toLocaleKey()), style);
}
return items;
}
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
similarity index 96%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
index 661c994..6ed6657 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
@@ -1,6 +1,8 @@
package com.fr.plugin.widget.ztree.ui.editor;
+//抽象方法
import com.fr.design.Exception.ValidationException;
+//接口
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
import com.fr.plugin.widget.ztree.core.ZTreeCascade;
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
similarity index 75%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
index 971f345..30a648a 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
@@ -1,6 +1,6 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.mainframe.widget.accessibles.AccessiblePropertyEditor;
+import com.fanruan.api.design.work.form.basic.AccessiblePropertyEditor;
/**
* Created by richie on 15/11/18.
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
similarity index 89%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
index ff5d94b..583398c 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
@@ -1,11 +1,12 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.Exception.ValidationException;
+import com.fanruan.api.util.StringKit;
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
import com.fr.plugin.widget.ztree.core.ZTreeNode;
-import com.fr.stable.StringUtils;
+//抽象
+import com.fr.design.Exception.ValidationException;
/**
* Created by richie on 15/11/18.
*/
@@ -14,7 +15,7 @@ public class ZTreeModelWrapper implements Encoder, Decoder
@Override
public String encode(ZTreeNode v) {
if (v == null) {
- return StringUtils.EMPTY;
+ return StringKit.EMPTY;
}
return "共有" + v.getLevelCount() + "层数据";
}
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
similarity index 70%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
index 6f44ba0..1ab6530 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
@@ -1,8 +1,9 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.designer.properties.items.Item;
-import com.fr.design.mainframe.widget.editors.ItemCellEditor;
-import com.fr.general.Inter;
+
+import com.fanruan.api.design.work.form.basic.Item;
+import com.fanruan.api.design.work.form.basic.ItemCellEditor;
+import com.fanruan.api.i18n.I18nKit;
import com.fr.plugin.widget.ztree.core.ZTreeStyle;
/**
@@ -20,7 +21,7 @@ public class ZTreeStyleEditor extends ItemCellEditor {
Item[] items = new Item[len];
for (int i = 0; i < len; i ++) {
ZTreeStyle style = styles[i];
- items[i] = new Item(Inter.getLocText(style.toLocaleKey()), style);
+ items[i] = new Item(I18nKit.getLocText(style.toLocaleKey()), style);
}
return items;
}
diff --git a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
similarity index 98%
rename from src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
index b8e485a..c0a62af 100644
--- a/src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
@@ -1,10 +1,13 @@
package com.fr.plugin.widget.ztree.ui.editor;
-import com.fr.design.Exception.ValidationException;
+
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
import com.fr.plugin.widget.ztree.core.ZTreeStyle;
+//抽象
+import com.fr.design.Exception.ValidationException;
+
/**
* Created by richie on 15/11/18.
*/
diff --git a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
similarity index 81%
rename from src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
index d9ef0f9..165ed9b 100644
--- a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
@@ -1,6 +1,6 @@
package com.fr.plugin.widget.ztree.ui.renderer;
-import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer;
+import com.fanruan.api.design.work.form.basic.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeCascadeWrapper;
/**
diff --git a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
similarity index 81%
rename from src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
index f3aec1d..3178cc2 100644
--- a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
@@ -1,6 +1,6 @@
package com.fr.plugin.widget.ztree.ui.renderer;
-import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer;
+import com.fanruan.api.design.work.form.basic.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeModelWrapper;
/**
diff --git a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
similarity index 81%
rename from src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
rename to src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
index a11d962..567613b 100644
--- a/src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
+++ b/src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
@@ -1,6 +1,6 @@
package com.fr.plugin.widget.ztree.ui.renderer;
-import com.fr.design.mainframe.widget.renderer.EncoderCellRenderer;
+import com.fanruan.api.design.work.form.basic.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeStyleWrapper;
/**
diff --git a/src/com/fr/plugin/widget/ztree/images/add.png b/src/main/resources/com/fr/plugin/widget/ztree/images/add.png
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/images/add.png
rename to src/main/resources/com/fr/plugin/widget/ztree/images/add.png
diff --git a/src/com/fr/plugin/widget/ztree/images/drop_down_tree.png b/src/main/resources/com/fr/plugin/widget/ztree/images/drop_down_tree.png
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/images/drop_down_tree.png
rename to src/main/resources/com/fr/plugin/widget/ztree/images/drop_down_tree.png
diff --git a/src/com/fr/plugin/widget/ztree/images/remove.png b/src/main/resources/com/fr/plugin/widget/ztree/images/remove.png
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/images/remove.png
rename to src/main/resources/com/fr/plugin/widget/ztree/images/remove.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css b/src/main/resources/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/2.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/2.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/2.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/2.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/3.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/3.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/3.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/3.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/4.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/4.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/4.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/4.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/5.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/5.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/5.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/5.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/6.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/6.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/6.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/6.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/7.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/7.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/7.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/7.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/8.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/8.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/8.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/8.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/diy/9.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/9.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/diy/9.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/9.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/line_conn.gif b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/line_conn.gif
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/line_conn.gif
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/line_conn.gif
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/loading.gif b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/loading.gif
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/loading.gif
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/loading.gif
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif
diff --git a/src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png b/src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png
diff --git a/src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js b/src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js
diff --git a/src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js b/src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js
diff --git a/src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js b/src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js
diff --git a/src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js b/src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js
diff --git a/src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js b/src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js
old mode 100755
new mode 100644
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js
rename to src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js
diff --git a/src/com/fr/plugin/widget/ztree/locale/ztree.properties b/src/main/resources/com/fr/plugin/widget/ztree/locale/ztree.properties
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/locale/ztree.properties
rename to src/main/resources/com/fr/plugin/widget/ztree/locale/ztree.properties
diff --git a/src/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties b/src/main/resources/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties
rename to src/main/resources/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties
diff --git a/screenshots/check.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/check.png
similarity index 100%
rename from screenshots/check.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/check.png
diff --git a/screenshots/data_result.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_result.png
similarity index 100%
rename from screenshots/data_result.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_result.png
diff --git a/screenshots/data_set.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_set.png
similarity index 100%
rename from screenshots/data_set.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_set.png
diff --git a/screenshots/data_ui.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_ui.png
similarity index 100%
rename from screenshots/data_ui.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_ui.png
diff --git a/screenshots/properties.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/properties.png
similarity index 100%
rename from screenshots/properties.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/properties.png
diff --git a/screenshots/radio.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/radio.png
similarity index 100%
rename from screenshots/radio.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/radio.png
diff --git a/screenshots/styles.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/styles.png
similarity index 100%
rename from screenshots/styles.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/styles.png
diff --git a/screenshots/web_ui.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/web_ui.png
similarity index 100%
rename from screenshots/web_ui.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/web_ui.png
diff --git a/screenshots/widget.png b/src/main/resources/com/fr/plugin/widget/ztree/screenshots/widget.png
similarity index 100%
rename from screenshots/widget.png
rename to src/main/resources/com/fr/plugin/widget/ztree/screenshots/widget.png
diff --git a/src/com/fr/plugin/widget/ztree/web/widget.ztree.css b/src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.css
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/web/widget.ztree.css
rename to src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.css
diff --git a/src/com/fr/plugin/widget/ztree/web/widget.ztree.js b/src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.js
similarity index 100%
rename from src/com/fr/plugin/widget/ztree/web/widget.ztree.js
rename to src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.js