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

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

Introduction

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

Prototype

public void setOverflowX(Overflow value) 

Source Link

Usage

From source file:ilarkesto.gwt.client.desktop.Widgets.java

License:Open Source License

public static Widget scrollerY(IsWidget content) {
    SimplePanel panel = new SimplePanel(content.asWidget());
    Style style = panel.getElement().getStyle();
    style.setProperty("width", "auto");
    style.setOverflowX(Overflow.HIDDEN);
    style.setOverflowY(Overflow.SCROLL);
    return panel;
}

From source file:ilarkesto.gwt.client.desktop.Widgets.java

License:Open Source License

public static Widget scroller(IsWidget content) {
    SimplePanel panel = new SimplePanel(content.asWidget());
    Style style = panel.getElement().getStyle();
    style.setProperty("width", "auto");
    style.setOverflowX(Overflow.HIDDEN);
    style.setOverflowY(Overflow.SCROLL);
    return panel;
}

From source file:org.cruxframework.crux.widgets.client.slider.TouchSlider.java

License:Apache License

/**
 * /*from   www  . j  ava  2  s  .  c om*/
 * @param contentProvider
 */
public void setContentProvider(ContentProvider contentProvider) {
    this.contentProvider = contentProvider;
    contentPanel.clear();
    for (int i = 0; i < contentProvider.size(); i++) {
        final int index = i;
        LazyPanel itemWrapper = new LazyPanel() {
            @Override
            protected Widget createWidget() {
                return TouchSlider.this.contentProvider.loadWidget(index);
            }
        };
        itemWrapper.setStyleName("touchSliderItem");
        itemWrapper.setVisible(false);
        Style style = itemWrapper.getElement().getStyle();
        style.setPosition(Position.ABSOLUTE);
        style.setTop(0, Unit.PX);
        style.setLeft(0, Unit.PX);
        style.setWidth(100, Unit.PCT);
        style.setHeight(100, Unit.PCT);
        style.setOverflowX(Overflow.HIDDEN);
        style.setOverflowY(Overflow.VISIBLE);
        contentPanel.add(itemWrapper);
    }

    if (this.circularShowing && contentProvider.size() < 3) {
        this.circularShowing = false;
    }
}

From source file:org.cruxframework.crux.widgets.client.slider.TouchSlider.java

License:Apache License

/**
 * //from   w  w w.  j av  a2s .  c  o m
 * @param widget
 */
public void add(Widget widget) {
    SimplePanel itemWrapper = new SimplePanel();
    itemWrapper.add(widget);
    itemWrapper.setStyleName("touchSliderItem");
    itemWrapper.setVisible(false);
    Style style = itemWrapper.getElement().getStyle();
    style.setPosition(Position.ABSOLUTE);
    style.setTop(0, Unit.PX);
    style.setLeft(0, Unit.PX);
    style.setWidth(100, Unit.PCT);
    style.setHeight(100, Unit.PCT);
    style.setOverflowX(Overflow.HIDDEN);
    style.setOverflowY(Overflow.VISIBLE);
    contentPanel.add(itemWrapper);
}

From source file:org.cruxframework.crux.widgets.client.swappanel.HorizontalSwapPanel.java

License:Apache License

private void configureCurrentPanel() {
    Transition.resetTransition(currentPanel);

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

    style.setPosition(Position.RELATIVE);
    style.setTop(0, Unit.PX);//  www  . ja v  a 2 s  . co m
    style.setLeft(0, Unit.PX);
    style.setWidth(100, Unit.PCT);
    style.setHeight(100, Unit.PCT);
    style.setOverflowX(Overflow.HIDDEN);
    style.setOverflowY(Overflow.VISIBLE);
    style.setVisibility(Visibility.VISIBLE);
    style.setOpacity(1);
}

From source file:org.cruxframework.crux.widgets.client.swappanel.HorizontalSwapPanel.java

License:Apache License

private void configureNextPanel() {
    Style style = nextPanel.getElement().getStyle();
    style.setTop(0, Unit.PX);/* ww  w.  ja  va 2 s  . c om*/
    style.setLeft(0, Unit.PX);
    style.setPosition(Position.ABSOLUTE);
    style.setWidth(100, Unit.PCT);
    style.setHeight(100, Unit.PCT);
    style.setOverflowX(Overflow.HIDDEN);
    style.setOverflowY(Overflow.VISIBLE);
    style.setVisibility(Visibility.HIDDEN);
    style.setOpacity(0);
}