From f924ace68d225ad833c15b5915aa2be5ee856304 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 5 Sep 2018 23:15:24 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-11059=20=E6=8F=92=E5=85=A5=E8=A1=8C?= =?UTF-8?q?=E7=AD=96=E7=95=A5=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=80=BC=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BA=E5=85=AC=E5=BC=8F=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=85=AC=E7=A4=BA=E5=90=8E=E4=B8=8D=E8=83=BD=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=81=EF=BC=81=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/editor/ValueEditorPane.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java index 4ebe3c83fa..588fc1218a 100644 --- a/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/editor/ValueEditorPane.java @@ -344,8 +344,24 @@ public class ValueEditorPane extends BasicPane implements UIObserver, GlobalName * * @param listener 观察者监听事件 */ + @Override public void registerNameListener(GlobalNameListener listener) { globalNameListener = listener; + for (Editor card : cards) { + doLoop(card, listener); + } + } + + private void doLoop(Container card, GlobalNameListener listener) { + for (int i = 0, len = card.getComponentCount(); i < len; i++) { + Component tmpComp = card.getComponent(i); + if (tmpComp instanceof Container) { + doLoop((Container) tmpComp, listener); + } + if (tmpComp instanceof GlobalNameObserver) { + ((GlobalNameObserver) tmpComp).registerNameListener(listener); + } + } } /**