Browse Source

KERNEL-1161 更改目录结构,同时使之与fineKit适配

master
Kalven 5 years ago
parent
commit
f79e7735e9
  1. 32
      build.xml
  2. 58
      plugin-ztree.iml
  3. 29
      pom.xml
  4. 14
      readme.md
  5. 0
      src/main/java/com/fr/plugin/widget/ztree/CssFileLoader.java
  6. 0
      src/main/java/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java
  7. 0
      src/main/java/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java
  8. 78
      src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java
  9. 10
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeAttr.java
  10. 8
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeCascade.java
  11. 0
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeConstants.java
  12. 7
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java
  13. 15
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java
  14. 13
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java
  15. 39
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeNode.java
  16. 8
      src/main/java/com/fr/plugin/widget/ztree/core/ZTreeStyle.java
  17. 0
      src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java
  18. 12
      src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java
  19. 34
      src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java
  20. 7
      src/main/java/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java
  21. 33
      src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java
  22. 10
      src/main/java/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java
  23. 10
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java
  24. 8
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java
  25. 2
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java
  26. 2
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java
  27. 7
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java
  28. 8
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java
  29. 5
      src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java
  30. 2
      src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java
  31. 2
      src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java
  32. 2
      src/main/java/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java
  33. 0
      src/main/resources/com/fr/plugin/widget/ztree/images/add.png
  34. 0
      src/main/resources/com/fr/plugin/widget/ztree/images/drop_down_tree.png
  35. 0
      src/main/resources/com/fr/plugin/widget/ztree/images/remove.png
  36. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css
  37. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png
  38. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png
  39. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/2.png
  40. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/3.png
  41. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/4.png
  42. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/5.png
  43. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/6.png
  44. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/7.png
  45. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/8.png
  46. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/9.png
  47. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/line_conn.gif
  48. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/loading.gif
  49. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif
  50. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png
  51. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js
  52. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js
  53. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js
  54. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js
  55. 0
      src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js
  56. 0
      src/main/resources/com/fr/plugin/widget/ztree/locale/ztree.properties
  57. 0
      src/main/resources/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties
  58. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/check.png
  59. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_result.png
  60. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_set.png
  61. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_ui.png
  62. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/properties.png
  63. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/radio.png
  64. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/styles.png
  65. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/web_ui.png
  66. 0
      src/main/resources/com/fr/plugin/widget/ztree/screenshots/widget.png
  67. 0
      src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.css
  68. 0
      src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.js

32
build.xml

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="jar" name="plugin">
<!-- JDK路径,根据自己机器上实际位置修改-->
<property name="jdk.home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home"/>
<property name="jdk.home" value="C:\Program Files\Java\jdk1.8.0_211"/>
<property name="libs" value="${basedir}/lib"/>
<property name="publicLibs" value=""/>
<property name="reportLibs" value="${basedir}/../webroot/WEB-INF/lib"/>
<property name="destLoc" value="."/>
<property name="classes" value="classes"/>
<xmlproperty file="${basedir}/plugin.xml"/>
<property name="current-version" value="${plugin.version}"/>
<!-- 插件版本-->
<property name="plugin-version" value="${current-version}"/>
<!-- 插件名字-->
<property name="plugin-name" value="ztree"/>
<property name="plugin-name" value="function-test"/>
<property name="plugin-jar" value="fr-plugin-${plugin-name}-${plugin-version}.jar"/>
<target name="prepare">
@ -30,6 +30,9 @@
<fileset dir="${publicLibs}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${reportLibs}">
<include name="**/*.jar"/>
</fileset>
</path>
<patternset id="resources4Jar">
<exclude name="**/.settings/**"/>
@ -45,7 +48,7 @@
<echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/>
<delete dir="tmp"/>
<copy todir="tmp">
<fileset dir="${resources_from}\src">
<fileset dir="${resources_from}/src/main/resources">
<patternset refid="resources4Jar"/>
</fileset>
</copy>
@ -60,11 +63,15 @@
target="${target_jdk_version}"
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}"
executable="${compile_jdk_version}/bin/javac">
<src path="${basedir}/src"/>
<src path="${basedir}/src/main/java"/>
<exclude name="**/.svn/**"/>
<compilerarg line="-encoding UTF8 "/>
<classpath refid="compile.classpath"/>
</javac>
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask">
<classpath refid="compile.classpath"/>
</taskdef>
<pretreatment baseDir="${basedir}"/>
</target>
<target name="jar_classes">
@ -81,8 +88,8 @@
<param name="resources_from" value="${basedir}"/>
</antcall>
<antcall target="compile_javas">
<param name="source_jdk_version" value="1.6"/>
<param name="target_jdk_version" value="1.6"/>
<param name="source_jdk_version" value="1.8"/>
<param name="target_jdk_version" value="1.8"/>
<param name="compile_jdk_version" value="${jdk.home}"/>
<param name="compile_files" value="${basedir}/src"/>
</antcall>
@ -94,6 +101,7 @@
<delete dir="${classes}"/>
</target>
<target name="jar" depends="super_jar">
<antcall target="zip"/>
</target>
@ -107,12 +115,16 @@
<include name="${plugin-jar}"/>
<include name="plugin.xml"/>
</fileset>
<fileset dir="${libs}">
<include name="*.jar"/>
<include name="*.dll"/>
</fileset>
</copy>
<zip destfile="${basedir}/${plugin-folder}.zip" basedir=".">
<include name="${plugin-folder}/*.jar"/>
<include name="${plugin-folder}/*.dll"/>
<include name="${plugin-folder}/plugin.xml"/>
</zip>
<xmlproperty file="${basedir}/plugin.xml"/>
<move file="${plugin-folder}.zip" todir="${destLoc}/${plugin.name}"/>
<move file="${plugin-folder}.zip" todir="${destLoc}/install"/>
</target>
</project>
</project>

