/[classpath]/classpath/java/awt/Component.java
ViewVC logotype

Diff of /classpath/java/awt/Component.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by mkoch, Mon Dec 6 13:56:33 2004 UTC revision 1.51 by mark, Sat Dec 11 08:20:49 2004 UTC
# Line 1362  public abstract class Component Line 1362  public abstract class Component
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;
# Line 1386  public abstract class Component Line 1386  public abstract class Component
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);

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26