Example usage for com.google.gwt.user.client.ui HorizontalPanel setSpacing

List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setSpacing

Introduction

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

Prototype

public void setSpacing(int spacing) 

Source Link

Document

Sets the amount of spacing between this panel's cells.

Usage

From source file:fr.aliasource.webmail.client.settings.FolderSettingsTab.java

License:GNU General Public License

private void addCreateFolder() {
    createLabel = new HTML(I18N.strings.createFolder() + ":");
    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(createLabel);//from  w ww .  j  av  a 2s .c o  m
    hPanel.setCellVerticalAlignment(createLabel, HorizontalPanel.ALIGN_MIDDLE);
    folderName = new TextBox();

    hPanel.add(folderName);
    createButton = new Button(I18N.strings.create());
    createButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            createButton.setEnabled(false);
            createFolder();
        }
    });
    cancelButton = new Button(I18N.strings.cancel());
    cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            selectFolder(null);
        }
    });
    cancelButton.setVisible(false);
    hPanel.add(createButton);
    hPanel.add(cancelButton);
    hPanel.setSpacing(3);
    add(hPanel, DockPanel.NORTH);
}

From source file:fr.aliasource.webmail.client.View.java

License:GNU General Public License

/**
 * Show a simple text notification to the user for 3 seconds
 * /*from  www.  j av  a  2  s  .  c o  m*/
 * @param s
 */
public void notifyUser(String s) {
    GWT.log("notifyUser(" + s + ")", null);
    HorizontalPanel w = new HorizontalPanel();
    w.add(new Label(s));
    w.setSpacing(3);
    notifyUser(w, 3);
}

From source file:fr.drop.client.content.about.CwBasicText.java

License:Apache License

/**
 * Create a TextBox example that includes the text box and an optional handler
 * that updates a Label with the currently selected text.
 *
 * @param textBox the text box to handle
 * @param addSelection add handlers to update label
 * @return the Label that will be updated
 *//*from  w  w w.j a  v a 2 s.c o  m*/
@DropSource
private HorizontalPanel createTextExample(final TextBoxBase textBox, boolean addSelection) {
    // Add the text box and label to a panel
    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.setSpacing(4);
    hPanel.add(textBox);

    // Add handlers
    if (addSelection) {
        // Create the new label
        final Label label = new Label(constants.cwBasicTextSelected() + ": 0, 0");

        // Add a KeyUpHandler
        textBox.addKeyUpHandler(new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
                updateSelectionLabel(textBox, label);
            }
        });

        // Add a ClickHandler
        textBox.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                updateSelectionLabel(textBox, label);
            }
        });

        // Add the label to the box
        hPanel.add(label);
    }

    // Return the panel
    return hPanel;
}

From source file:gov.nih.nci.ncicb.tcgaportal.level4.gwt.anomalysearch.client.filter.RegionWidget.java

public RegionWidget() {
    includeRegion = new CheckBox("Chrom");
    includeRegion.setChecked(true);//from   w ww.  j  av a  2 s . c  o m

    chromosome = new ListBox();
    chromosome.setWidth("55px");
    for (int ichrom = 1; ichrom <= 22; ichrom++) {
        chromosome.addItem(ichrom + "");
    }

    start = WidgetHelper.getTextBoxWithValidator();
    start.removeStyleName(StyleConstants.TEXTBOX_WIDTH);
    start.setVisibleLength(5);
    stop = WidgetHelper.getTextBoxWithValidator();
    stop.removeStyleName(StyleConstants.TEXTBOX_WIDTH);
    stop.setVisibleLength(5);

    HorizontalPanel geneRegionSubPanel = new HorizontalPanel();
    geneRegionSubPanel.add(includeRegion);
    geneRegionSubPanel.add(chromosome);
    geneRegionSubPanel.add(new HTML("Start"));
    geneRegionSubPanel.add(start);
    geneRegionSubPanel.add(new HTML("Stop"));
    geneRegionSubPanel.add(stop);
    geneRegionSubPanel.addStyleName("marginLeft10px");
    geneRegionSubPanel.setSpacing(3);
    initWidget(geneRegionSubPanel);
}