58
plugin-ztree.iml

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://D:/webroot/WEB-INF/plugins/plugin-com.fr.solution.plugin.design.formula.script-1.0/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.fr.third:fine-third:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.activator:fine-activator:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.core:fine-core:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.17" level="project" />
<orderEntry type="library" name="Maven: com.fr.webui:fine-webui:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.datasource:fine-datasource:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision-report:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule-report:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-swift:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fineio:fineio:2.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.third.server:servlet-api:3.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-accumulator:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-engine:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-designer:10.0-FEATURE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: io.socket:socket.io-client:0.7.0" level="project" />
<orderEntry type="library" name="Maven: io.socket:engine.io-client:0.7.0" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp-ws:3.0.1" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.0.1" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.6.0" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.6.9" level="project" />
<orderEntry type="library" name="Maven: org.swingexplorer:swexpl:2.0" level="project" />
<orderEntry type="library" name="Maven: org.swingexplorer:swag:1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-catalina:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-servlet-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jsp-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-el-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jni:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-coyote:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util-scan:8.5.32" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jaspic-api:8.5.32" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.44" level="project" />
<orderEntry type="library" name="Maven: com.fr.third:jxbrowser:6.23.1" level="project" />
<orderEntry type="library" name="Maven: com.fr.third:jxbrowser-mac:6.23.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.easymock:easymock:3.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
</component>
</module>

29
pom.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.fr.plugin</groupId>
<artifactId>starter</artifactId>
<version>10.0</version>
</parent>
<packaging>jar</packaging>
<artifactId>plugin-ztree</artifactId>
<build>
<!---如果要更改调试插件,改这里的配置就可以了-->
<outputDirectory>../../../webroot/WEB-INF/plugins/plugin-com.fr.solution.plugin.design.formula.script-1.0/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

14
readme.md

@ -7,7 +7,7 @@
三种类型的截图如下
![widget](screenshots/styles.png)
![widget](src/main/resource/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/resource/screenshots/widget.png)
3. 将控件拖到参数界面上,选中该控件可以看到该控件的各种属性,如果需要多选树,把模式属性更改为"多选"即可
![widget](screenshots/properties.png)
![widget](src/main/resource/screenshots/properties.png)
4. 点击"数据"项,可以看到点击数据设置的地方
![widget](screenshots/data_set.png)
![widget](src/main/resource/screenshots/data_set.png)
5. 点击上图圆圈的地方,会弹出树控件的数据设置界面,默认会添加一个层级,选择适合的数据字典类型
![widget](screenshots/data_ui.png)
![widget](src/main/resource/screenshots/data_ui.png)
6. 需要添加多层级的时候,点击工具栏上的"添加"图标,如下图示例,添加了4层的树
![widget](screenshots/data_result.png)
![widget](src/main/resource/screenshots/data_result.png)
7. 预览该报表就可以看到下拉树的效果了
![widget](screenshots/web_ui.png)
![widget](src/main/resource/screenshots/web_ui.png)

0
src/com/fr/plugin/widget/ztree/CssFileLoader.java → src/main/java/com/fr/plugin/widget/ztree/CssFileLoader.java

0
src/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java → src/main/java/com/fr/plugin/widget/ztree/JavaScriptFileLoader.java

0
src/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java → src/main/java/com/fr/plugin/widget/ztree/ZTreeLocaleFinder.java

78
src/com/fr/plugin/widget/ztree/core/ZTree.java → src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java

@ -1,28 +1,32 @@
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.design.ui.editor.CustomWriteAbleRepeatEditor;
import com.fanruan.api.net.NetworkKit;
import com.fanruan.api.runtime.PluginKit;
import com.fanruan.api.xml.XmlKit;
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.
@ -36,6 +40,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;
}
/**
* 控件初始值的可能类型
*
@ -117,17 +131,17 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl {
}
@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 +150,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 +167,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 +178,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);
}
}
}

10
src/com/fr/plugin/widget/ztree/core/ZTreeAttr.java → 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.
*/

