Browse Source

重构目录

master
felix xia 4 years ago
parent
commit
37b87c61cf
  1. 5
      build.bat
  2. 2
      build.xml
  3. 48
      plugin-widget-digitroll10.iml
  4. 5
      pom.xml
  5. 0
      src/main/java/com/fr/plugin/widget/digitroll/Constants.java
  6. 0
      src/main/java/com/fr/plugin/widget/digitroll/CssFileHandler.java
  7. 15
      src/main/java/com/fr/plugin/widget/digitroll/DigitRollWidget.java
  8. 2
      src/main/java/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java
  9. 2
      src/main/java/com/fr/plugin/widget/digitroll/LocaleFinder.java
  10. 2
      src/main/java/com/fr/plugin/widget/digitroll/OptionProvider.java
  11. 0
      src/main/java/com/fr/plugin/widget/digitroll/Util.java
  12. 1
      src/main/java/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java
  13. 0
      src/main/java/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java
  14. 5
      src/main/java/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java
  15. 0
      src/main/resources/com/fr/plugin/resources/images/digitroll_display.png
  16. 0
      src/main/resources/com/fr/plugin/resources/images/digitroll_icon.png
  17. 0
      src/main/resources/com/fr/plugin/resources/locale/digitroll.properties
  18. 0
      src/main/resources/com/fr/plugin/resources/locale/digitroll_zh_CN.properties
  19. 0
      src/main/resources/com/fr/plugin/resources/web/countUp.js
  20. 2
      src/main/resources/com/fr/plugin/resources/web/widget.digitRoll.js

5
build.bat

@ -0,0 +1,5 @@
set JAVA_HOME=D:\DevelopTools\Java\jdk1.8.0_73
set ANT_OPTS=-Xmx512M -Xss100m
D:\DevelopTools\apache-ant-1.9.14\bin\ant -f build.xml jar

2
build.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="jar" name="plugin">
<!-- JDK路径,根据自己机器上实际位置修改-->
<property name="jdk.home" value="D:/Java/jdk1.8.0_25"/>
<property name="jdk.home" value="D:/DevelopTools/Java/jdk1.8.0_73"/>
<property name="libs" value="${basedir}/lib"/>
<property name="publicLibs" value=""/>

48
plugin-widget-digitroll10.iml

@ -1,31 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
<output url="file://$MODULE_DIR$/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.widget.digitroll.v10-1.0/classes" />
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.digitroll10-1.0/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/com" isTestSource="false" />
<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" />
<excludeFolder url="file://$MODULE_DIR$/webroot/WEB-INF/classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" 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:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.third:fine-third:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.activator:fine-activator:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.core:fine-core:10.0.2019.12.11" 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-RELEASE-SNAPSHOT" 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:fine-decision:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision-report:10.0-RELEASE-SNAPSHOT" 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:fine-schedule-report:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-swift:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fineio:fineio:2.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.jcraft:jzlib:1.1.3" level="project" />
<orderEntry type="library" name="Maven: com.fr.webui:fine-webui:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.datasource:fine-datasource:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision-report:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule-report:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-swift:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fineio:fineio:2.0.2019.12.11" 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-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-engine:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-designer:10.0-RELEASE-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-accumulator:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-engine:10.0.2019.12.11" level="project" />
<orderEntry type="library" name="Maven: com.fr.report:fine-report-designer:10.0.2019.12.11" 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" />
@ -48,5 +51,12 @@
<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" name="Maven: com.fr.third:jxbrowser-win64: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>

5
pom.xml

