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 2bac8fcad0..9236deb4ad 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; @@ -1205,6 +1206,7 @@ public class MultiTemplateTabPane extends JComponent { private class MultiTemplateTabMouseListener implements MouseListener { + private boolean oldLightWeightPopupEnabled; /** * 鼠标进入 @@ -1213,7 +1215,8 @@ public class MultiTemplateTabPane extends JComponent { */ @Override public void mouseEntered(MouseEvent e) { - // do nothing + this.oldLightWeightPopupEnabled = ToolTipManager.sharedInstance().isLightWeightPopupEnabled(); + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); } /** @@ -1223,6 +1226,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;