From source file:gov.nih.nci.ncicb.tcgaportal.level4.gwt.anomalysearch.client.results.PagingHelper.java

public PagingHelper(CellPanel forPageInfo, CellPanel forRowInfo) {
    HorizontalPanel pagingControls = new HorizontalPanel();
    HTML pageHtml = new HTML("Page ");
    currentPageTb = WidgetHelper.getTextBoxWithValidator();
    currentPageTb.addStyleName(StyleConstants.TEXTBOX_WIDTH);

    //add style elements
    firstPageButton.addStyleName(StyleConstants.PAGING_BUTTON);
    previousPageButton.addStyleName(StyleConstants.PAGING_BUTTON);
    nextPageButton.addStyleName(StyleConstants.PAGING_BUTTON);
    lastPageButton.addStyleName(StyleConstants.PAGING_BUTTON);
    WidgetHelper.setDomId(lastPageButton, SeleniumTags.LASTPAGE_BUTTON);
    WidgetHelper.setDomId(nextPageButton, SeleniumTags.NEXTPAGE_BUTTON);
    WidgetHelper.setDomId(previousPageButton, SeleniumTags.PREVPAGE_BUTTON);
    WidgetHelper.setDomId(firstPageButton, SeleniumTags.FIRSTPAGE_BUTTON);
    totalRowDisplay.addStyleName("resultsInfoLabel");

    //add the buttons to the panel
    pagingControls.add(firstPageButton);
    pagingControls.add(previousPageButton);
    pagingControls.add(pageHtml);//from w w  w .j  a  v a2s . c o m
    pagingControls.add(currentPageTb);
    pagingControls.add(totalPagesHtml);
    pagingControls.add(nextPageButton);
    pagingControls.add(lastPageButton);
    pagingControls.setSpacing(5);
    pagingControls.setCellVerticalAlignment(pageHtml, HasVerticalAlignment.ALIGN_MIDDLE);
    pagingControls.setCellVerticalAlignment(totalPagesHtml, HasVerticalAlignment.ALIGN_MIDDLE);

    forPageInfo.add(pagingControls);
    forRowInfo.add(totalRowDisplay);
    forPageInfo.setCellHorizontalAlignment(pagingControls, HasHorizontalAlignment.ALIGN_RIGHT);
    forRowInfo.setCellHorizontalAlignment(totalRowDisplay, HasHorizontalAlignment.ALIGN_RIGHT);
}

From source file:gov.nist.appvet.gwt.client.gui.dialog.AppUploadDialogBox.java

License:Open Source License

