Example usage for com.google.gwt.user.client.ui AttachDetachException tryCommand

List of usage examples for com.google.gwt.user.client.ui AttachDetachException tryCommand

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui AttachDetachException tryCommand.

Prototype

public static void tryCommand(Command c, IsWidget... widgets) 

Source Link

Document

Iterator through all child widgets, trying to perform the specified Command for each.

Usage

From source file:com.ait.toolkit.sencha.touch.client.core.ComplexContainer.java

License:Open Source License

void doLogicalClear() {
    if (orphanCommand == null) {
        orphanCommand = new AttachDetachException.Command() {
            public void execute(Widget w) {
                orphan(w);//from   w ww .j  a  va2  s.co  m
            }
        };
    }
    try {
        AttachDetachException.tryCommand(this, orphanCommand);
    } finally {
        children = new WidgetCollection(this);
    }
}

From source file:com.sencha.gxt.widget.core.client.container.Container.java

License:sencha.com license

@Override
protected void doAttachChildren() {
    AttachDetachException.tryCommand(this, getAttachException());
}

From source file:com.sencha.gxt.widget.core.client.container.Container.java

License:sencha.com license

@Override
protected void doDetachChildren() {
    AttachDetachException.tryCommand(this, getDetachException());
}

From source file:org.gwt.dynamic.common.client.widgets.WrapPanel.java

License:MIT License

private static void detachWidgets() {
    // When the window is closing, detach all widgets that need to be
    // cleaned up. This will cause all of their event listeners
    // to be unhooked, which will avoid potential memory leaks.
    try {/*from  www.  j a va 2 s . c  o m*/
        AttachDetachException.tryCommand(widgetsToDetach, maybeDetachCommand);
    } finally {
        widgetsToDetach.clear();
    }
}

From source file:time.client.widget.FocusFlowPanel.java

License:Apache License

private void doLocalLogicalClear() {
    if (orphanCommand == null) {
        orphanCommand = new AttachDetachException.Command() {

            public void execute(Widget w) {
                orphan(w);/*from  w  ww  .  j  a  v  a 2  s.co  m*/
            }
        };
    }
    try {
        AttachDetachException.tryCommand(this, orphanCommand);
    } finally {
        while (getChildren().size() > 0)
            getChildren().remove(0);
    }
}