/[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.76 by langel, Fri Sep 23 20:35:06 2005 UTC revision 1.77 by rabbit78, Tue Sep 27 14:03:25 2005 UTC
# Line 901  public abstract class Component Line 901  public abstract class Component
901          if (currentPeer != null)          if (currentPeer != null)
902              currentPeer.setVisible(true);              currentPeer.setVisible(true);
903    
904            // The JDK repaints the component before invalidating the parent.
905            // So do we.
906            repaint();
907          // Invalidate the parent if we have one. The component itself must          // Invalidate the parent if we have one. The component itself must
908          // not be invalidated. We also avoid NullPointerException with          // not be invalidated. We also avoid NullPointerException with
909          // a local reference here.          // a local reference here.
910          Container currentParent = parent;          Container currentParent = parent;
911          if (currentParent != null)          if (currentParent != null)
912            {            currentParent.invalidate();
             currentParent.invalidate();  
             currentParent.repaint();  
           }  
913    
914          ComponentEvent ce =          ComponentEvent ce =
915            new ComponentEvent(this,ComponentEvent.COMPONENT_SHOWN);            new ComponentEvent(this,ComponentEvent.COMPONENT_SHOWN);
# Line 947  public abstract class Component Line 947  public abstract class Component
947              currentPeer.setVisible(false);              currentPeer.setVisible(false);
948                    
949          this.visible = false;          this.visible = false;
950            
951            // The JDK repaints the component before invalidating the parent.
952            // So do we.
953            repaint();
954          // Invalidate the parent if we have one. The component itself must          // Invalidate the parent if we have one. The component itself must
955          // not be invalidated. We also avoid NullPointerException with          // not be invalidated. We also avoid NullPointerException with
956          // a local reference here.          // a local reference here.
957          Container currentParent = parent;          Container currentParent = parent;
958          if (currentParent != null)          if (currentParent != null)
959            {            currentParent.invalidate();
             currentParent.invalidate();  
             currentParent.repaint();  
           }  
960    
961          ComponentEvent ce =          ComponentEvent ce =
962            new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN);            new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN);

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.77

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