Example usage for com.vaadin.client BrowserInfo get

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

Introduction

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

Prototype

public static BrowserInfo get() 

Source Link

Document

Singleton method to get BrowserInfo object.

Usage

From source file:org.dussan.vaadin.dcharts.client.ui.VDCharts.java

License:Apache License

private void loadJqPlotLibrary() {
    // inject JqPlot css
    JqPlot.CODE.css().ensureInjected();/*from   w w  w. j  a  v a 2s.  com*/

    // inject canvas emulator for Microsoft Internet Explorer
    if (BrowserInfo.get().isIE() && !BrowserInfo.get().isIE9() && !BrowserInfo.get().isIE10()) {
        JavaScriptInjector.inject(JqPlot.CODE.exCanvas().getText());
    }

    // initialize main JqPlot libraries
    if (!JavaScriptInjector.isJqPlotLibraryLoaded()) {
        JavaScriptInjector.inject(JqPlot.CODE.jqPlot().getText());
        JavaScriptInjector.inject(JqPlot.CODE.canvasTextRenderer().getText());
    }
}

From source file:org.dussan.vaadin.dcharts.client.ui.VDCharts.java

License:Apache License

private String checkEnabledAnimationEffects(String options) {
    if (BrowserInfo.get().isIE() && !BrowserInfo.get().isIE9() && !BrowserInfo.get().isIE10()) {
        options = options.replaceAll("animate: true", "animate: false");
    }/*from   w  w  w  . j av a  2s  . c  o m*/
    return options;
}

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  w  w .ja  v  a  2  s.  co 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);
}

From source file:org.vaadin.alump.offlinebuilder.client.OTextField.java

License:Open Source License

protected OTextField(Element root) {
    super(root);/* w w w. java 2s.co  m*/
    setStyleName(VTextField.CLASSNAME);
    addChangeHandler(this);
    if (BrowserInfo.get().isIE() || BrowserInfo.get().isFirefox()) {
        addKeyDownHandler(this);
    }
    addFocusHandler(this);
    addBlurHandler(this);
}