public AppUploadDialogBox(String sessionId, String servletURL) {
    super(false, true);

    setSize("", "");
    setAnimationEnabled(false);/*www.j  av  a  2  s .  c o m*/

    final VerticalPanel dialogVPanel = new VerticalPanel();
    dialogVPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    dialogVPanel.addStyleName("dialogVPanel");
    dialogVPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    this.setWidget(dialogVPanel);
    dialogVPanel.setSize("", "");

    final SimplePanel simplePanel = new SimplePanel();
    simplePanel.setStyleName("appUploadPanel");
    dialogVPanel.add(simplePanel);
    dialogVPanel.setCellVerticalAlignment(simplePanel, HasVerticalAlignment.ALIGN_MIDDLE);
    dialogVPanel.setCellHorizontalAlignment(simplePanel, HasHorizontalAlignment.ALIGN_CENTER);
    simplePanel.setSize("", "");
    uploadAppForm = new FormPanel();
    simplePanel.setWidget(uploadAppForm);
    uploadAppForm.setAction(servletURL);
    uploadAppForm.setMethod(FormPanel.METHOD_POST);
    uploadAppForm.setEncoding(FormPanel.ENCODING_MULTIPART);
    uploadAppForm.setSize("", "");

    final VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    uploadAppForm.setWidget(verticalPanel);
    verticalPanel.setSize("", "");

    final Hidden hiddenCommand = new Hidden();
    hiddenCommand.setValue("SUBMIT_APP");
    hiddenCommand.setName("command");
    verticalPanel.add(hiddenCommand);
    hiddenCommand.setWidth("");

    final Hidden hiddenSessionId = new Hidden();
    hiddenSessionId.setName("sessionid");
    hiddenSessionId.setValue(sessionId);
    verticalPanel.add(hiddenSessionId);
    hiddenSessionId.setWidth("");

    final HorizontalPanel horizontalButtonPanel = new HorizontalPanel();
    horizontalButtonPanel.setStyleName("buttonPanel");
    dialogVPanel.add(horizontalButtonPanel);
    horizontalButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    dialogVPanel.setCellVerticalAlignment(horizontalButtonPanel, HasVerticalAlignment.ALIGN_MIDDLE);
    dialogVPanel.setCellHorizontalAlignment(horizontalButtonPanel, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setSpacing(10);
    horizontalButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setWidth("300px");
    verticalPanel.setCellWidth(horizontalButtonPanel, "100%");

    final Grid grid = new Grid(2, 2);
    grid.setStyleName("grid");
    verticalPanel.add(grid);
    verticalPanel.setCellHorizontalAlignment(grid, HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.setCellVerticalAlignment(grid, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.setSize("", "");

    final Label uploadLabel = new Label("App file: ");
    uploadLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
    grid.setWidget(0, 0, uploadLabel);
    uploadLabel.setStyleName("uploadLabel");
    uploadLabel.setSize("", "");
    fileUpload = new FileUpload();
    grid.setWidget(0, 1, fileUpload);
    grid.getCellFormatter().setWidth(0, 1, "");
    grid.getCellFormatter().setHeight(0, 1, "");
    fileUpload.setStyleName("appUpload");
    fileUpload.setTitle("Select app file to upload");
    fileUpload.setName("fileupload");
    fileUpload.setSize("240px", "");

    grid.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.getCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT);
    grid.getCellFormatter().setVerticalAlignment(1, 1, HasVerticalAlignment.ALIGN_MIDDLE);
    grid.getCellFormatter().setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_LEFT);
    grid.getCellFormatter().setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_LEFT);
    grid.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);
    submitAppStatusLabel = new Label("");
    submitAppStatusLabel.setStyleName("submissionRequirementsLabel");
    submitAppStatusLabel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.add(submitAppStatusLabel);
    verticalPanel.setCellHorizontalAlignment(submitAppStatusLabel, HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.setCellVerticalAlignment(submitAppStatusLabel, HasVerticalAlignment.ALIGN_MIDDLE);
    submitAppStatusLabel.setSize("", "18px");
    cancelButton = new PushButton("Cancel");
    cancelButton.setHTML("Cancel");
    horizontalButtonPanel.add(cancelButton);
    horizontalButtonPanel.setCellHorizontalAlignment(cancelButton, HasHorizontalAlignment.ALIGN_CENTER);
    cancelButton.setSize("70px", "18px");
    submitButton = new PushButton("Submit");
    horizontalButtonPanel.add(submitButton);
    horizontalButtonPanel.setCellHorizontalAlignment(submitButton, HasHorizontalAlignment.ALIGN_CENTER);
    submitButton.setSize("70px", "18px");
    submitButton.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            uploadAppForm.submit();
        }

    });
}

From source file:gov.nist.appvet.gwt.client.gui.dialog.DeleteAppConfirmDialogBox.java

License:Open Source License

