src/java.desktop/share/classes/java/awt/Container.java

Print this page

        

*** 818,828 **** if (comp instanceof Container) { reparentTraverse(parentPeer, (Container)comp); } } else { // Q: Need to update NativeInLightFixer? ! comp.getPeer().reparent(parentPeer); } } } /** --- 818,828 ---- if (comp instanceof Container) { reparentTraverse(parentPeer, (Container)comp); } } else { // Q: Need to update NativeInLightFixer? ! comp.peer.reparent(parentPeer); } } } /**
*** 838,851 **** } if (comp.isLightweight()) { // If component is lightweight container we need to reparent all its explicit heavyweight children if (comp instanceof Container) { // Traverse component's tree till depth-first until encountering heavyweight component ! reparentTraverse((ContainerPeer)getPeer(), (Container)comp); } } else { ! comp.getPeer().reparent((ContainerPeer)getPeer()); } } /** * Adds component to this container. Tries to minimize side effects of this adding - --- 838,851 ---- } if (comp.isLightweight()) { // If component is lightweight container we need to reparent all its explicit heavyweight children if (comp instanceof Container) { // Traverse component's tree till depth-first until encountering heavyweight component ! reparentTraverse((ContainerPeer)peer, (Container)comp); } } else { ! comp.peer.reparent((ContainerPeer) peer); } } /** * Adds component to this container. Tries to minimize side effects of this adding -
*** 4193,4203 **** if (comp instanceof Container) { ((Container)comp).recursiveShowHeavyweightChildren(); } } else { if (comp.isVisible()) { ! ComponentPeer peer = comp.getPeer(); if (peer != null) { peer.setVisible(true); } } } --- 4193,4203 ---- if (comp instanceof Container) { ((Container)comp).recursiveShowHeavyweightChildren(); } } else { if (comp.isVisible()) { ! ComponentPeer peer = comp.peer; if (peer != null) { peer.setVisible(true); } } }
*** 4215,4225 **** if (comp instanceof Container) { ((Container)comp).recursiveHideHeavyweightChildren(); } } else { if (comp.isVisible()) { ! ComponentPeer peer = comp.getPeer(); if (peer != null) { peer.setVisible(false); } } } --- 4215,4225 ---- if (comp instanceof Container) { ((Container)comp).recursiveHideHeavyweightChildren(); } } else { if (comp.isVisible()) { ! ComponentPeer peer = comp.peer; if (peer != null) { peer.setVisible(false); } } }
*** 4237,4247 **** final Point newOrigin = new Point(origin); newOrigin.translate(comp.getX(), comp.getY()); ((Container)comp).recursiveRelocateHeavyweightChildren(newOrigin); } } else { ! ComponentPeer peer = comp.getPeer(); if (peer != null) { peer.setBounds(origin.x + comp.getX(), origin.y + comp.getY(), comp.getWidth(), comp.getHeight(), ComponentPeer.SET_LOCATION); } --- 4237,4247 ---- final Point newOrigin = new Point(origin); newOrigin.translate(comp.getX(), comp.getY()); ((Container)comp).recursiveRelocateHeavyweightChildren(newOrigin); } } else { ! ComponentPeer peer = comp.peer; if (peer != null) { peer.setBounds(origin.x + comp.getX(), origin.y + comp.getY(), comp.getWidth(), comp.getHeight(), ComponentPeer.SET_LOCATION); }