Browse Source

提交10.0扩展图表示例

master
richie 6 years ago
parent
commit
4e0615a3c5
  1. 11
      .gitignore
  2. 130
      build.xml
  3. 0
      lib/report/.gitkeep
  4. 109
      plugin-demochart.iml
  5. 9
      plugin.xml
  6. 29
      pom.xml
  7. 1
      src/main/java/com/fr/plugin/demo/Demo.java
  8. 5
      src/main/java/com/fr/plugin/demo/DemoUI.java
  9. 50
      src/main/java/com/fr/plugin/demo/fun/DemoChart.java
  10. 6
      src/main/java/com/fr/plugin/demo/fun/DemoChartConstants.java
  11. 5
      src/main/java/com/fr/plugin/demo/fun/DemoDataConfig.java
  12. 2
      src/main/java/com/fr/plugin/demo/fun/ThemeType.java
  13. 3
      src/main/java/com/fr/plugin/demo/ui/DemoBackgroundPane.java
  14. 3
      src/main/java/com/fr/plugin/demo/ui/DemoReportDataPane.java
  15. 3
      src/main/java/com/fr/plugin/demo/ui/DemoStylePane.java
  16. 28
      src/main/java/com/fr/plugin/demo/ui/DemoTableDataPane.java
  17. 3
      src/main/java/com/fr/plugin/demo/ui/DemoTitlePane.java
  18. 4
      src/main/java/com/fr/plugin/demo/ui/DemoTypePane.java
  19. 0
      src/main/resources/com/fr/plugin/demo/dark.png
  20. 0
      src/main/resources/com/fr/plugin/demo/demo.css
  21. 0
      src/main/resources/com/fr/plugin/demo/demo.png
  22. 0
      src/main/resources/com/fr/plugin/demo/demoWrapper.js
  23. 0
      src/main/resources/com/fr/plugin/demo/echarts-gl.js
  24. 0
      src/main/resources/com/fr/plugin/demo/echarts.js
  25. 0
      src/main/resources/com/fr/plugin/demo/icon.png
  26. 0
      src/main/resources/com/fr/plugin/demo/white.png

11
.gitignore vendored

@ -1,9 +1,6 @@
*.iml *.iml
*.xml
!plugin.xml
!build.xml
.idea/ .idea/
.DS_Store /target/
*.jar /download/
*.zip /webroot/
plugin-demochart.iml .DS_Store

130
build.xml

@ -0,0 +1,130 @@
<?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_172.jdk/Contents/Home"/>
<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="demo-charts"/>
<property name="plugin-jar" value="fr-plugin-${plugin-name}-${plugin-version}.jar"/>
<target name="prepare">
<delete dir="${classes}"/>
<delete dir="fr-plugin-${plugin-name}-${plugin-version}"/>
<xmlproperty file="${basedir}/plugin.xml"/>
<delete dir="${destLoc}/${plugin.name}"/>
</target>
<path id="compile.classpath">
<fileset dir="${libs}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${publicLibs}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${reportLibs}">
<include name="**/*.jar"/>
</fileset>
</path>
<patternset id="resources4Jar">
<exclude name="**/.settings/**"/>
<exclude name=".classpath"/>
<exclude name=".project"/>
<exclude name="**/*.java"/>
<exclude name="**/*.db"/>
<exclude name="**/*.g"/>
<exclude name="**/package.html"/>
</patternset>
<target name="copy_resources">
<echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/>
<delete dir="tmp"/>
<copy todir="tmp">
<fileset dir="${resources_from}/src/main/resources">
<patternset refid="resources4Jar"/>
</fileset>
</copy>
<copy todir="${classes}">
<fileset dir="tmp"/>
</copy>
<delete dir="tmp"/>
</target>
<target name="compile_javas">
<echo message="编译${compile_files}下的Java文件"/>
<javac destdir="${classes}" debug="false" optimize="on" source="${source_jdk_version}"
target="${target_jdk_version}"
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}"
executable="${compile_jdk_version}/bin/javac">
<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">
<echo message="打Jar包:${jar_name}"/>
<delete file="${basedir}/${jar_name}"/>
<jar jarfile="${basedir}/${jar_name}">
<fileset dir="${classes}">
</fileset>
</jar>
</target>
<target name="super_jar" depends="prepare">
<antcall target="copy_resources">
<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="compile_jdk_version" value="${jdk.home}"/>
<param name="compile_files" value="${basedir}/src"/>
</antcall>
<echo message="compile plugin success!"/>
<antcall target="jar_classes">
<param name="jar_name" value="${plugin-jar}"/>
</antcall>
<delete dir="${classes}"/>
</target>
<target name="jar" depends="super_jar">
<antcall target="zip"/>
</target>
<target name="zip">
<property name="plugin-folder" value="fr-plugin-${plugin-name}-${plugin-version}"/>
<echo message="----------zip files----------"/>
<mkdir dir="${plugin-folder}"/>
<copy todir="${plugin-folder}">
<fileset dir=".">
<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>
<move file="${plugin-folder}.zip" todir="${destLoc}/install"/>
</target>
</project>

