Example usage for com.vaadin.client BrowserInfo isTouchDevice

List of usage examples for com.vaadin.client BrowserInfo isTouchDevice

Introduction

In this page you can find the example usage for com.vaadin.client BrowserInfo isTouchDevice.

Prototype

public boolean isTouchDevice() 

Source Link

Usage

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

License:Apache License

@Override
protected void init() {
    super.init();
    BrowserInfo info = BrowserInfo.get();
    getWidget().setBrowserInfo(info.isIE(), info.isIE8(), info.isIE9(), info.isChrome(), info.isSafari(),
            info.isWebkit());/*ww  w. jav  a 2  s  .c  om*/
    // If background grid is not needed, ie9 works without
    // setting alwaysCalculatePixelWidths flag to true.
    getWidget()
            .setAlwaysCalculatePixelWidths(info.isSafari() || info.isOpera() || info.isIE8() || info.isIE9());
    getWidget().setTouchSupported(info.isTouchDevice());
    getWidget().initWidget(ganttRpc, localeDataProvider);
    getLayoutManager().addElementResizeListener(getWidget().getElement(), widgetResizeListener);
}