From 5e45ab2f60cd9fabb037c7aebe20863f9620b2fa Mon Sep 17 00:00:00 2001 From: Carlson Date: Sat, 6 May 2023 14:17:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-95362=20fix:tab=E4=B8=8A=E7=9A=84toolTip?= =?UTF-8?q?=E8=A2=AB=E6=88=AA=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/MultiTemplateTabPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java index aa64244dee..8e74eaacd4 100644 --- a/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java @@ -44,6 +44,7 @@ import javax.swing.JSeparator; import javax.swing.MenuElement; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; +import javax.swing.ToolTipManager; import javax.swing.plaf.basic.BasicMenuItemUI; import java.awt.AWTEvent; import java.awt.AlphaComposite; @@ -1153,6 +1154,7 @@ public class MultiTemplateTabPane extends JComponent { private class MultiTemplateTabMouseListener implements MouseListener { + private boolean oldLightWeightPopupEnabled; /** * 鼠标进入 @@ -1161,7 +1163,8 @@ public class MultiTemplateTabPane extends JComponent { */ @Override public void mouseEntered(MouseEvent e) { - // do nothing + this.oldLightWeightPopupEnabled = ToolTipManager.sharedInstance().isLightWeightPopupEnabled(); + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); } /** @@ -1171,6 +1174,9 @@ public class MultiTemplateTabPane extends JComponent { */ @Override public void mouseExited(MouseEvent e) { + ToolTipManager.sharedInstance().setEnabled(false); + ToolTipManager.sharedInstance().setEnabled(true); + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(this.oldLightWeightPopupEnabled); listDownMode = LIST_DOWN; closeIconIndex = -1; mouseOveredIndex = -1;