Example usage for com.google.gwt.user.client.ui SplitLayoutPanel getWidgetContainerElement

List of usage examples for com.google.gwt.user.client.ui SplitLayoutPanel getWidgetContainerElement

Introduction

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

Prototype

public Element getWidgetContainerElement(Widget child) 

Source Link

Document

Gets the container element wrapping the given child widget.

Usage

From source file:cc.alcina.framework.gwt.client.util.WidgetUtils.java

License:Apache License

private static void morphSplitPanel(SplitLayoutPanel splitPanel, Widget keepChild, boolean restore) {
    final String zeroSize = "0px";
    boolean hsp = isDirectionalLayoutPanel(splitPanel, true);
    for (int index = 0; index < splitPanel.getWidgetCount(); index++) {
        Widget w = splitPanel.getWidget(index);
        if (CommonUtils.simpleClassName(w.getClass()).contains("Splitter")) {
            w.setVisible(restore);//from  w  ww  .  ja  va2 s.c om
        } else {
            Element container = splitPanel.getWidgetContainerElement(w);
            container.getStyle().setDisplay(restore || keepChild == w ? Display.BLOCK : Display.NONE);
        }
    }
    if (!restore) {
        morphedWidgets.add(splitPanel);
    }
}