Example usage for com.google.gwt.dom.client Style clearOverflow

List of usage examples for com.google.gwt.dom.client Style clearOverflow

Introduction

In this page you can find the example usage for com.google.gwt.dom.client Style clearOverflow.

Prototype

public void clearOverflow() 

Source Link

Usage

From source file:info.magnolia.ui.vaadin.gwt.client.tabsheet.widget.MagnoliaTabSheetViewImpl.java

License:Open Source License

private void animateHeightChange(MagnoliaTabWidget newActiveTab) {
    final Style tabPanelStyle = tabPanel.getElement().getStyle();
    int offsetTabHeight = tabPanel.getOffsetHeight();
    tabPanelStyle.clearHeight();/*from w  w w .  jav  a2  s  . c o  m*/
    int newHeight = newActiveTab.getOffsetHeight();
    final String heightPropertyCC = offsetTabHeight < newHeight ? "maxHeight" : "minHeight";
    final String heightProperty = offsetTabHeight < newHeight ? "max-height" : "min-height";

    final JQueryAnimation animation = new JQueryAnimation();
    tabPanelStyle.setProperty(heightPropertyCC, offsetTabHeight + "px");
    animation.setProperty(heightProperty, newHeight);
    tabPanelStyle.setOverflow(Style.Overflow.HIDDEN);
    animation.addCallback(new JQueryCallback() {
        @Override
        public void execute(JQueryWrapper query) {
            tabPanelStyle.clearOverflow();
            tabPanelStyle.clearProperty(heightPropertyCC);
        }
    });
    animation.run(HEIGHT_CHANGE_ANIMATION_DURATION, tabPanel.getElement());
}

From source file:org.vaadin.alump.fancylayouts.gwt.client.GwtFancyPanel.java

License:Apache License

public void setScrollable(boolean scroll) {

    if (scrollEnabled != null && scrollEnabled == scroll) {
        return;/*from w  w w .jav a2 s  .  c  o m*/
    }

    Style style = contentPanel.getElement().getStyle();

    if (scroll) {
        style.setOverflow(Overflow.AUTO);
    } else {
        style.clearOverflow();
    }

    scrollEnabled = scroll;
}

From source file:org.vaadin.alump.fancylayouts.gwt.client.GwtFancyPanel.java

License:Apache License

/**
 * Clear hardcoded position on the screen
 * //from   ww w . j ava2s .co m
 * @param wrapper
 */
private void clearWrapperTransitionPosition(Element wrapper) {
    Style style = wrapper.getStyle();
    style.clearPosition();
    if (this.isScrollable()) {
        style.clearHeight();
    } else {
        style.setHeight(100, Unit.PCT);
    }
    style.clearTop();
    style.clearLeft();
    style.clearOverflow();
}