/[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.80 by rabbit78, Wed Oct 12 15:25:10 2005 UTC revision 1.81 by rabbit78, Wed Oct 19 16:09:09 2005 UTC
# Line 762  public abstract class Component Line 762  public abstract class Component
762      if (! visible || peer == null)      if (! visible || peer == null)
763        return false;        return false;
764    
765      return parent == null ? true : parent.isShowing();      return parent == null ? false : parent.isShowing();
766    }    }
767    
768    /**    /**
# Line 903  public abstract class Component Line 903  public abstract class Component
903    
904          // The JDK repaints the component before invalidating the parent.          // The JDK repaints the component before invalidating the parent.
905          // So do we.          // So do we.
906          repaint();          if (isShowing())
907              repaint();
908          // Invalidate the parent if we have one. The component itself must          // Invalidate the parent if we have one. The component itself must
909          // not be invalidated. We also avoid NullPointerException with          // not be invalidated. We also avoid NullPointerException with
910          // a local reference here.          // a local reference here.
# Line 945  public abstract class Component Line 946  public abstract class Component
946          ComponentPeer currentPeer=peer;          ComponentPeer currentPeer=peer;
947          if (currentPeer != null)          if (currentPeer != null)
948              currentPeer.setVisible(false);              currentPeer.setVisible(false);
949                    boolean wasShowing = isShowing();
950          this.visible = false;          this.visible = false;
951    
952          // The JDK repaints the component before invalidating the parent.          // The JDK repaints the component before invalidating the parent.
953          // So do we.          // So do we.
954          repaint();          if (wasShowing)
955              repaint();
956          // Invalidate the parent if we have one. The component itself must          // Invalidate the parent if we have one. The component itself must
957          // not be invalidated. We also avoid NullPointerException with          // not be invalidated. We also avoid NullPointerException with
958          // a local reference here.          // a local reference here.

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

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