Example usage for com.vaadin.ui Embedded setType

List of usage examples for com.vaadin.ui Embedded setType

Introduction

In this page you can find the example usage for com.vaadin.ui Embedded setType.

Prototype

public void setType(int type) 

Source Link

Document

Sets the object type.

Usage

From source file:eu.lod2.Lodrefine.java

License:Apache License

public Lodrefine(LOD2DemoState st) {

    // The internal state 
    state = st;/*from   w w  w .  j av  a  2  s .  co m*/

    initLogin();

    Embedded browser = new Embedded();
    try {
        URL url = new URL(service);
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.MondecaSPARQLList.java

License:Apache License

public MondecaSPARQLList(LOD2DemoState st) {

    // The internal state 
    state = st;/*from  ww  w. ja  v  a  2 s . com*/

    Embedded browser = new Embedded();
    try {
        URL url = new URL("http://sparqles.okfn.org/");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.OnlinePoolParty.java

License:Apache License

public OnlinePoolParty(LOD2DemoState st) {

    // The internal state 
    state = st;/*  ww w.java  2s .  c o m*/

    Embedded browser = new Embedded();
    try {
        URL url = new URL("http://lod2.poolparty.biz/PoolParty");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.OntoWiki.java

License:Apache License

public OntoWiki(LOD2DemoState st) {

    // The internal state 
    state = st;//from w w  w. j  a v  a 2 s  . c  o m
    initLogin();
    activateCurrentGraph();

    Embedded browser = new Embedded();
    try {
        URL url = new URL(service + "/");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.OntoWikiQuery.java

License:Apache License

public OntoWikiQuery(LOD2DemoState st) {

    // The internal state and 
    state = st;//from w w  w .jav a  2 s  .  com
    initLogin();

    VerticalLayout queryingTab = new VerticalLayout();

    final String query = "SELECT * where {?s ?p ?o.} LIMIT 20";
    String encodedQuery = "";
    String encodedGraphName = "";
    try {
        encodedQuery = URLEncoder.encode(query, "UTF-8");
        encodedGraphName = URLEncoder.encode(state.getCurrentGraph(), "UTF-8");
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    ;

    if (encodedGraphName.equals("")) {
        Label l = new Label("One must select a current graph to use this functionality.");
        queryingTab.addComponent(l);
    } else {
        String redirecturi = service + "/queries/editor/?query=" + encodedQuery + "&m=" + encodedGraphName;
        URL request = loginandqueryRequest(redirecturi);
        if (request == null) {
            Label l = new Label(
                    "The settings are incorrect to result in a valid URL which gives access to this functionality.");
            queryingTab.addComponent(l);
        } else {
            Embedded browser = new Embedded("", new ExternalResource(request));
            browser.setType(Embedded.TYPE_BROWSER);
            browser.setSizeFull();
            queryingTab.addComponent(browser);
        }
    }
    /*
       Label l = new Label(service + "/queries/editor/?query="+ encodedQuery + "&m=" + encodedGraphName);
       queryingTab.addComponent(l);
            
       Embedded browser = new Embedded();
       try { 
       URL url;
       if (encodedGraphName.equals("")) {
       url = new URL(service + "/queries/editor/?query="+ encodedQuery);
       } else {
       url = new URL(service + "/queries/editor/?query="+ encodedQuery + "&m=" + encodedGraphName);
       };
       browser = new Embedded("", new ExternalResource(url));
       browser.setType(Embedded.TYPE_BROWSER);
       browser.setSizeFull();
       } catch (MalformedURLException e) {
       e.printStackTrace();
       };
            
       queryingTab.addComponent(browser);
     */
    // The composition root MUST be set
    queryingTab.setSizeFull();
    setCompositionRoot(queryingTab);
}

From source file:eu.lod2.ORE.java

License:Apache License

public ORE(LOD2DemoState st) {

    // The internal state 
    state = st;/*from   w w w.  j  a  v a 2  s .c o  m*/

    Embedded browser = new Embedded();
    try {
        URL url = new URL(state.getHostName() + "/ore/app/Application.html");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.SameAs.java

License:Apache License

public SameAs(LOD2DemoState st) {

    // The internal state 
    state = st;/*from w w w.j  a v  a2  s.  c  o  m*/

    Embedded browser = new Embedded();
    try {
        URL url = new URL("http://sameas.org");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.Sigma.java

License:Apache License

public Sigma(LOD2DemoState st) {

    // The internal state 
    state = st;/*from w w w .j  av  a  2 s  .  c o  m*/

    Embedded browser = new Embedded();
    try {
        URL url = new URL(state.getHostName() + "/sigmaee");

        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.Siren.java

License:Apache License

public Siren(LOD2DemoState st) {

    // The internal state
    state = st;//from  www . j  a  v a  2s . c  om

    Embedded browser = new Embedded();
    try {

        URL url = new URL(state.getHostName(false) + ":8080/siren");

        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }

    // The composition root MUST be set
    setCompositionRoot(browser);
}

From source file:eu.lod2.SPARQLPoolParty.java

License:Apache License

public SPARQLPoolParty(LOD2DemoState st) {

    // The internal state 
    state = st;//from w w w .  j a  v a2s  . com

    Embedded browser = new Embedded();
    try {
        URL url = new URL("http://prod.poolparty.punkt.at/PoolParty/sparql/semweb");
        browser = new Embedded("", new ExternalResource(url));
        browser.setType(Embedded.TYPE_BROWSER);
        browser.setSizeFull();
        //panel.addComponent(browser);
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
    ;

    // The composition root MUST be set
    setCompositionRoot(browser);
}