Example usage for com.vaadin.client BrowserInfo isIE

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

Introduction

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

Prototype

public boolean isIE() 

Source Link

Usage

From source file:com.haulmont.cuba.web.toolkit.ui.client.passwordfield.CubaPasswordFieldWidget.java

License:Apache License

public void setAutocomplete(boolean autocomplete) {
    if (autocomplete) {
        getElement().removeAttribute("autocomplete");
    } else {/*from  w  w  w  . j a v  a 2s  . com*/
        BrowserInfo browser = BrowserInfo.get();

        if (browser.isIE() || (browser.isGecko() && browser.getGeckoVersion() < 47)
                || (browser.isChrome() && browser.getBrowserMajorVersion() < 49)) {
            getElement().setAttribute("autocomplete", "off");
        } else {
            getElement().setAttribute("autocomplete", "new-password");
        }
    }
}

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());//from   w ww .  j a  v a  2  s . c o m
    // 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);
}