From 69fee8f6786f8b5d11b91dd6391b68bd1c06ff20 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 9 Dec 2019 20:14:21 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-24561=20=E9=80=9A=E8=BF=87=E7=AE=AD?= =?UTF-8?q?=E5=A4=B4=E6=8C=89=E9=92=AE=E8=A7=A6=E5=8F=91=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/icombocheckbox/UIComboCheckBox.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java index 25be23b2c7..e2a5719d4b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java @@ -15,6 +15,8 @@ import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; +import javax.swing.event.PopupMenuEvent; +import javax.swing.event.PopupMenuListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -149,6 +151,22 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam attributeChange(); } }); + UIComboCheckBox.this.popup.addPopupMenuListener(new PopupMenuListener() { + @Override + public void popupMenuWillBecomeVisible(PopupMenuEvent e) { + // do nothing + } + + @Override + public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { + attributeChange(); + } + + @Override + public void popupMenuCanceled(PopupMenuEvent e) { + // do nothing + } + }); } }; editor.setEditable(false);