From 14adf14d853123cc7839a4467312d86239fca104 Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 23 Aug 2016 15:27:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E4=BA=86=E4=B8=80=E4=B8=8BAb?= =?UTF-8?q?stractJavaScriptActionProvider=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...AbstractJavaScriptActionExtensionProvider.java | 15 +++++++++++++++ .../design/javascript/JavaScriptActionPane.java | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java new file mode 100644 index 000000000..5baaddde8 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java @@ -0,0 +1,15 @@ +package com.fr.design.fun.impl; + +import com.fr.design.javascript.JavaScriptActionPane; + +/** + * Created by loy on 16/8/23. + */ +public abstract class AbstractJavaScriptActionExtensionProvider extends AbstractJavaScriptActionProvider { + + /** + * 传给插件额外参数 + * @param pane + */ + public abstract void setJavaScriptActionPane(JavaScriptActionPane pane); +} diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index d29393944..cd6f9eeb6 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -3,6 +3,7 @@ package com.fr.design.javascript; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.fun.JavaScriptActionProvider; +import com.fr.design.fun.impl.AbstractJavaScriptActionExtensionProvider; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; @@ -56,6 +57,9 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { + if (jsp instanceof AbstractJavaScriptActionExtensionProvider) { + ((AbstractJavaScriptActionExtensionProvider) jsp).setJavaScriptActionPane(this); + } paneList.add(jsp.getJavaScriptActionPane()); } }