diff --git a/.gitignore b/.gitignore index 0b677e7..1bf50a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ *.iml -*.xml -!plugin.xml -!build.xml .idea/ -.DS_Store -*.jar -*.zip -plugin-demochart.iml \ No newline at end of file +/target/ +/download/ +/webroot/ +.DS_Store \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..aa6f043 --- /dev/null +++ b/build.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/report/.gitkeep b/lib/report/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/plugin-demochart.iml b/plugin-demochart.iml deleted file mode 100644 index 496d61b..0000000 --- a/plugin-demochart.iml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugin.xml b/plugin.xml old mode 100644 new mode 100755 index b9fa1cf..aecdded --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,7 @@ - - com.fr.plugin.demoChart + + + com.fr.plugin.demo.chart + com.fr.plugin.demo yes 1.0.0 @@ -9,8 +11,6 @@ - - @@ -19,4 +19,5 @@ + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4ca3614 --- /dev/null +++ b/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + com.fr.plugin + starter + 10.0 + + + jar + demo-show-charts + + + ${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.demo.chart-1.0/classes + + + org.apache.maven.plugins + maven-compiler-plugin + + 6 + 6 + + + + + \ No newline at end of file diff --git a/src/com/fr/plugin/demo/Demo.java b/src/main/java/com/fr/plugin/demo/Demo.java old mode 100644 new mode 100755 similarity index 88% rename from src/com/fr/plugin/demo/Demo.java rename to src/main/java/com/fr/plugin/demo/Demo.java index ede8ed8..4e16c56 --- a/src/com/fr/plugin/demo/Demo.java +++ b/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.AbstractExtentChartProvider; +import com.fr.plugin.demo.fun.DemoChart; /** * Created by shine on 2018/3/24. diff --git a/src/com/fr/plugin/demo/DemoUI.java b/src/main/java/com/fr/plugin/demo/DemoUI.java old mode 100644 new mode 100755 similarity index 88% rename from src/com/fr/plugin/demo/DemoUI.java rename to src/main/java/com/fr/plugin/demo/DemoUI.java index 612347e..7d5cebf --- a/src/com/fr/plugin/demo/DemoUI.java +++ b/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.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.type.AbstractChartTypePane; import com.fr.extended.chart.AbstractExtendedChartTableDataPane; import com.fr.extended.chart.AbstractExtendedChartUIProvider; 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. diff --git a/src/com/fr/plugin/demo/DemoChart.java b/src/main/java/com/fr/plugin/demo/fun/DemoChart.java old mode 100644 new mode 100755 similarity index 89% rename from src/com/fr/plugin/demo/DemoChart.java rename to src/main/java/com/fr/plugin/demo/fun/DemoChart.java index f6a843c..85aea82 --- a/src/com/fr/plugin/demo/DemoChart.java +++ b/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.HyperLinkPara; @@ -6,13 +6,14 @@ import com.fr.extended.chart.StringFormula; import com.fr.extended.chart.export.ExportProcessor; import com.fr.extended.chart.export.JSExportProcessor; 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.JSONArray; import com.fr.json.JSONException; import com.fr.json.JSONFactory; import com.fr.json.JSONObject; -import com.fr.plugin.transform.ExecuteFunctionRecord; -import com.fr.plugin.transform.FunctionRecorder; +import com.fr.record.analyzer.EnableMetrics; import com.fr.stable.AssistUtils; import com.fr.stable.web.Repository; import com.fr.stable.xml.XMLPrintWriter; @@ -24,8 +25,8 @@ import java.util.List; /** * Created by shine on 2018/3/24. */ -@FunctionRecorder -public class DemoChart extends AbstractChart{ +@EnableMetrics +public class DemoChart extends AbstractChart { private static final String ID = "DEMO_CHART"; private static final String NAME = "DEMO图表"; @@ -87,20 +88,6 @@ public class DemoChart extends AbstractChart{ 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 protected String getChartID() { @@ -117,8 +104,8 @@ public class DemoChart extends AbstractChart{ return "com/fr/plugin/demo/demo.png"; } - @ExecuteFunctionRecord @Override + @Focus(id = DemoChartConstants.PLUGIN_ID, text = "", source = Original.PLUGIN) protected void addJSON(DemoDataConfig dataConfig, JSONObject jsonObject, Repository repo, JSONPara para) throws JSONException { jsonObject.put("theme", getThemeType() == ThemeType.DARK ? "dark" : "sth whatever"); @@ -133,7 +120,7 @@ public class DemoChart extends AbstractChart{ List yValues = dataConfig.getY().getValues(); List zValues = dataConfig.getZ().getValues(); - // jsonObject.put("targetName", dataConfig.getTargetName()); + // jsonObject.put("targetName", dataConfig.getTargetName()); // List expectList = dataConfig.getExpect().getValues(); // List actualList = dataConfig.getActual().getValues(); @@ -239,12 +226,17 @@ public class DemoChart extends AbstractChart{ return new JSExportProcessor(); } -// @Override -// protected DemoDataConfig designerDataConfig() { -// DemoDataConfig demoDataConfig = new DemoDataConfig(); -// 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"})); -// return super.designerDataConfig(); -// } + @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()); + } } diff --git a/src/main/java/com/fr/plugin/demo/fun/DemoChartConstants.java b/src/main/java/com/fr/plugin/demo/fun/DemoChartConstants.java new file mode 100644 index 0000000..a7e0dd5 --- /dev/null +++ b/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"; +} diff --git a/src/com/fr/plugin/demo/DemoDataConfig.java b/src/main/java/com/fr/plugin/demo/fun/DemoDataConfig.java old mode 100644 new mode 100755 similarity index 98% rename from src/com/fr/plugin/demo/DemoDataConfig.java rename to src/main/java/com/fr/plugin/demo/fun/DemoDataConfig.java index eb43cc5..b066ff9 --- a/src/com/fr/plugin/demo/DemoDataConfig.java +++ b/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.ExtendedField; @@ -125,7 +125,6 @@ public class DemoDataConfig extends AbstractDataConfig { && AssistUtils.equals(this.getY(), ((DemoDataConfig) obj).getY()) && AssistUtils.equals(this.getZ(), ((DemoDataConfig) obj).getZ()) && AssistUtils.equals(this.getExpect(), ((DemoDataConfig) obj).getExpect()) - && AssistUtils.equals(this.getActual(), ((DemoDataConfig) obj).getActual()) - ; + && AssistUtils.equals(this.getActual(), ((DemoDataConfig) obj).getActual()); } } diff --git a/src/com/fr/plugin/demo/ThemeType.java b/src/main/java/com/fr/plugin/demo/fun/ThemeType.java old mode 100644 new mode 100755 similarity index 90% rename from src/com/fr/plugin/demo/ThemeType.java rename to src/main/java/com/fr/plugin/demo/fun/ThemeType.java index ae70e16..1a12501 --- a/src/com/fr/plugin/demo/ThemeType.java +++ b/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. diff --git a/src/com/fr/plugin/demo/DemoBackgroundPane.java b/src/main/java/com/fr/plugin/demo/ui/DemoBackgroundPane.java old mode 100644 new mode 100755 similarity index 87% rename from src/com/fr/plugin/demo/DemoBackgroundPane.java rename to src/main/java/com/fr/plugin/demo/ui/DemoBackgroundPane.java index 8eb78aa..6645e20 --- a/src/com/fr/plugin/demo/DemoBackgroundPane.java +++ b/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.plugin.demo.fun.DemoChart; import javax.swing.JPanel; diff --git a/src/com/fr/plugin/demo/DemoReportDataPane.java b/src/main/java/com/fr/plugin/demo/ui/DemoReportDataPane.java old mode 100644 new mode 100755 similarity index 96% rename from src/com/fr/plugin/demo/DemoReportDataPane.java rename to src/main/java/com/fr/plugin/demo/ui/DemoReportDataPane.java index 9fc7eea..4a170ca --- a/src/com/fr/plugin/demo/DemoReportDataPane.java +++ b/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.gui.itextfield.UITextField; import com.fr.extended.chart.AbstractExtendedChartReportDataPane; +import com.fr.plugin.demo.fun.DemoDataConfig; import java.awt.Component; diff --git a/src/com/fr/plugin/demo/DemoStylePane.java b/src/main/java/com/fr/plugin/demo/ui/DemoStylePane.java old mode 100644 new mode 100755 similarity index 90% rename from src/com/fr/plugin/demo/DemoStylePane.java rename to src/main/java/com/fr/plugin/demo/ui/DemoStylePane.java index 4ec241d..3c2da80 --- a/src/com/fr/plugin/demo/DemoStylePane.java +++ b/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.extended.chart.AbstractExtendedStylePane; import com.fr.extended.chart.ExtendedScrollPane; +import com.fr.plugin.demo.fun.DemoChart; import java.util.ArrayList; import java.util.List; diff --git a/src/com/fr/plugin/demo/DemoTableDataPane.java b/src/main/java/com/fr/plugin/demo/ui/DemoTableDataPane.java old mode 100644 new mode 100755 similarity index 86% rename from src/com/fr/plugin/demo/DemoTableDataPane.java rename to src/main/java/com/fr/plugin/demo/ui/DemoTableDataPane.java index c2bade9..213548c --- a/src/com/fr/plugin/demo/DemoTableDataPane.java +++ b/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.itextfield.UITextField; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.extended.chart.AbstractExtendedChartTableDataPane; import com.fr.extended.chart.ExtendedCustomFieldComboBoxPane; -import com.fr.extended.chart.UIComboBoxWithNone; +import com.fr.plugin.demo.fun.DemoDataConfig; import java.awt.Component; @@ -25,16 +25,16 @@ public class DemoTableDataPane extends AbstractExtendedChartTableDataPane