8
src/com/fr/plugin/widget/ztree/core/ZTreeCascade.java → 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;
}
}

0
src/com/fr/plugin/widget/ztree/core/ZTreeConstants.java → src/main/java/com/fr/plugin/widget/ztree/core/ZTreeConstants.java

7
src/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java → src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java

@ -1,8 +1,9 @@
package com.fr.plugin.widget.ztree.core;
import com.fanruan.api.function.FunctionKit;
import com.fr.plugin.widget.ztree.tools.ZTreeConstants;
import com.fr.stable.fun.FunctionHelper;
import com.fr.stable.fun.impl.AbstractFunctionProcessor;
import com.fr.stable.fun.impl.AbstractFunctionProcessor;//废弃
/**
* Created by richie on 15/12/2.
@ -16,7 +17,7 @@ public class ZTreeFunctionProcessor extends AbstractFunctionProcessor {
}
public int getId() {
return FunctionHelper.generateFunctionID(ZTreeConstants.PLUGIN_ID);
return FunctionKit.generateFunctionID(ZTreeConstants.PLUGIN_ID);
}
@Override

15
src/com/fr/plugin/widget/ztree/core/ZTreeMarkInCell.java → 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.
@ -30,11 +31,11 @@ public class ZTreeMarkInCell extends AbstractCellWidgetOptionProvider {
@Override
public String iconPathForWidget() {
return "/com/fr/plugin/widget/ztree/images/drop_down_tree.png";
return "/images/drop_down_tree.png";
}
@Override
public String nameForWidget() {
return Inter.getLocText("Plugin-ZTree_Widget_Name");
return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}

13
src/com/fr/plugin/widget/ztree/core/ZTreeMarkInForm.java → 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.
@ -31,11 +30,11 @@ public class ZTreeMarkInForm extends AbstractFormWidgetOptionProvider implements
@Override
public String iconPathForWidget() {
return "/com/fr/plugin/widget/ztree/images/drop_down_tree.png";
return "/images/drop_down_tree.png";
}
@Override
public String nameForWidget() {
return Inter.getLocText("Plugin-ZTree_Widget_Name");
return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}

39
src/com/fr/plugin/widget/ztree/core/ZTreeNode.java → 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);
}
}

8
src/com/fr/plugin/widget/ztree/core/ZTreeStyle.java → 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;
}
}

0
src/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java → src/main/java/com/fr/plugin/widget/ztree/tools/ZTreeConstants.java

12
src/com/fr/plugin/widget/ztree/tools/ZTreeHelper.java → 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);

34
src/com/fr/plugin/widget/ztree/ui/XZTree.java → src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java

@ -1,11 +1,16 @@
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.fanruan.api.design.ui.editor.WidgetValueEditor;
import com.fanruan.api.design.ui.editor.XFieldEditor;
//import com.fr.design.designer.creator.*;
import com.fanruan.api.design.util.GUICoreKit;
import com.fanruan.api.i18n.I18nKit;
import com.fanruan.api.design.macro.XCreatorConstants;
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;
@ -15,6 +20,9 @@ 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.design.designer.creator.CRPropertyDescriptor;
import javax.swing.*;
import java.awt.*;
import java.beans.IntrospectionException;
@ -34,20 +42,20 @@ 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")
@ -57,7 +65,7 @@ public class XZTree extends XFieldEditor {
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);
@ -91,7 +99,7 @@ public class XZTree extends XFieldEditor {
@Override
public String getIconPath() {
return "/com/fr/plugin/widget/ztree/images/drop_down_tree.png";
return "/images/drop_down_tree.png";
}
/**

7
src/com/fr/plugin/widget/ztree/ui/ZTreeDefinePane.java → 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.ui.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<ZTree> {
@Override
protected String title4PopupWindow() {
return Inter.getLocText("Plugin-ZTree_Widget_Name");
return I18nKit.getLocText("Plugin-ZTree_Widget_Name");
}
}

33
src/com/fr/plugin/widget/ztree/ui/control/ZTreeControlPane.java → 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("/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("/images/remove.png"));
}
@Override

10
src/com/fr/plugin/widget/ztree/ui/control/ZTreeNodePane.java → 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.container.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<ZTreeNode> {
}
private void initComponents(){
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setLayout(new BorderLayout());
dataRadioPane = new DictionaryPane();
this.add(dataRadioPane, BorderLayout.CENTER);
}

10
src/com/fr/plugin/widget/ztree/ui/editor/AccessibleZTreeModelEditor.java → 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.ui.editor.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.*;
/**

8
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeEditor.java → 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.ui.editor.ItemCellEditor;
import com.fanruan.api.design.work.Item;
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;
}

2
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeCascadeWrapper.java → 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;

2
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelEditor.java → 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.ui.editor.AccessiblePropertyEditor;
/**
* Created by richie on 15/11/18.

7
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeModelWrapper.java → 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<ZTreeNode>, Decoder<ZTreeNode>
@Override
public String encode(ZTreeNode v) {
if (v == null) {
return StringUtils.EMPTY;
return StringKit.EMPTY;
}
return "共有" + v.getLevelCount() + "层数据";
}

8
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.java → src/main/java/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleEditor.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.ui.editor.ItemCellEditor;
import com.fanruan.api.design.work.Item;
import com.fanruan.api.i18n.I18nKit;
import com.fr.plugin.widget.ztree.core.ZTreeStyle;
/**
@ -20,7 +20,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;
}

5
src/com/fr/plugin/widget/ztree/ui/editor/ZTreeStyleWrapper.java → 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.
*/

