Example usage for com.google.gwt.user.client.ui LayoutPanel forceLayout

List of usage examples for com.google.gwt.user.client.ui LayoutPanel forceLayout

Introduction

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

Prototype

public void forceLayout() 

Source Link

Usage

From source file:hu.mapro.gwt.client.widget.MyTabLayoutPanel.java

License:Apache License

/**
 * Updates the size of the tabNavPanel.//www .  j a va  2  s . c om
 */
private void setTabPanelSizes(int prev, int next) {
    LayoutPanel panel = getTabNavPanel();
    Unit unit = Unit.PX;
    if (isRtl()) {

        panel.setWidgetRightWidth(previousButtonPanel, 0, unit, prev, unit);
        panel.setWidgetLeftWidth(nextButtonPanel, 0, unit, next, unit);
        panel.setWidgetLeftRight(tabBarAnimator, next, unit, prev, unit);
    } else {
        panel.setWidgetLeftWidth(previousButtonPanel, 0, unit, prev, unit);
        panel.setWidgetRightWidth(nextButtonPanel, 0, unit, next, unit);
        panel.setWidgetLeftRight(tabBarAnimator, prev, unit, next, unit);
    }
    panel.forceLayout();
}

From source file:org.rstudio.core.client.widget.SlideLabel.java

License:Open Source License

private static SlideLabel showInternal(String label, boolean asHtml, boolean showProgressSpinner,
        LayoutPanel panel) {
    final SlideLabel slideLabel = new SlideLabel(showProgressSpinner);
    slideLabel.setText(label, asHtml);/*from ww w .  j  a  v a 2  s  . c  o  m*/
    panel.add(slideLabel);
    panel.setWidgetLeftRight(slideLabel, 0, Style.Unit.PX, 0, Style.Unit.PX);
    panel.setWidgetTopHeight(slideLabel, 0, Style.Unit.PX, 100, Style.Unit.PX);
    panel.forceLayout();
    return slideLabel;
}