Browse Source

REPORT-95362 fix:tab上的toolTip被截断

newui
Carlson 2 years ago
parent
commit
5e45ab2f60
  1. 8
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

8
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;

Loading…
Cancel
Save