From 14adf14d853123cc7839a4467312d86239fca104 Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 23 Aug 2016 15:27:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=A9=E5=B1=95=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=8BAbstractJavaScriptActionProvider=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 0000000000..5baaddde88 --- /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 d293939443..cd6f9eeb6b 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()); } } From a7a54cd2b5dec92165cacd0a98d269eeefbd9986 Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 23 Aug 2016 15:56:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/fun/JavaScriptActionProvider.java | 6 ++++++ ...AbstractJavaScriptActionExtensionProvider.java | 15 --------------- .../impl/AbstractJavaScriptActionProvider.java | 5 +++++ .../design/javascript/JavaScriptActionPane.java | 5 +---- 4 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java diff --git a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java index dfb4cdca09..f860b3b148 100644 --- a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java @@ -1,6 +1,7 @@ package com.fr.design.fun; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.javascript.JavaScriptActionPane; import com.fr.js.JavaScript; import com.fr.stable.fun.mark.Mutable; @@ -13,6 +14,11 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; + /** + * 传给插件额外参数 + * @param pane + */ + void setJavaScriptActionPane(JavaScriptActionPane pane); FurtherBasicBeanPane getJavaScriptActionPane(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java deleted file mode 100644 index 5baaddde88..0000000000 --- a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -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/fun/impl/AbstractJavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 504a8b73ef..6356970746 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -1,6 +1,7 @@ package com.fr.design.fun.impl; import com.fr.design.fun.JavaScriptActionProvider; +import com.fr.design.javascript.JavaScriptActionPane; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -18,4 +19,8 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public String mark4Provider() { return getClass().getName(); } + + @Override + public void setJavaScriptActionPane(JavaScriptActionPane pane) { + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index cd6f9eeb6b..a74f3deca9 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -3,7 +3,6 @@ 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; @@ -57,9 +56,7 @@ 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); - } + jsp.setJavaScriptActionPane(this); paneList.add(jsp.getJavaScriptActionPane()); } } From 2c9a6f3ff8e5d265579edf073912145fd9345b44 Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 23 Aug 2016 17:09:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/fun/JavaScriptActionProvider.java | 9 +++------ .../fun/impl/AbstractJavaScriptActionProvider.java | 5 ++++- .../com/fr/design/javascript/JavaScriptActionPane.java | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java index f860b3b148..f3e00932a3 100644 --- a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java @@ -14,11 +14,8 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; - /** - * 传给插件额外参数 - * @param pane - */ - void setJavaScriptActionPane(JavaScriptActionPane pane); - FurtherBasicBeanPane getJavaScriptActionPane(); + + FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane); + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 6356970746..69e2770320 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -1,7 +1,9 @@ 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.js.JavaScript; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -21,6 +23,7 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider } @Override - public void setJavaScriptActionPane(JavaScriptActionPane pane) { + public FurtherBasicBeanPane getJavaScriptActionPane(JavaScriptActionPane pane) { + return getJavaScriptActionPane(); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index a74f3deca9..52648e444a 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -56,8 +56,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - jsp.setJavaScriptActionPane(this); - paneList.add(jsp.getJavaScriptActionPane()); + paneList.add(jsp.getJavaScriptActionPane(this)); } } // 自定义事件