Example usage for com.google.gwt.core.client ScriptInjector TOP_WINDOW

List of usage examples for com.google.gwt.core.client ScriptInjector TOP_WINDOW

Introduction

In this page you can find the example usage for com.google.gwt.core.client ScriptInjector TOP_WINDOW.

Prototype

JavaScriptObject TOP_WINDOW

To view the source code for com.google.gwt.core.client ScriptInjector TOP_WINDOW.

Click Source Link

Document

Returns the top level window object.

Usage

From source file:org.gwtbootstrap3.extras.select.client.ui.Select.java

License:Apache License

@Override
public void setLanguage(final SelectLanguage language) {
    this.language = language;

    // Inject the JS for the language
    if (language.getJs() != null) {
        ScriptInjector.fromString(language.getJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
    }/*w  w w  .j  av a  2  s.co  m*/
}

From source file:org.gwtbootstrap3.extras.select.client.ui.SelectBase.java

License:Apache License

@Override
protected void onLoad() {
    super.onLoad();
    // Inject the language JS is necessary
    if (language.getJs() != null) {
        ScriptInjector.fromString(language.getJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
    }// w w  w.j a v a 2s. c  o  m
    initialize(getElement(), options);
    bindSelectEvents(getElement());
}

From source file:org.gwtbootstrap3.extras.slider.client.SliderEntryPoint.java

License:Apache License

@Override
public void onModuleLoad() {
    if (!isSliderLoaded()) {
        ScriptInjector.fromString(SliderClientBundle.INSTANCE.slider().getText())
                .setWindow(ScriptInjector.TOP_WINDOW).inject();
    }/* w w w  .j  av a 2s . c  o  m*/
}

From source file:org.gwtbootstrap3.extras.summernote.client.SummernoteEntryPoint.java

License:Apache License

@Override
public void onModuleLoad() {
    ScriptInjector.fromString(SummernoteClientBundle.INSTANCE.summernote().getText())
            .setWindow(ScriptInjector.TOP_WINDOW).inject();
}

From source file:org.gwtbootstrap3.extras.summernote.client.ui.base.SummernoteBase.java

License:Apache License

private void initialize() {
    // Inject the language JS is necessary
    if (language.getJs() != null) {
        ScriptInjector.fromString(language.getJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
    }//from  w  w  w.ja  v a 2  s. c om
    // Initialize
    initialize(getElement(), options);
}

From source file:org.gwtbootstrap3.extras.tagsinput.client.TagsInputEntryPoint.java

License:Apache License

@Override
public void onModuleLoad() {
    ScriptInjector.fromString(TagsInputClientBundle.INSTANCE.tagsinput().getText())
            .setWindow(ScriptInjector.TOP_WINDOW).inject();
}

From source file:org.gwtbootstrap3.extras.toggleswitch.client.ToggleSwitchEntryPoint.java

License:Apache License

@Override
public void onModuleLoad() {
    ScriptInjector.fromString(ToggleSwitchClientBundle.INSTANCE.toggleswitch().getText())
            .setWindow(ScriptInjector.TOP_WINDOW).inject();
}

From source file:org.gwtbootstrap3.extras.typeahead.client.TypeaheadEntryPoint.java

License:Apache License

@Override
public void onModuleLoad() {
    ScriptInjector.fromString(TypeaheadClientBundle.INSTANCE.typeahead().getText())
            .setWindow(ScriptInjector.TOP_WINDOW).inject();
}

From source file:org.gwtvisualizationwrappers.client.cytoscape.CytoscapeGraph242.java

License:Apache License

/**
 * Construct and show a cytoscape graph.
 * //from  w ww .  j  a v  a 2  s. co  m
 * @param containerId Element ID to put the graph into.
 * @param cytoscapeGraphJson Exported JSON from Cytoscape.
 * http://wiki.cytoscape.org/Cytoscape_3/UserManual#Cytoscape_3.2BAC8-UserManual.2BAC8-CytoscapeJs.Data_Exchange_between_Cytoscape_and_Cytoscape.js
        
{
elements:{
   nodes:[],
   edges:[]
}
style:[{
 selector: 'node',
 style: {
 }
}]
}
 */
public void show(String containerId, String cyjs, String styleJson) {
    //lazy load the cytoscape.js source
    if (!isCytoscape242Loaded()) {
        ScriptInjector.fromString(CytoscapeJsClientBundle.INSTANCE.cytoscape2_4_2().getText())
                .setWindow(ScriptInjector.TOP_WINDOW).inject();
        _init242();
    }

    _initGraph(containerId, cyjs, styleJson);
}

From source file:org.gwtvisualizationwrappers.client.cytoscape.CytoscapeJsEntryPoint.java

License:Apache License

/** {@inheritDoc} */
@Override/*from   w  w  w. j a  v a 2 s  .  c om*/
public void onModuleLoad() {
    if (!isjQueryLoaded()) {
        ScriptInjector.fromString(CytoscapeJsClientBundle.INSTANCE.jQuery().getText())
                .setWindow(ScriptInjector.TOP_WINDOW).inject();
    }
    if (!isCytoscapeUtilsLoaded()) {
        ScriptInjector.fromString(CytoscapeJsClientBundle.INSTANCE.sageCytoscapeUtils().getText())
                .setWindow(ScriptInjector.TOP_WINDOW).inject();
    }

}