From c9502311f96b5c9ebea5aab57a904a718185db71 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 15 Nov 2016 16:23:47 +0800 Subject: [PATCH] =?UTF-8?q?plot=20=E4=BC=A0=E5=85=A5=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/beans/BasicBeanPane.java | 8 ++++++++ .../gui/imenutable/UIMenuNameableCreator.java | 15 ++++++++++++--- .../SeriesCondition/DataSeriesConditionPane.java | 14 ++++++++++++-- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/beans/BasicBeanPane.java b/designer_base/src/com/fr/design/beans/BasicBeanPane.java index 2a8adfe19..2ecc7440a 100644 --- a/designer_base/src/com/fr/design/beans/BasicBeanPane.java +++ b/designer_base/src/com/fr/design/beans/BasicBeanPane.java @@ -23,6 +23,14 @@ public abstract class BasicBeanPane extends BasicPane { } + /** + * 设置plot + * @param plot + */ + public void setPlot(Object plot) { + + } + /** * 更新权限工具栏面板 */ diff --git a/designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java b/designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java index 5b6f8606d..9923bf5c1 100644 --- a/designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java +++ b/designer_base/src/com/fr/design/gui/imenutable/UIMenuNameableCreator.java @@ -9,13 +9,20 @@ public class UIMenuNameableCreator implements Nameable{ protected String name; protected Object obj; protected Class paneClazz; + protected Object edit; - public UIMenuNameableCreator(String name, Object obj, Class paneClazz) { + public UIMenuNameableCreator(Object edit, String name, Object obj, Class paneClazz) { + this.edit = edit; this.name = name; this.obj = obj; this.paneClazz = paneClazz; } + public UIMenuNameableCreator(String name, Object obj, Class paneClazz) { + this(null, name, obj, paneClazz); + } + + @Override public String getName() { return name; @@ -46,13 +53,15 @@ public class UIMenuNameableCreator implements Nameable{ } catch (IllegalAccessException e) { FRLogger.getLogger().error("UIMenuNameableCreator IllegalAccessException"); } - return new UIMenuNameableCreator(name, cloneObj, this.paneClazz); + return new UIMenuNameableCreator(edit, name, cloneObj, this.paneClazz); } public BasicBeanPane getPane() { try { - return this.paneClazz.newInstance(); + BasicBeanPane pane = this.paneClazz.newInstance(); + pane.setPlot(edit); + return pane; } catch (InstantiationException e) { } catch (IllegalAccessException e) { diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java index fe2107fb4..05579418b 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java @@ -27,13 +27,23 @@ import java.util.Iterator; * Time : 上午9:16 */ public class DataSeriesConditionPane extends ConditionAttributesPane { + protected Plot plot; - - public DataSeriesConditionPane() { + public DataSeriesConditionPane(Plot plot) { + this.plot = plot; initAvailableActionList(); initComponents(); } + @Override + public void setPlot(Object plot) { + this.plot = (Plot) plot; + } + + public DataSeriesConditionPane() { + this(null); + } + private void initAvailableActionList() { addBasicAction(); addAxisPositionAction();