0
lib/report/.gitkeep

109
plugin-demochart.iml

@ -1,109 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/../env/webapps/webroot/WEB-INF/plugins/plugin-com.fr.plugin.demo.DemoChart-1.0.0/classes" />
<output-test url="file://$MODULE_DIR$/../env/webroot/WEB-INF/classes/test/plugin-demochart" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.fr.activator:fine-activator-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.activator:fine-activator:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.core:fine-core-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.core:fine-core:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.datasource:base-datasource-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.datasource:fine-datasource:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:decision-report-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule-sdk:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:schedule-report:10.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.third.build:ant:1.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.third.driver:ojdbc:14" level="project" />
<orderEntry type="library" name="Maven: com.fr.third.server:servlet-api:3.0" level="project" />
<orderEntry type="library" name="Maven: com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.webui:fine-webui:10.0-RELEASE-SNAPSHOT" 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: io.netty:netty-all:4.1.22" level="project" />
<orderEntry type="library" name="Maven: io.socket:engine.io-client:0.7.0" level="project" />
<orderEntry type="library" name="Maven: io.socket:socket.io-client:0.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:bootstrap:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:commons-daemon:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-catalina-ant:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-catalina-ha:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-catalina:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-coyote:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-dbcp:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-el-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-i18n-es:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-i18n-fr:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-i18n-ja:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jasper-el:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jasper:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jsp-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-servlet-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-tribes:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-websocket-api:7.0.86" level="project" />
<orderEntry type="library" name="Maven: org.easymock:easymock:3.5.1" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jdt.core.compiler:ecj:4.4.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
<orderEntry type="library" name="Maven: org.swingexplorer:swag:1.0" level="project" />
<orderEntry type="library" name="Maven: org.swingexplorer:swexpl:1.0" level="project" />
<orderEntry type="module" module-name="base-platform" />
<orderEntry type="module" module-name="design" />
<orderEntry type="module" module-name="design-i18n" />
<orderEntry type="module" module-name="design-i18n-chart" />
<orderEntry type="module" module-name="design-i18n-report" />
<orderEntry type="module" module-name="designer-base" />
<orderEntry type="module" module-name="designer-chart" />
<orderEntry type="module" module-name="designer-form" />
<orderEntry type="module" module-name="designer-realize" />
<orderEntry type="module" module-name="engine" />
<orderEntry type="module" module-name="engine-chart" />
<orderEntry type="module" module-name="engine-chart-base" />
<orderEntry type="module" module-name="engine-chart-chartattr" />
<orderEntry type="module" module-name="engine-chart-chartdata" />
<orderEntry type="module" module-name="engine-chart-chartglyph" />
<orderEntry type="module" module-name="engine-chart-sdk" />
<orderEntry type="module" module-name="engine-chart-web" />
<orderEntry type="module" module-name="engine-cross" />
<orderEntry type="module" module-name="engine-enhancement" />
<orderEntry type="module" module-name="engine-file" />
<orderEntry type="module" module-name="engine-i18n" />
<orderEntry type="module" module-name="engine-page" />
<orderEntry type="module" module-name="engine-platform" />
<orderEntry type="module" module-name="engine-platform-sdk" />
<orderEntry type="module" module-name="engine-report" />
<orderEntry type="module" module-name="engine-report-sdk" />
<orderEntry type="module" module-name="engine-view" />
<orderEntry type="module" module-name="engine-workspace-server" />
<orderEntry type="module" module-name="engine-write" />
<orderEntry type="module" module-name="fine-report-designer" />
<orderEntry type="module" module-name="fine-report-engine" />
<orderEntry type="module" module-name="fine-report-engine-sdk" />
<orderEntry type="module" module-name="finereport-maven" />
<orderEntry type="module" module-name="fmobile" />
<orderEntry type="module" module-name="form" />
<orderEntry type="module" module-name="fsbakrestore" />
<orderEntry type="module" module-name="fschedule" />
<orderEntry type="module" module-name="fservice" />
<orderEntry type="module" module-name="fsmonitor" />
<orderEntry type="module" module-name="fsworkflow" />
<orderEntry type="module" module-name="i18n-engine" />
<orderEntry type="module" module-name="plugin-chart-bigscreen" />
</component>
</module>

