Compare commits

..

No commits in common. 'master' and 'master' have entirely different histories.

  1. 27
      .gitignore
  2. 2
      build.gradle
  3. 8
      plugin.xml
  4. 18
      src/main/java/com/fr/plugin/sqy/kj/calendar/FuncRecorder.java
  5. 10
      src/main/java/com/fr/plugin/sqy/kj/calendar/JsFileHandler.java
  6. 35
      src/main/java/com/fr/plugin/sqy/kj/calendar/form/FormXDateEditor.java
  7. 39
      src/main/java/com/fr/plugin/sqy/kj/calendar/parameter/ParameterXDateEditor.java
  8. 3
      src/main/java/com/fr/plugin/sqy/kj/calendar/widget/CellCalendarWidget.java
  9. 3
      src/main/java/com/fr/plugin/sqy/kj/calendar/widget/ParameterCalendarWidget.java

27
.gitignore vendored

@ -1,4 +1,25 @@
/build
/classes
/transform-classes
# ---> Java
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

2
build.gradle

@ -14,7 +14,7 @@ ext {
/**
* class进行加密保护
*/
guard = false
guard = true
def pluginInfo = getPluginInfo()
pluginPre = "fine-plugin"

8
plugin.xml

@ -2,18 +2,16 @@
<id>com.fr.plugin.sqy.kj.calendar</id>
<name><![CDATA[ 农历日历 ]]></name>
<active>yes</active>
<version>1.1.3</version>
<version>1.1.1</version>
<env-version>10.0~11.0</env-version>
<vendor>yy</vendor>
<jartime>2021-05-26</jartime>
<description><![CDATA[ 农历日历 ]]></description>
<change-notes>
<![CDATA[2021-11-24 初始化工程</br>
2024-11-27 修复fr11样式下控件无法显示问题
]]>
<![CDATA[2021-11-24 初始化工程]]>
</change-notes>
<main-package>com.fr.plugin.sqy</main-package>
<function-recorder class="com.fr.plugin.sqy.kj.calendar.FuncRecorder"/>
<function-recorder class="com.fr.plugin.sqy.kj.calendar.JsFileHandler"/>
<extra-core>
<!--插件注入国际化-->

18
src/main/java/com/fr/plugin/sqy/kj/calendar/FuncRecorder.java

@ -1,18 +0,0 @@
package com.fr.plugin.sqy.kj.calendar;
import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.transform.ExecuteFunctionRecord;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.stable.fun.Authorize;
//功能点注册
@FunctionRecorder
@Authorize(callSignKey = PluginConstants.PLUGIN_ID)
public class FuncRecorder {
public static boolean execute(){
return PluginContexts.currentContext() != null && PluginContexts.currentContext().isAvailable();//付费
}
}

10
src/main/java/com/fr/plugin/sqy/kj/calendar/JsFileHandler.java

@ -1,19 +1,15 @@
package com.fr.plugin.sqy.kj.calendar;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.transform.ExecuteFunctionRecord;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.stable.fun.impl.AbstractJavaScriptFileHandler;
@FunctionRecorder
public class JsFileHandler extends AbstractJavaScriptFileHandler{
@ExecuteFunctionRecord
@Override
public String[] pathsForFiles() {
if(!FuncRecorder.execute()){
FineLoggerFactory.getLogger().error("[{}]插件未注册或已过期",PluginConstants.PLUGIN_ID);
return new String[]{};
}
return new String[]{
"com/fr/plugin/sqy/kj/calendar/js/plugin_main.js"
};

35
src/main/java/com/fr/plugin/sqy/kj/calendar/form/FormXDateEditor.java

@ -1,10 +1,9 @@
package com.fr.plugin.sqy.kj.calendar.form;
import com.fanruan.api.design.DesignKit;
import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.design.designer.creator.XDirectWriteEditor;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWScaleLayout;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -109,7 +108,7 @@ public class FormXDateEditor extends XDirectWriteEditor {
if (this.editor == null) {
this.editor = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.editor.add(this.textField = new UITextField(5), "Center");
this.btn = new LimpidButton("sqy_form_calendar", this.getIconPath(), this.toData().isVisible() ? 1.0F : 0.4F);
this.btn = new LimpidButton("", this.getIconPath(), this.toData().isVisible() ? 1.0F : 0.4F);
this.btn.setPreferredSize(new Dimension(21, 21));
this.editor.add(this.btn, "East");
this.textField.setOpaque(false);
@ -117,36 +116,6 @@ public class FormXDateEditor extends XDirectWriteEditor {
}
return this.editor;
}
@Override
protected void initXCreatorProperties() {
super.initXCreatorProperties();
this.initFieldText();
}
@Override
protected void makeVisible(boolean visible) {
this.btn.makeVisible(visible);
}
@Override
protected XLayoutContainer getCreatorWrapper(String widgetName) {
return new XWScaleLayout();
}
@Override
protected void addToWrapper(XLayoutContainer parentPanel, int width, int minHeight) {
this.setSize(width, minHeight);
parentPanel.add(this);
}
@Override
public boolean shouldScaleCreator() {
return true;
}
@Override
public void firePropertyChange() {
this.initFieldText();
}
}

39
src/main/java/com/fr/plugin/sqy/kj/calendar/parameter/ParameterXDateEditor.java

@ -1,10 +1,9 @@
package com.fr.plugin.sqy.kj.calendar.parameter;
import com.fanruan.api.design.DesignKit;
import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.design.designer.creator.XDirectWriteEditor;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWScaleLayout;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -104,14 +103,12 @@ public class ParameterXDateEditor extends XDirectWriteEditor {
}
@Override
protected JComponent initEditor() {
if (this.editor == null) {
this.editor = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.editor.add(this.textField = new UITextField(5), "Center");
this.btn = new LimpidButton("sqy_form_calendar", this.getIconPath(), this.toData().isVisible() ? 1.0F : 0.4F);
this.btn = new LimpidButton("", this.getIconPath(), this.toData().isVisible() ? 1.0F : 0.4F);
this.btn.setPreferredSize(new Dimension(21, 21));
this.editor.add(this.btn, "East");
this.textField.setOpaque(false);
@ -119,38 +116,6 @@ public class ParameterXDateEditor extends XDirectWriteEditor {
}
return this.editor;
}
@Override
protected void initXCreatorProperties() {
super.initXCreatorProperties();
this.initFieldText();
}
@Override
protected void makeVisible(boolean visible) {
this.btn.makeVisible(visible);
}
@Override
protected XLayoutContainer getCreatorWrapper(String widgetName) {
return new XWScaleLayout();
}
@Override
protected void addToWrapper(XLayoutContainer parentPanel, int width, int minHeight) {
this.setSize(width, minHeight);
parentPanel.add(this);
}
@Override
public boolean shouldScaleCreator() {
return true;
}
@Override
public void firePropertyChange() {
this.initFieldText();
}
}

3
src/main/java/com/fr/plugin/sqy/kj/calendar/widget/CellCalendarWidget.java

@ -16,8 +16,7 @@ public class CellCalendarWidget extends DateEditor {
@Override
public String getXType() {
//return PluginConstants.KJ_CELL_ID;
return PluginConstants.KJ_FORM_ID;
return PluginConstants.KJ_CELL_ID;
}
@Override

3
src/main/java/com/fr/plugin/sqy/kj/calendar/widget/ParameterCalendarWidget.java

@ -16,8 +16,7 @@ public class ParameterCalendarWidget extends DateEditor {
@Override
public String getXType() {
//return PluginConstants.KJ_PARAMETER_ID;
return PluginConstants.KJ_FORM_ID;
return PluginConstants.KJ_PARAMETER_ID;
}
@Override

Loading…
Cancel
Save