From c52d2ca8185327d40f995873b7d09afdb0784380 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Thu, 27 Dec 2018 15:35:21 +0800 Subject: [PATCH] ct --- .../design/fun/JavaScriptActionProvider.java | 17 +++++++++++++++-- .../impl/AbstractJavaScriptActionProvider.java | 18 +++++++++++++----- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java index 93b6cab2fe..5f1f1aa5aa 100644 --- a/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/JavaScriptActionProvider.java @@ -2,11 +2,12 @@ package com.fr.design.fun; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.javascript.JavaScriptActionPane; +import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.mark.Mutable; /** - * Created by zack on 2015/8/14. + * 控件的事件扩展接口 */ public interface JavaScriptActionProvider extends Mutable{ @@ -14,9 +15,21 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; + /** + * 事件的界面 + */ FurtherBasicBeanPane getJavaScriptActionPane(); + /** + * 这个界面在哪些类型模板设计的时候会出现 + * @see com.fr.design.mainframe.JWorkBook + * @see com.fr.design.mainframe.JForm + */ + boolean accept(JTemplate template); + + @Deprecated FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); - boolean isSupportType(); + @Deprecated + boolean isSupportType(); } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 9928124cfb..7f57f35a5d 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -3,6 +3,8 @@ package com.fr.design.fun.impl; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.fun.JavaScriptActionProvider; import com.fr.design.javascript.JavaScriptActionPane; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.JTemplate; import com.fr.js.JavaScript; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -26,11 +28,17 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { return getJavaScriptActionPane(); } - - /** - * 判断是否是支持的类型(cpt,frm),默认是 - * @return - */ + + @Override + public boolean accept(JTemplate template) { + // 这里只是为了兼容原来的isSupportType方法 + boolean result = isSupportType(); + if (result) { + return true; + } + return true; + } + @Override public boolean isSupportType(){ return true;