9
plugin.xml

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<id>com.fr.plugin.demoChart</id> <plugin>
<id>com.fr.plugin.demo.chart</id>
<main-package>com.fr.plugin.demo</main-package>
<name><![CDATA[DEMO图表]]></name> <name><![CDATA[DEMO图表]]></name>
<active>yes</active> <active>yes</active>
<version>1.0.0</version> <version>1.0.0</version>
@ -9,8 +11,6 @@
<description><![CDATA[给开发者参考的图表插件demo]]></description> <description><![CDATA[给开发者参考的图表插件demo]]></description>
<change-notes><![CDATA[]]></change-notes> <change-notes><![CDATA[]]></change-notes>
<function-recorder class="com.fr.plugin.demo.DemoChart"/>
<extra-chart> <extra-chart>
<IndependentChartProvider class="com.fr.plugin.demo.Demo" plotID="DEMO_CHART"/> <IndependentChartProvider class="com.fr.plugin.demo.Demo" plotID="DEMO_CHART"/>
</extra-chart> </extra-chart>
@ -19,4 +19,5 @@
<IndependentChartUIProvider class="com.fr.plugin.demo.DemoUI" plotID="DEMO_CHART"/> <IndependentChartUIProvider class="com.fr.plugin.demo.DemoUI" plotID="DEMO_CHART"/>
</extra-chart-designer> </extra-chart-designer>
<function-recorder class="com.fr.plugin.demo.fun.DemoChart"/>
</plugin> </plugin>

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>demo-show-charts</artifactId>
<build>
<!---如果要更改调试插件,改这里的配置就可以了-->
<outputDirectory>${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.demo.chart-1.0/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>6</source>
<target>6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

1
src/com/fr/plugin/demo/Demo.java → src/main/java/com/fr/plugin/demo/Demo.java

@ -2,6 +2,7 @@ package com.fr.plugin.demo;
import com.fr.extended.chart.AbstractChart; import com.fr.extended.chart.AbstractChart;
import com.fr.extended.chart.AbstractExtentChartProvider; import com.fr.extended.chart.AbstractExtentChartProvider;
import com.fr.plugin.demo.fun.DemoChart;
/** /**
* Created by shine on 2018/3/24. * Created by shine on 2018/3/24.

5
src/com/fr/plugin/demo/DemoUI.java → src/main/java/com/fr/plugin/demo/DemoUI.java

@ -2,12 +2,15 @@ package com.fr.plugin.demo;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.extended.chart.AbstractExtendedChartTableDataPane; import com.fr.extended.chart.AbstractExtendedChartTableDataPane;
import com.fr.extended.chart.AbstractExtendedChartUIProvider; import com.fr.extended.chart.AbstractExtendedChartUIProvider;
import com.fr.extended.chart.ExtendedOtherPane; import com.fr.extended.chart.ExtendedOtherPane;
import com.fr.plugin.demo.ui.DemoReportDataPane;
import com.fr.plugin.demo.ui.DemoStylePane;
import com.fr.plugin.demo.ui.DemoTableDataPane;
import com.fr.plugin.demo.ui.DemoTypePane;
/** /**
* Created by shine on 2018/3/24. * Created by shine on 2018/3/24.

50
src/com/fr/plugin/demo/DemoChart.java → src/main/java/com/fr/plugin/demo/fun/DemoChart.java

@ -1,4 +1,4 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.fun;
import com.fr.extended.chart.AbstractChart; import com.fr.extended.chart.AbstractChart;
import com.fr.extended.chart.HyperLinkPara; import com.fr.extended.chart.HyperLinkPara;
@ -6,13 +6,14 @@ import com.fr.extended.chart.StringFormula;
import com.fr.extended.chart.export.ExportProcessor; import com.fr.extended.chart.export.ExportProcessor;
import com.fr.extended.chart.export.JSExportProcessor; import com.fr.extended.chart.export.JSExportProcessor;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.json.JSON; import com.fr.json.JSON;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONFactory; import com.fr.json.JSONFactory;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.plugin.transform.ExecuteFunctionRecord; import com.fr.record.analyzer.EnableMetrics;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.stable.AssistUtils; import com.fr.stable.AssistUtils;
import com.fr.stable.web.Repository; import com.fr.stable.web.Repository;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
@ -24,8 +25,8 @@ import java.util.List;
/** /**
* Created by shine on 2018/3/24. * Created by shine on 2018/3/24.
*/ */
@FunctionRecorder @EnableMetrics
public class DemoChart extends AbstractChart<DemoDataConfig>{ public class DemoChart extends AbstractChart<DemoDataConfig> {
private static final String ID = "DEMO_CHART"; private static final String ID = "DEMO_CHART";
private static final String NAME = "DEMO图表"; private static final String NAME = "DEMO图表";
@ -87,20 +88,6 @@ public class DemoChart extends AbstractChart<DemoDataConfig>{
return result; return result;
} }
@Override
public int hashCode() {
return super.hashCode() + AssistUtils.hashCode(this.getTitleFormula(), this.getThemeType(), this.isThreeDimensional());
}
@Override
public boolean equals(Object ob) {
return super.equals(ob)
&& ob instanceof DemoChart
&& AssistUtils.equals(this.getTitleFormula(), ((DemoChart) ob).getTitleFormula())
&& AssistUtils.equals(this.getThemeType(), ((DemoChart) ob).getThemeType())
&& AssistUtils.equals(this.isThreeDimensional(), ((DemoChart) ob).isThreeDimensional())
;
}
@Override @Override
protected String getChartID() { protected String getChartID() {
@ -117,8 +104,8 @@ public class DemoChart extends AbstractChart<DemoDataConfig>{
return "com/fr/plugin/demo/demo.png"; return "com/fr/plugin/demo/demo.png";
} }
@ExecuteFunctionRecord
@Override @Override
@Focus(id = DemoChartConstants.PLUGIN_ID, text = "", source = Original.PLUGIN)
protected void addJSON(DemoDataConfig dataConfig, JSONObject jsonObject, Repository repo, JSONPara para) throws JSONException { protected void addJSON(DemoDataConfig dataConfig, JSONObject jsonObject, Repository repo, JSONPara para) throws JSONException {
jsonObject.put("theme", getThemeType() == ThemeType.DARK ? "dark" : "sth whatever"); jsonObject.put("theme", getThemeType() == ThemeType.DARK ? "dark" : "sth whatever");
@ -133,7 +120,7 @@ public class DemoChart extends AbstractChart<DemoDataConfig>{
List<Object> yValues = dataConfig.getY().getValues(); List<Object> yValues = dataConfig.getY().getValues();
List<Object> zValues = dataConfig.getZ().getValues(); List<Object> zValues = dataConfig.getZ().getValues();
// jsonObject.put("targetName", dataConfig.getTargetName()); // jsonObject.put("targetName", dataConfig.getTargetName());
// List<Object> expectList = dataConfig.getExpect().getValues(); // List<Object> expectList = dataConfig.getExpect().getValues();
// List<Object> actualList = dataConfig.getActual().getValues(); // List<Object> actualList = dataConfig.getActual().getValues();
@ -239,12 +226,17 @@ public class DemoChart extends AbstractChart<DemoDataConfig>{
return new JSExportProcessor(); return new JSExportProcessor();
} }
// @Override @Override
// protected DemoDataConfig designerDataConfig() { public int hashCode() {
// DemoDataConfig demoDataConfig = new DemoDataConfig(); return super.hashCode() + AssistUtils.hashCode(this.getTitleFormula(), this.getThemeType(), this.isThreeDimensional());
// demoDataConfig.setX(new ExtendedField("days", new String[]{"Monday","Tuesday"})); }
// demoDataConfig.setY(new ExtendedField("name", new String[]{"Lily", "Marks"}));
// demoDataConfig.setZ(new ExtendedField("money", new String[]{"100", "200"})); @Override
// return super.designerDataConfig(); public boolean equals(Object ob) {
// } return super.equals(ob)
&& ob instanceof DemoChart
&& AssistUtils.equals(this.getTitleFormula(), ((DemoChart) ob).getTitleFormula())
&& AssistUtils.equals(this.getThemeType(), ((DemoChart) ob).getThemeType())
&& AssistUtils.equals(this.isThreeDimensional(), ((DemoChart) ob).isThreeDimensional());
}
} }

6
src/main/java/com/fr/plugin/demo/fun/DemoChartConstants.java

@ -0,0 +1,6 @@
package com.fr.plugin.demo.fun;
public class DemoChartConstants {
public static final String PLUGIN_ID = "com.fr.plugin.demo.chart";
}

5
src/com/fr/plugin/demo/DemoDataConfig.java → src/main/java/com/fr/plugin/demo/fun/DemoDataConfig.java

@ -1,4 +1,4 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.fun;
import com.fr.extended.chart.AbstractDataConfig; import com.fr.extended.chart.AbstractDataConfig;
import com.fr.extended.chart.ExtendedField; import com.fr.extended.chart.ExtendedField;
@ -125,7 +125,6 @@ public class DemoDataConfig extends AbstractDataConfig {
&& AssistUtils.equals(this.getY(), ((DemoDataConfig) obj).getY()) && AssistUtils.equals(this.getY(), ((DemoDataConfig) obj).getY())
&& AssistUtils.equals(this.getZ(), ((DemoDataConfig) obj).getZ()) && AssistUtils.equals(this.getZ(), ((DemoDataConfig) obj).getZ())
&& AssistUtils.equals(this.getExpect(), ((DemoDataConfig) obj).getExpect()) && AssistUtils.equals(this.getExpect(), ((DemoDataConfig) obj).getExpect())
&& AssistUtils.equals(this.getActual(), ((DemoDataConfig) obj).getActual()) && AssistUtils.equals(this.getActual(), ((DemoDataConfig) obj).getActual());
;
} }
} }