@ -11,4 +11,9 @@
</parent>
<packaging>jar</packaging>
<artifactId>plugin-widget-digitroll10</artifactId>
<build>
<outputDirectory>${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.digitroll10-1.0/classes</outputDirectory>
</build>
</project>

0
src/com/fr/plugin/widget/digitroll/Constants.java → src/main/java/com/fr/plugin/widget/digitroll/Constants.java

0
src/com/fr/plugin/widget/digitroll/CssFileHandler.java → src/main/java/com/fr/plugin/widget/digitroll/CssFileHandler.java

15
src/com/fr/plugin/widget/digitroll/DigitRollWidget.java → src/main/java/com/fr/plugin/widget/digitroll/DigitRollWidget.java

@ -25,6 +25,7 @@ import com.fr.web.utils.WebUtils;
import javax.servlet.http.HttpServletRequest;
import java.awt.*;
import java.math.BigInteger;
public class DigitRollWidget extends DirectWriteEditor implements DataControl {
@ -141,7 +142,8 @@ public class DigitRollWidget extends DirectWriteEditor implements DataControl {
@Override
public int[] getValueType() {
return new int[]{TYPE_FORMULA, TYPE_DATABINDING};
//return new int[]{TYPE_FORMULA, TYPE_DATABINDING};
return new int[]{TYPE_DATABINDING};
}
@Override
@ -218,7 +220,16 @@ public class DigitRollWidget extends DirectWriteEditor implements DataControl {
JSONArray jsonArray = (JSONArray) value;
v = jsonArray.getDouble(0);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
if (value != null) {
if (value instanceof BigInteger || value instanceof Integer) {
String s = value.toString();
v = Double.valueOf(s);
} else {
v = (Double) value;
}
} else {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
jsonConfig.put("value", v);
}

2
src/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java → src/main/java/com/fr/plugin/widget/digitroll/JavaScriptFileLoader.java

@ -18,7 +18,7 @@ public class JavaScriptFileLoader extends AbstractJavaScriptFileHandler {
public String[] pathsForFiles() {
if (license.isAvailable()) {
return new String[]{
"/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js"};
"/com/fr/plugin/resources/web/widget.digitRoll.js"};
} else {
JOptionPane.showMessageDialog(null
, Inter.getLocText("Plugin-DigitRoll_License_Expired")

2
src/com/fr/plugin/widget/digitroll/LocaleFinder.java → src/main/java/com/fr/plugin/widget/digitroll/LocaleFinder.java

@ -5,6 +5,6 @@ import com.fr.stable.fun.impl.AbstractLocaleFinder;
public class LocaleFinder extends AbstractLocaleFinder {
@Override
public String find() {//查找字符串,类似于android的value
return "com/fr/plugin/widget/digitroll/locale/digitroll";
return "com/fr/plugin/resources/locale/digitroll";
}
}

2
src/com/fr/plugin/widget/digitroll/OptionProvider.java → src/main/java/com/fr/plugin/widget/digitroll/OptionProvider.java

@ -22,7 +22,7 @@ public class OptionProvider extends AbstractFormWidgetOptionProvider {
@Override
public String iconPathForWidget() {//图标
return "com/fr/plugin/widget/digitroll/images/digitroll_icon.png";
return "com/fr/plugin/resources/images/digitroll_icon.png";
}
@Override

0
src/com/fr/plugin/widget/digitroll/Util.java → src/main/java/com/fr/plugin/widget/digitroll/Util.java

1
src/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java → src/main/java/com/fr/plugin/widget/digitroll/ui/DecimalPlacesEditor.java

@ -1,5 +1,6 @@
package com.fr.plugin.widget.digitroll.ui;
import com.fr.design.mainframe.widget.editors.ComboEditor;
import javax.swing.*;

0
src/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java → src/main/java/com/fr/plugin/widget/digitroll/ui/DigitRollDataSourceEditor.java

5
src/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java → src/main/java/com/fr/plugin/widget/digitroll/ui/DigitRollWidgetUI.java

@ -2,7 +2,6 @@ package com.fr.plugin.widget.digitroll.ui;
import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.editor.editor.SpinnerIntegerEditor;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
@ -31,7 +30,7 @@ public class DigitRollWidgetUI extends XWidgetCreator {
if (this.editor == null) {
this.editor = FRGUIPaneFactory.createBorderLayout_S_Pane();
UILabel label = new UILabel();
label.setIcon(IOUtils.readIcon("/com/fr/plugin/widget/digitroll/images/digitroll_display.png"));
label.setIcon(IOUtils.readIcon("/com/fr/plugin/resources/images/digitroll_display.png"));
label.setHorizontalAlignment(0);
label.setVerticalAlignment(0);
this.editor.add(label, "Center");
@ -83,6 +82,6 @@ public class DigitRollWidgetUI extends XWidgetCreator {
}
public String getIconPath() {
return "com/fr/plugin/widget/digitroll/images/digitroll_icon.png";
return "com/fr/plugin/resources/images/digitroll_icon.png";
}
}

0
src/com/fr/plugin/widget/digitroll/images/digitroll_display.png → src/main/resources/com/fr/plugin/resources/images/digitroll_display.png

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

0
src/com/fr/plugin/widget/digitroll/images/digitroll_icon.png → src/main/resources/com/fr/plugin/resources/images/digitroll_icon.png

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

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

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

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

2
src/com/fr/plugin/widget/digitroll/web/widget.digitRoll.js → src/main/resources/com/fr/plugin/resources/web/widget.digitRoll.js

@ -10,7 +10,7 @@
_init: function () {
FR.DigitRoll.superclass._init.apply(this, arguments);
FR.$defaultImport('/com/fr/plugin/widget/digitroll/web/countUp.js', 'js');
FR.$defaultImport('/com/fr/plugin/resources/web/countUp.js', 'js');
var o = this.options;
var element = this.element;
var widget = element[0];
Loading…
Cancel
Save