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 |
/** |
/** |
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. |
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. |