Example usage for com.google.gwt.user.client.ui AbstractNativeScrollbar getNativeScrollbarWidth

List of usage examples for com.google.gwt.user.client.ui AbstractNativeScrollbar getNativeScrollbarWidth

Introduction

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

Prototype

public static int getNativeScrollbarWidth() 

Source Link

Document

Get the width of a native vertical scrollbar.

Usage

From source file:org.opencms.gwt.client.ui.CmsScrollPanelImpl.java

License:Open Source License

/**
 * Hide the native scrollbars. We call this after attaching to ensure that we
 * inherit the direction (rtl or ltr).//from  w w w. j  a va2s .c om
 */
private void hideNativeScrollbars() {

    m_nativeScrollbarWidth = AbstractNativeScrollbar.getNativeScrollbarWidth();
    getScrollableElement().getStyle().setMarginRight(-(m_nativeScrollbarWidth + 10), Unit.PX);
}

From source file:org.tltv.gantt.client.TimelineWidget.java

License:Apache License

public void setNoticeVerticalScrollbarWidth(boolean noticeVerticalScrollbarWidth) {
    this.noticeVerticalScrollbarWidth = noticeVerticalScrollbarWidth;
    if (noticeVerticalScrollbarWidth) {
        getElement().getStyle().setMarginRight(AbstractNativeScrollbar.getNativeScrollbarWidth(), Unit.PX);
    } else {/* w  ww .  j  a  va 2s. c o m*/
        getElement().getStyle().clearMarginRight();
    }
}