public DeleteAppConfirmDialogBox(String appId, String appName) {
    super(false, true);

    setSize("", "");
    setAnimationEnabled(false);/*from  ww w. ja v  a  2  s.c o  m*/
    final VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.addStyleName("dialogVPanel");
    verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    this.setWidget(verticalPanel);
    verticalPanel.setSize("", "");

    final VerticalPanel verticalPanel_1 = new VerticalPanel();
    verticalPanel_1.setStyleName("messagePanel");
    verticalPanel.add(verticalPanel_1);
    verticalPanel_1.setWidth("320px");
    verticalPanel.setCellWidth(verticalPanel_1, "100%");

    final SimplePanel simplePanel = new SimplePanel();
    verticalPanel_1.add(simplePanel);
    verticalPanel_1.setCellWidth(simplePanel, "100%");
    simplePanel.setHeight("40px");

    final SimplePanel simplePanel_1 = new SimplePanel();
    verticalPanel_1.add(simplePanel_1);
    verticalPanel_1.setCellWidth(simplePanel_1, "100%");
    verticalPanel_1.setCellVerticalAlignment(simplePanel_1, HasVerticalAlignment.ALIGN_MIDDLE);
    verticalPanel_1.setCellHorizontalAlignment(simplePanel_1, HasHorizontalAlignment.ALIGN_CENTER);
    simplePanel_1.setSize("300px", "60px");

    final HTML htmlNewHtml = new HTML("<p align=\"center\">\r\nAre you sure you want to delete app #" + appId
            + " '" + appName + "'?\r\n</p>", true);
    htmlNewHtml.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    simplePanel_1.setWidget(htmlNewHtml);
    htmlNewHtml.setSize("", "");
    htmlNewHtml.setStyleName("errorDialogBox");

    final SimplePanel simplePanel_2 = new SimplePanel();
    verticalPanel_1.add(simplePanel_2);
    verticalPanel_1.setCellWidth(simplePanel_2, "100%");
    simplePanel_2.setHeight("40px");

    final HorizontalPanel horizontalButtonPanel = new HorizontalPanel();
    horizontalButtonPanel.setStyleName("buttonPanel");
    horizontalButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalButtonPanel.setSpacing(5);
    horizontalButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.add(horizontalButtonPanel);
    verticalPanel.setCellVerticalAlignment(horizontalButtonPanel, HasVerticalAlignment.ALIGN_MIDDLE);
    verticalPanel.setCellHorizontalAlignment(horizontalButtonPanel, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setWidth("320px");
    verticalPanel.setCellWidth(horizontalButtonPanel, "100%");
    cancelButton = new PushButton("No");
    cancelButton.setHTML("Cancel");
    horizontalButtonPanel.add(cancelButton);
    cancelButton.setSize("70px", "18px");
    horizontalButtonPanel.setCellVerticalAlignment(cancelButton, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalButtonPanel.setCellHorizontalAlignment(cancelButton, HasHorizontalAlignment.ALIGN_CENTER);
    okButton = new PushButton("Yes");
    okButton.setHTML("Ok");
    horizontalButtonPanel.add(okButton);
    horizontalButtonPanel.setCellHorizontalAlignment(okButton, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setCellVerticalAlignment(okButton, HasVerticalAlignment.ALIGN_MIDDLE);
    okButton.setSize("70px", "18px");
}

From source file:gov.nist.appvet.gwt.client.gui.dialog.DeleteUserConfirmDialogBox.java

License:Open Source License

public DeleteUserConfirmDialogBox(String userName) {
    super(false, true);

    setSize("", "");
    setAnimationEnabled(false);//from  www . j a va 2  s  .c om

    final VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.addStyleName("dialogVPanel");
    verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    this.setWidget(verticalPanel);
    verticalPanel.setSize("", "");

    final VerticalPanel verticalPanel_1 = new VerticalPanel();
    verticalPanel_1.setStyleName("messagePanel");
    verticalPanel.add(verticalPanel_1);
    verticalPanel_1.setWidth("320px");
    verticalPanel.setCellWidth(verticalPanel_1, "100%");

    final SimplePanel simplePanel = new SimplePanel();
    verticalPanel_1.add(simplePanel);
    verticalPanel_1.setCellWidth(simplePanel, "100%");
    simplePanel.setHeight("40px");

    final SimplePanel simplePanel_1 = new SimplePanel();
    verticalPanel_1.add(simplePanel_1);
    verticalPanel_1.setCellWidth(simplePanel_1, "100%");
    verticalPanel_1.setCellVerticalAlignment(simplePanel_1, HasVerticalAlignment.ALIGN_MIDDLE);
    verticalPanel_1.setCellHorizontalAlignment(simplePanel_1, HasHorizontalAlignment.ALIGN_CENTER);
    simplePanel_1.setSize("300px", "60px");

    final HTML htmlNewHtml = new HTML(
            "<p align=\"center\">\r\nAre you sure you want to delete user" + " '" + userName + "'?\r\n</p>",
            true);
    htmlNewHtml.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    simplePanel_1.setWidget(htmlNewHtml);
    htmlNewHtml.setSize("", "");
    htmlNewHtml.setStyleName("errorDialogBox");

    final SimplePanel simplePanel_2 = new SimplePanel();
    verticalPanel_1.add(simplePanel_2);
    verticalPanel_1.setCellWidth(simplePanel_2, "100%");
    simplePanel_2.setHeight("40px");

    final HorizontalPanel horizontalButtonPanel = new HorizontalPanel();
    horizontalButtonPanel.setStyleName("buttonPanel");
    horizontalButtonPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalButtonPanel.setSpacing(5);
    horizontalButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
    verticalPanel.add(horizontalButtonPanel);
    verticalPanel.setCellVerticalAlignment(horizontalButtonPanel, HasVerticalAlignment.ALIGN_MIDDLE);
    verticalPanel.setCellHorizontalAlignment(horizontalButtonPanel, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setWidth("320px");
    verticalPanel.setCellWidth(horizontalButtonPanel, "100%");
    cancelButton = new PushButton("No");
    cancelButton.setHTML("Cancel");
    horizontalButtonPanel.add(cancelButton);
    cancelButton.setSize("70px", "18px");
    horizontalButtonPanel.setCellVerticalAlignment(cancelButton, HasVerticalAlignment.ALIGN_MIDDLE);
    horizontalButtonPanel.setCellHorizontalAlignment(cancelButton, HasHorizontalAlignment.ALIGN_CENTER);
    okButton = new PushButton("Yes");
    okButton.setHTML("Ok");
    horizontalButtonPanel.add(okButton);
    horizontalButtonPanel.setCellHorizontalAlignment(okButton, HasHorizontalAlignment.ALIGN_CENTER);
    horizontalButtonPanel.setCellVerticalAlignment(okButton, HasVerticalAlignment.ALIGN_MIDDLE);
    okButton.setSize("70px", "18px");
}

From source file:info.geekinaction.autoalert.view.AutoAlertPanelUtil.java

License:Open Source License

/**
 * Creates the inner container of the caller panel. 
 * @param widget Widget which shows data.
 * @return The created panel.//from  w w  w . j a  va 2s.  c  o m
 */
public static Panel createContainer(Widget widget, String loaderId, ClickHandler clickHandler) {

    // Horizontal panel for the button and the AJAX loader image.
    HorizontalPanel horizontalPanel = new HorizontalPanel();
    horizontalPanel.setSpacing(10);

    ButtonBase btnRefresh = createRefreshButton(clickHandler);
    horizontalPanel.add(btnRefresh);

    if (loaderId != null) {
        Image imgLoader = createLoaderImage(loaderId);
        imgLoader.setVisible(false);
        horizontalPanel.add(imgLoader);
    }

    VerticalPanel container = new VerticalPanel();
    container.setSpacing(10);
    container.add(horizontalPanel);
    container.add(widget);

    return container;
}

From source file:info.vstour.dbdoc.client.DbDoc.java

License:Apache License

public void onModuleLoad() {

    Window.enableScrolling(false);
    Window.setMargin("0" + UNIT);

    final VerticalPanel bodyVPanel = new VerticalPanel();
    bodyVPanel.setWidth("100%");

    final HorizontalPanel bodyHPanel = new HorizontalPanel();
    bodyHPanel.setSpacing(3);

    final HTML doc = new HTML();

    final ScrollPanel docWrapper = new ScrollPanel(doc);

    objectsTree = new DbObjectsPanel(docService);

    final MenuPanel menuPanel = new MenuPanel(docService, eventBus);
    menuPanel.ownerChangeHandlers().addChangeHandler(new ChangeHandler() {
        @Override// w w w .  j  a va2s  . co m
        public void onChange(ChangeEvent event) {
            objectsTree.clearDbObjects();
            doc.setHTML("");
            objectsTree.initDbObjects(Filter.get().getDbObjects());
        }
    });

    eventBus.addHandler(MenuUpdateEvent.TYPE, new MenuUpdateEvent.Handler() {
        @Override
        public void onMenuUpdate(MenuUpdateEvent event) {
            if (event.isNewConn()) {
                objectsTree.clear();
                doc.setHTML("");
            } else {
                objectsTree.clearDbObjects();
            }
            objectsTree.initDbObjects(Filter.get().getDbObjects());
        }
    });

    objectsTree.getTreeOpenHandler().addOpenHandler(new OpenHandler<TreeItem>() {
        public void onOpen(OpenEvent<TreeItem> event) {
            final TreeItem treeItem = event.getTarget();
            if (treeItem.getChild(0).getText().isEmpty()) {

                doc.setHTML(new Image(Resources.INSTANCE.processing()).toString());

                docService.getTreeItems(Filter.get().getConnName(), Filter.get().getOwner(), treeItem.getText(),
                        Filter.get().getFilter(), new AsyncCallback<List<String>>() {
                            @Override
                            public void onSuccess(List<String> items) {
                                doc.setHTML("");
                                for (String item : items) {
                                    treeItem.addItem(item);
                                }
                            }

                            @Override
                            public void onFailure(Throwable caught) {
                                doc.setHTML("");
                            }
                        });

                // Remove the temporary item when we finish loading
                treeItem.getChild(0).remove();
            }
        }
    });

    // Handler that gets documentation
    SelectionHandler<TreeItem> sHandler = new SelectionHandler<TreeItem>() {
        public void onSelection(SelectionEvent<TreeItem> event) {
            final TreeItem treeItem = event.getSelectedItem();

            if (treeItem.getParentItem() != null) {
                final String parent = treeItem.getParentItem().getText();
                final String child = treeItem.getText();

                doc.setHTML(new Image(Resources.INSTANCE.processing()).toString());
                docService.getDoc(Filter.get().getConnName(), Filter.get().getOwner(), parent, child,
                        new AsyncCallback<String>() {

                            public void onFailure(Throwable caught) {
                                doc.setHTML(caught.toString());
                            }

                            public void onSuccess(String result) {
                                objectsTree.cacheDoc(Filter.get().getOwner() + "." + child, result);
                                doc.setHTML(result);
                            }
                        });
            }
        }
    };
    objectsTree.getTreeSelectionHandler().addSelectionHandler(sHandler);

    objectsTree.getCacheTreeSelectionHandler().addSelectionHandler(new SelectionHandler<TreeItem>() {
        @Override
        public void onSelection(SelectionEvent<TreeItem> event) {
            doc.setHTML(objectsTree.getCachedDoc(event.getSelectedItem().getText()));
        }
    });

    bodyHPanel.add(objectsTree);
    bodyHPanel.add(docWrapper);

    bodyVPanel.add(menuPanel);
    bodyVPanel.add(bodyHPanel);

    Window.addResizeHandler(new ResizeHandler() {

        public void onResize(ResizeEvent event) {
            int height = event.getHeight();
            int width = event.getWidth();
            bodyVPanel.setHeight(height + UNIT);
            docWrapper.setHeight(height - docWrapper.getAbsoluteTop() + UNIT);
            docWrapper.setWidth(width - docWrapper.getAbsoluteLeft() + UNIT);
            objectsTree.setHeight(height);
        }
    });

    RootPanel.get().add(bodyVPanel);

    objectsTree.setHeight(Window.getClientHeight());
    docWrapper.setHeight(Window.getClientHeight() - docWrapper.getAbsoluteTop() + UNIT);
    docWrapper.setWidth(Window.getClientWidth() - docWrapper.getAbsoluteLeft() + UNIT);

}