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

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

Introduction

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

Prototype

public int getWidgetCount() 

Source Link

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   ww w  .jav a 2s  .c o m
        } else {
            Element container = splitPanel.getWidgetContainerElement(w);
            container.getStyle().setDisplay(restore || keepChild == w ? Display.BLOCK : Display.NONE);
        }
    }
    if (!restore) {
        morphedWidgets.add(splitPanel);
    }
}

From source file:ch.eaternity.client.Search.java

License:Apache License

public void setVDraggerHeight(String height) {
    //     SplitLayoutPanel p = (SplitLayoutPanel) this.getWidget ();
    SplitLayoutPanel p = subMealsSplitPanels;
    int widgetCount = p.getWidgetCount();
    for (int i = 0; i < widgetCount; i++) {
        Widget w = p.getWidget(i);/* w ww  . ja v  a  2  s.  c om*/
        if (w.getStyleName().equals("gwt-SplitLayoutPanel-VDragger")) {
            w.setHeight(height);
        }
    }
}

From source file:org.eclipse.che.ide.ext.runner.client.manager.RunnerManagerViewImpl.java

License:Open Source License

private void changeSplitterStyle(@Nonnull SplitLayoutPanel panel, @Nonnull String style) {
    int widgetCount = panel.getWidgetCount();

    for (int i = 0; i < widgetCount; i++) {
        Widget widget = panel.getWidget(i);
        String styleName = widget.getStyleName();

        if (SPLITTER_STYLE_NAME.equals(styleName)) {
            this.splitter = widget;

            widget.removeStyleName(styleName);
            widget.addStyleName(style);// w  ww .j a  v  a2  s  .co  m
        }
    }
}