List of usage examples for com.google.gwt.user.client.ui Widget isAttached
@Override public boolean isAttached()
From source file:org.xwiki.gwt.user.client.ui.LoadingPanel.java
License:Open Source License
/** * Shows the loading animation.// w ww . jav a 2 s.com * * @param widget the widget whose loading state will be indicated */ public void startLoading(Widget widget) { if (widget.isAttached()) { stopLoading(); getElement().getStyle().setWidth(widget.getOffsetWidth(), Unit.PX); getElement().getStyle().setHeight(widget.getOffsetHeight(), Unit.PX); widget.getElement().getParentNode().insertBefore(getElement(), widget.getElement()); } }
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 w w w . j a v a2 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); }
From source file:ru.fly.client.ui.Container.java
License:Apache License
@Override public boolean remove(Widget w) { widgets.remove(w);//from w ww . j av a 2s . c o m if (w.isAttached()) F.erase(this, w); return true; }
From source file:ru.fly.client.ui.Container.java
License:Apache License
@Override protected void doDetachChildren() { for (Widget w : widgets) { if (w.isAttached()) F.erase(this, w); }/*from w w w . j a v a 2 s. c o m*/ super.doDetachChildren(); }