2
src/com/fr/plugin/demo/ThemeType.java → src/main/java/com/fr/plugin/demo/fun/ThemeType.java

@ -1,4 +1,4 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.fun;
/** /**
* Created by shine on 2018/4/19. * Created by shine on 2018/4/19.

3
src/com/fr/plugin/demo/DemoBackgroundPane.java → src/main/java/com/fr/plugin/demo/ui/DemoBackgroundPane.java

@ -1,6 +1,7 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.extended.chart.ExtendedScrollPane; import com.fr.extended.chart.ExtendedScrollPane;
import com.fr.plugin.demo.fun.DemoChart;
import javax.swing.JPanel; import javax.swing.JPanel;

3
src/com/fr/plugin/demo/DemoReportDataPane.java → src/main/java/com/fr/plugin/demo/ui/DemoReportDataPane.java

@ -1,8 +1,9 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.extended.chart.AbstractExtendedChartReportDataPane; import com.fr.extended.chart.AbstractExtendedChartReportDataPane;
import com.fr.plugin.demo.fun.DemoDataConfig;
import java.awt.Component; import java.awt.Component;

3
src/com/fr/plugin/demo/DemoStylePane.java → src/main/java/com/fr/plugin/demo/ui/DemoStylePane.java

@ -1,8 +1,9 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.extended.chart.AbstractExtendedStylePane; import com.fr.extended.chart.AbstractExtendedStylePane;
import com.fr.extended.chart.ExtendedScrollPane; import com.fr.extended.chart.ExtendedScrollPane;
import com.fr.plugin.demo.fun.DemoChart;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

28
src/com/fr/plugin/demo/DemoTableDataPane.java → src/main/java/com/fr/plugin/demo/ui/DemoTableDataPane.java

@ -1,11 +1,11 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.extended.chart.AbstractExtendedChartTableDataPane; import com.fr.extended.chart.AbstractExtendedChartTableDataPane;
import com.fr.extended.chart.ExtendedCustomFieldComboBoxPane; import com.fr.extended.chart.ExtendedCustomFieldComboBoxPane;
import com.fr.extended.chart.UIComboBoxWithNone; import com.fr.plugin.demo.fun.DemoDataConfig;
import java.awt.Component; import java.awt.Component;
@ -25,16 +25,16 @@ public class DemoTableDataPane extends AbstractExtendedChartTableDataPane<DemoDa
// private UIComboBoxWithNone seriesName; // private UIComboBoxWithNone seriesName;
// @Override @Override
// protected ExtendedCustomFieldComboBoxPane createExtendedCustomFieldComboBoxPane() { protected ExtendedCustomFieldComboBoxPane createExtendedCustomFieldComboBoxPane() {
// return new ExtendedCustomFieldComboBoxPane(); return new ExtendedCustomFieldComboBoxPane();
// } }
@Override @Override
protected String[] fieldLabels() { protected String[] fieldLabels() {
return new String[]{ return new String[]{
"X轴", "X轴",
// "指标名", "指标名",
"Y轴", "Y轴",
"Z轴", "Z轴",
// "预期值", // "预期值",
@ -58,13 +58,13 @@ public class DemoTableDataPane extends AbstractExtendedChartTableDataPane<DemoDa
} }
return new Component[]{ return new Component[]{
xComboBox, xComboBox,
// targetName, targetName,
yComboBox, yComboBox,
zComboBox, zComboBox,
// expect, expect,
// expectFunction, expectFunction,
// actual, actual,
// actualFunction actualFunction
}; };
} }
@ -81,8 +81,8 @@ public class DemoTableDataPane extends AbstractExtendedChartTableDataPane<DemoDa
xComboBox, xComboBox,
yComboBox, yComboBox,
zComboBox, zComboBox,
// expect, expect,
// actual actual
}; };
} }

3
src/com/fr/plugin/demo/DemoTitlePane.java → src/main/java/com/fr/plugin/demo/ui/DemoTitlePane.java

@ -1,7 +1,8 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.extended.chart.ExtendedScrollPane; import com.fr.extended.chart.ExtendedScrollPane;
import com.fr.plugin.demo.fun.DemoChart;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;

4
src/com/fr/plugin/demo/DemoTypePane.java → src/main/java/com/fr/plugin/demo/ui/DemoTypePane.java

@ -1,7 +1,9 @@
package com.fr.plugin.demo; package com.fr.plugin.demo.ui;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.extended.chart.ExtendedTypePane; import com.fr.extended.chart.ExtendedTypePane;
import com.fr.plugin.demo.fun.DemoChart;
import com.fr.plugin.demo.fun.ThemeType;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.Component; import java.awt.Component;

0
src/com/fr/plugin/demo/dark.png → src/main/resources/com/fr/plugin/demo/dark.png

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

0
src/com/fr/plugin/demo/demo.css → src/main/resources/com/fr/plugin/demo/demo.css

0
src/com/fr/plugin/demo/demo.png → src/main/resources/com/fr/plugin/demo/demo.png

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 87 KiB

0
src/com/fr/plugin/demo/demoWrapper.js → src/main/resources/com/fr/plugin/demo/demoWrapper.js

0
src/com/fr/plugin/demo/echarts-gl.js → src/main/resources/com/fr/plugin/demo/echarts-gl.js

0
src/com/fr/plugin/demo/echarts.js → src/main/resources/com/fr/plugin/demo/echarts.js

0
src/com/fr/plugin/demo/icon.png → src/main/resources/com/fr/plugin/demo/icon.png

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

0
src/com/fr/plugin/demo/white.png → src/main/resources/com/fr/plugin/demo/white.png

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Loading…
Cancel
Save