public void execute(Widget w) { w.onDetach(); } };
@Override protected void onDetach() { // When the menu is detached, make sure to close all of its children. if (popup != null) { popup.hide(); } super.onDetach(); }
public void execute(Widget w) { if (w.isAttached()) { w.onDetach(); } } };
/** * Marks a widget as detached and removes it from the detach list. * * <p> * If an element belonging to a widget originally passed to * {@link #detachOnWindowClose(Widget)} has been removed from the document, * calling this method will cause it to be marked as detached immediately. * Failure to do so will keep the widget from being garbage collected until * the page is unloaded. * </p> * * <p> * This method may only be called per widget, and only for widgets that were * originally passed to {@link #detachOnWindowClose(Widget)}. * </p> * * @param widget the widget that no longer needs to be cleaned up when the * page closes * @see #detachOnWindowClose(Widget) */ public static void detachNow(Widget widget) { assert widgetsToDetach.contains(widget) : "detachNow() called on a widget " + "not currently in the detach list"; try { widget.onDetach(); } finally { widgetsToDetach.remove(widget); } }
@Override protected void onDetach() { /* * Detach the event listener in onDetach instead of onUnload so users cannot * accidentally override it. */ Event.setEventListener(getScrollableElement(), null); super.onDetach(); } }
@Override protected void doDetachChildren() { try { super.doDetachChildren(); } finally { /* * We need to detach the caption specifically because it is not part of * the iterator of Widgets that the {@link SimplePanel} super class * returns. This is similar to a {@link ComplexPanel}, but we do not want * to expose the caption widget, as its just an internal implementation. */ caption.asWidget().onDetach(); } }
@Override protected void onDetach() { try { onUnload(); doDetachChildren(); AttachEvent.fire(this, false); } finally { // We don't want an exception in user code to keep us from calling the // super implementation (or event listeners won't get cleaned up and // the attached flag will be wrong). widget.onDetach(); } }
try { if (oldParent != null && oldParent.isAttached()) { onDetach(); assert !isAttached() : "Failure of " + this.getClass().getName() + " to call super.onDetach()";
public void execute(Widget w) { w.onDetach(); } };
public void execute(Widget w) { w.onDetach(); } };
@Override protected void onDetach() { // When the menu is detached, make sure to close all of its children. if (popup != null) { popup.hide(); } super.onDetach(); }
@Override protected void onDetach() { // When the menu is detached, make sure to close all of its children. if (popup != null) { popup.hide(); } super.onDetach(); }
@Override protected void onDetach() { super.onDetach(); onDetachHelper(); }
public void execute(Widget w) { if (w.isAttached()) { w.onDetach(); } } };
public void execute(Widget w) { if (w.isAttached()) { w.onDetach(); } } };
@Override protected void onDetach() { /* * Detach the event listener in onDetach instead of onUnload so users cannot * accidentally override it. */ Event.setEventListener(getScrollableElement(), null); super.onDetach(); } }
@Override protected void onDetach() { /* * Detach the event listener in onDetach instead of onUnload so users cannot * accidentally override it. */ Event.setEventListener(getScrollableElement(), null); super.onDetach(); } }
@Override protected void doDetachChildren() { try { super.doDetachChildren(); } finally { /* * We need to detach the caption specifically because it is not part of * the iterator of Widgets that the {@link SimplePanel} super class * returns. This is similar to a {@link ComplexPanel}, but we do not want * to expose the caption widget, as its just an internal implementation. */ caption.asWidget().onDetach(); } }
@Override protected void onDetach() { try { onUnload(); doDetachChildren(); AttachEvent.fire(this, false); } finally { // We don't want an exception in user code to keep us from calling the // super implementation (or event listeners won't get cleaned up and // the attached flag will be wrong). widget.onDetach(); } }
@Override protected void onDetach() { try { onUnload(); doDetachChildren(); AttachEvent.fire(this, false); } finally { // We don't want an exception in user code to keep us from calling the // super implementation (or event listeners won't get cleaned up and // the attached flag will be wrong). widget.onDetach(); } }