balloon: shadow gets updated on change size

This commit is contained in:
Kirill Kalishev
2011-12-20 12:04:04 +03:00
committed by kirillk
parent efd6dd9c91
commit c3884ed4b3
@@ -1330,6 +1330,11 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
}
public void _setBounds(Rectangle bounds) {
Rectangle currentBounds = getBounds();
if (currentBounds.width != bounds.width || currentBounds.height != bounds.height) {
invalidateShadowImage();
}
super.setBounds(bounds);
if (myCloseRec.getParent() == null && getParent() != null) {
myLayeredPane.add(myCloseRec);
@@ -1357,6 +1362,11 @@ public class BalloonImpl implements Balloon, IdeTooltip.Ui {
}
}
private void invalidateShadowImage() {
myImage = null;
myShadow = null;
}
public void repaintButton() {
myCloseRec.repaint();
}