IDEA-76974 Invisible blocks prevent clicks on text

This commit is contained in:
andrey.zaytsev
2012-11-06 21:03:44 +04:00
parent ca700abcb5
commit dfd77afe93
@@ -1228,6 +1228,7 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui, SwingConstants {
add(myContent);
disposeCloseButton();
myCloseRec = new CloseButton();
}
@@ -1327,16 +1328,20 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui, SwingConstants {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (myCloseRec != null && myCloseRec.getParent() != null) {
Container parent = myCloseRec.getParent();
parent.remove(myCloseRec);
((JComponent)parent).revalidate();
parent.repaint();
}
disposeCloseButton();
}
});
}
private void disposeCloseButton() {
if (myCloseRec != null && myCloseRec.getParent() != null) {
Container parent = myCloseRec.getParent();
parent.remove(myCloseRec);
((JComponent)parent).revalidate();
parent.repaint();
}
}
public void setAlpha(float alpha) {
myAlpha = alpha;
paintImmediately(0, 0, getWidth(), getHeight());