1362 |
peer.setBounds (x, y, width, height); |
peer.setBounds (x, y, width, height); |
1363 |
|
|
1364 |
// Erase old bounds and repaint new bounds for lightweights. |
// Erase old bounds and repaint new bounds for lightweights. |
1365 |
if (isLightweight()) |
if (isLightweight() && isShowing ()) |
1366 |
{ |
{ |
1367 |
boolean shouldRepaintParent = false; |
boolean shouldRepaintParent = false; |
1368 |
boolean shouldRepaintSelf = false; |
boolean shouldRepaintSelf = false; |
1386 |
repaint(); |
repaint(); |
1387 |
} |
} |
1388 |
|
|
1389 |
if (oldx != x || oldy != y) |
// Only post event if this component is visible and has changed size. |
1390 |
|
if (isShowing () |
1391 |
|
&& (oldx != x || oldy != y)) |
1392 |
{ |
{ |
1393 |
ComponentEvent ce = new ComponentEvent(this, |
ComponentEvent ce = new ComponentEvent(this, |
1394 |
ComponentEvent.COMPONENT_MOVED); |
ComponentEvent.COMPONENT_MOVED); |
1395 |
getToolkit().getSystemEventQueue().postEvent(ce); |
getToolkit().getSystemEventQueue().postEvent(ce); |
1396 |
} |
} |
1397 |
if (oldwidth != width || oldheight != height) |
if (isShowing () |
1398 |
|
&& (oldwidth != width || oldheight != height)) |
1399 |
{ |
{ |
1400 |
ComponentEvent ce = new ComponentEvent(this, |
ComponentEvent ce = new ComponentEvent(this, |
1401 |
ComponentEvent.COMPONENT_RESIZED); |
ComponentEvent.COMPONENT_RESIZED); |