Example usage for com.google.gwt.user.client.ui HasWidgets.ForIsWidget clear

List of usage examples for com.google.gwt.user.client.ui HasWidgets.ForIsWidget clear

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui HasWidgets.ForIsWidget clear.

Prototype

void clear();

Source Link

Document

Removes all child widgets.

Usage

From source file:org.xdi.oxd.license.admin.client.ui.MainPanelPresenter.java

@Override
public void go(HasWidgets.ForIsWidget container) {

    container.clear();
    checkState();/*w  w  w. j a  v a  2  s  .  c o m*/

    container.add(view);

    view.getLogoutButton().addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            LoginController.logout();
        }
    });

    new LicenseCryptTabPresenter(view.getLicenseCryptTab());
    Admin.getService().isGenerationApiProtected(new AsyncCallback<Boolean>() {
        @Override
        public void onFailure(Throwable caught) {
            view.getApiNotProtectedAlert().setVisible(true);
        }

        @Override
        public void onSuccess(Boolean result) {
            view.getApiNotProtectedAlert().setVisible(!result);
        }
    });
}