From 68a18ce3a2aafa0896875c6420284c0d2b4fa6c0 Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Mon, 22 Nov 2021 17:33:49 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62808=20=E5=85=AC=E5=BC=8F=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E4=BC=98=E5=8C=96=EF=BC=8C=E8=BE=85=E5=8A=A9?= =?UTF-8?q?=E6=A1=86=E5=86=85=E9=80=89=E6=8B=A9=E5=87=BD=E6=95=B0=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=87=BD=E6=95=B0=E5=90=8D=E6=B2=A1=E6=9C=89=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E8=B7=B3=E8=BD=AC=201.=E4=BF=AE=E5=A4=8D=E5=8D=95?= =?UTF-8?q?=E5=87=BB=E5=AE=9E=E7=8E=B0=E5=81=B6=E7=84=B6=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84bug=EF=BC=9B=202.=E4=BF=AE=E5=A4=8D=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E9=94=AE=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84bug=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FormulaAutoCompletePopupWindow.java | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/autocomplete/FormulaAutoCompletePopupWindow.java b/designer-base/src/main/java/com/fr/design/gui/autocomplete/FormulaAutoCompletePopupWindow.java index 0efd20076..760af0ad5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/autocomplete/FormulaAutoCompletePopupWindow.java +++ b/designer-base/src/main/java/com/fr/design/gui/autocomplete/FormulaAutoCompletePopupWindow.java @@ -152,7 +152,32 @@ class FormulaAutoCompletePopupWindow extends JWindow implements CaretListener, list.setCellRenderer(new DelegatingCellRenderer()); list.addListSelectionListener(this); - list.addMouseListener(this); + list.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + + } + + @Override + public void mousePressed(MouseEvent e) { + + } + + @Override + public void mouseReleased(MouseEvent e) { + + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } + }); JPanel contentPane = new JPanel(new BorderLayout()); JScrollPane sp = new JScrollPane(list, @@ -373,9 +398,6 @@ class FormulaAutoCompletePopupWindow extends JWindow implements CaretListener, public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2 && e.getButton() == 1) { insertSelectedCompletion(); - refreshInstallComp(); - } else if (e.getClickCount() == 1) { - refreshInstallComp(); } } @@ -389,6 +411,7 @@ class FormulaAutoCompletePopupWindow extends JWindow implements CaretListener, public void mousePressed(MouseEvent e) { + refreshInstallComp(); } @@ -818,6 +841,7 @@ class FormulaAutoCompletePopupWindow extends JWindow implements CaretListener, public void actionPerformed(ActionEvent e) { if (isVisible()) { selectNextItem(); + refreshInstallComp(); } } @@ -994,6 +1018,7 @@ class FormulaAutoCompletePopupWindow extends JWindow implements CaretListener, public void actionPerformed(ActionEvent e) { if (isVisible()) { selectPreviousItem(); + refreshInstallComp(); } }