2
src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeCascadeRenderer.java → 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.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeCascadeWrapper;
/**

2
src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeModelRenderer.java → 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.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeModelWrapper;
/**

2
src/com/fr/plugin/widget/ztree/ui/renderer/ZTreeStyleRenderer.java → 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.EncoderCellRenderer;
import com.fr.plugin.widget.ztree.ui.editor.ZTreeStyleWrapper;
/**

0
src/com/fr/plugin/widget/ztree/images/add.png → src/main/resources/com/fr/plugin/widget/ztree/images/add.png

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 204 B

0
src/com/fr/plugin/widget/ztree/images/drop_down_tree.png → src/main/resources/com/fr/plugin/widget/ztree/images/drop_down_tree.png

Before

Width:  |  Height:  |  Size: 256 B

After

Width:  |  Height:  |  Size: 256 B

0
src/com/fr/plugin/widget/ztree/images/remove.png → src/main/resources/com/fr/plugin/widget/ztree/images/remove.png

Before

Width:  |  Height:  |  Size: 302 B

After

Width:  |  Height:  |  Size: 302 B

0
src/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css → src/main/resources/com/fr/plugin/widget/ztree/lib/css/zTreeStyle.css

0
src/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_close.png

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/1_open.png

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/2.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/2.png

Before

Width:  |  Height:  |  Size: 570 B

After

Width:  |  Height:  |  Size: 570 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/3.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/3.png

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 762 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/4.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/4.png

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 399 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/5.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/5.png

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 710 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/6.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/6.png

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 432 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/7.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/7.png

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 534 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/8.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/8.png

Before

Width:  |  Height:  |  Size: 529 B

After

Width:  |  Height:  |  Size: 529 B

0
src/com/fr/plugin/widget/ztree/lib/img/diy/9.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/diy/9.png

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

0
src/com/fr/plugin/widget/ztree/lib/img/line_conn.gif → src/main/resources/com/fr/plugin/widget/ztree/lib/img/line_conn.gif

Before

Width:  |  Height:  |  Size: 45 B

After

Width:  |  Height:  |  Size: 45 B

0
src/com/fr/plugin/widget/ztree/lib/img/loading.gif → src/main/resources/com/fr/plugin/widget/ztree/lib/img/loading.gif

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 381 B

0
src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif → src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.gif

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

0
src/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png → src/main/resources/com/fr/plugin/widget/ztree/lib/img/zTreeStandard.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js → src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.all-3.5.js

0
src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js → src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.core-3.5.js

0
src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js → src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.excheck-3.5.js

0
src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js → src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exedit-3.5.js

0
src/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js → src/main/resources/com/fr/plugin/widget/ztree/lib/js/jquery.ztree.exhide-3.5.js

0
src/com/fr/plugin/widget/ztree/locale/ztree.properties → src/main/resources/com/fr/plugin/widget/ztree/locale/ztree.properties

0
src/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties → src/main/resources/com/fr/plugin/widget/ztree/locale/ztree_zh_CN.properties

0
screenshots/check.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/check.png

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

0
screenshots/data_result.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_result.png

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

0
screenshots/data_set.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_set.png

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

0
screenshots/data_ui.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/data_ui.png

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

0
screenshots/properties.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/properties.png

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

0
screenshots/radio.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/radio.png

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

0
screenshots/styles.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/styles.png

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 200 KiB

0
screenshots/web_ui.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/web_ui.png

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

0
screenshots/widget.png → src/main/resources/com/fr/plugin/widget/ztree/screenshots/widget.png

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

0
src/com/fr/plugin/widget/ztree/web/widget.ztree.css → src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.css

0
src/com/fr/plugin/widget/ztree/web/widget.ztree.js → src/main/resources/com/fr/plugin/widget/ztree/web/widget.ztree.js

Loading…
Cancel
Save