List of usage examples for com.google.gwt.user.client.ui Widget setParent
void setParent(Widget parent)
From source file:org.zkoss.gwt.client.zk.Container.java
License:Open Source License
@Override public void add(com.google.gwt.user.client.ui.Widget child) { /** Validate */ if (!(child instanceof Widget)) { throw new RuntimeException("must be ZK Widget!"); }//from ww w. j a va 2 s . c o m Widget zChild = (Widget) child; /** adjust for Re Insertion */ /** Detach Child */ if (zChild.isAttached()) { zChild.removeFromParent(); } /** Logical Attach */ /** Physical Attach */ appendChild((zChild).getZkWidget()); /** Adopt */ zChild.setParent(this); }