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

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

Introduction

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

Prototype

public Widget getWidget(int index) 

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   www.  j av  a 2  s.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);
        if (w.getStyleName().equals("gwt-SplitLayoutPanel-VDragger")) {
            w.setHeight(height);//from w  w  w.j  a v a2s .  c  o  m
        }
    }
}

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);/*from  w  w w  .  jav a  2 s  .com*/
        }
    }
}