Example usage for com.vaadin.ui BrowserFrame setWidth

List of usage examples for com.vaadin.ui BrowserFrame setWidth

Introduction

In this page you can find the example usage for com.vaadin.ui BrowserFrame setWidth.

Prototype

@Override
    public void setWidth(String width) 

Source Link

Usage

From source file:annis.gui.LoginWindow.java

License:Apache License

@Override
public void attach() {
    super.attach();

    this.loginURL = (String) VaadinSession.getCurrent().getAttribute(LOGIN_URL_KEY);

    Resource loginRes;/*from www.ja  v a2  s. c o m*/
    if (loginURL == null || loginURL.isEmpty()) {
        loginRes = new ExternalResource(Helper.getContext() + "/login");
    } else {
        loginRes = new ExternalResource(loginURL);
    }

    BrowserFrame frame = new BrowserFrame("login", loginRes);
    frame.setWidth("100%");
    frame.setHeight("100%");

    setContent(frame);

    String loginMaximizedRaw = (String) getSession().getAttribute(LOGIN_MAXIMIZED_KEY);
    if (Boolean.parseBoolean(loginMaximizedRaw)) {
        setWindowMode(WindowMode.MAXIMIZED);
    }
}

From source file:com.esofthead.mycollab.module.project.view.bug.BugAdvertisementViewImpl.java

License:Open Source License

public BugAdvertisementViewImpl() {
    this.setWidth("100%");
    this.setHeight("512px");
    URL url = null;/*from ww  w  .  j  a  v a2 s .  co m*/
    try {
        url = new URL(AppContext.getSiteUrl() + "assets/ads/bug/bugAds.html");
    } catch (MalformedURLException e) {
        throw new MyCollabException(e);
    }
    BrowserFrame browser = new BrowserFrame("", new ExternalResource(url));
    browser.setWidth("100%");
    browser.setHeight("100%");

    this.addComponent(browser);
}

From source file:com.nfl.dm.clubsites.cms.articles.subapp.articleeditor.layouteditor.LayoutEditorViewImpl.java

License:Open Source License

@Override
public void setArticleUrl(String url) {
    layout.removeAllComponents();//from  w ww  . j a  v  a2  s .  c o  m
    BrowserFrame editor = new BrowserFrame(null, new ExternalResource(url));
    editor.setWidth("650px");
    editor.setHeight("100%");
    layout.addComponent(editor);
}

From source file:fi.aalto.drumbeat.drumbeatUI.DrumbeatinterfaceUI.java

License:Open Source License

private void creatTab_Resources() {
    VerticalLayout tab_internaldata = new VerticalLayout();
    tab_internaldata.setCaption("Internal resources");
    tabsheet.addTab(tab_internaldata);/*www .j  av  a  2s . c o  m*/

    BrowserFrame browser = new BrowserFrame("", new ExternalResource("http://drumbeat.cs.hut.fi/home.html"));
    browser.setWidth("900px");
    browser.setHeight("450px");
    tab_internaldata.addComponent(browser);

    files_table.addContainerProperty("File name", String.class, null);
    listUploaded_IFCFiles();
    tab_internaldata.addComponent(files_table);

    contexts_table.addContainerProperty("Graph", String.class, null);
    contexts_table.addContainerProperty("Size", Long.class, null);
    tab_internaldata.addComponent(contexts_table);
}

From source file:fi.aalto.drumbeat.drumbeatUI.DrumbeatinterfaceUI.java

License:Open Source License

private void htmlView_BIMProject(VerticalLayout layout, long pid) {
    layout.removeAllComponents();/*from   w  w  w  .j a  va  2  s .  c o m*/
    ExternalResource er = new ExternalResource(DrumbeatConstants.bimsurfer_project_url + pid);
    BrowserFrame bim_browser = new BrowserFrame("", er);
    bim_browser.setWidth("900px");
    bim_browser.setHeight("800px");

    layout.addComponent(bim_browser);

}

From source file:fi.aalto.drumbeat.drumbeatUI.DrumbeatinterfaceUI.java

License:Open Source License

private void htmlView_Project(VerticalLayout layout, String project_name) {
    layout.removeAllComponents();// w  ww  .j av  a  2  s.  c o  m
    ExternalResource er = new ExternalResource(DrumbeatConstants.drumbeatview_project_url + project_name);
    BrowserFrame bim_browser = new BrowserFrame("", er);
    bim_browser.setWidth("700px");
    bim_browser.setHeight("650px");

    layout.addComponent(bim_browser);

}

From source file:fi.jasoft.dragdroplayouts.demo.views.DragdropIframeDragging.java

License:Apache License

private void addComponentsToLayout(DDAbsoluteLayout layout, String caption) {

    BrowserFrame frame = new BrowserFrame(caption,
            new ExternalResource("https://platform.twitter.com/widgets/tweet_button.html"));
    frame.setWidth("300px");
    frame.setHeight("300px");

    layout.addComponent(frame, "top:100px;left:50px");

}

From source file:gov.va.ehtac.myappsonfhir.ui.ValidicMarketPlace.java

public ValidicMarketPlace() {
    session = ((HealthElementsForPatientTouchKitUI) UI.getCurrent()).getSessionAttributes();
    setCaption("Health App Marketplace");
    final VerticalComponentGroup content = new VerticalComponentGroup();
    BrowserFrame browser = new BrowserFrame("",
            new ExternalResource("https://app.validic.com/54d4fdb88ee42122c2000013/dbsvmtYYW8e_o6bn2DMs"));
    browser.setWidth("100%");
    browser.setHeight("500px");
    content.addComponent(browser);//  w w w  . j  a  v a2s.  co m
    setContent(new CssLayout(content));
}

From source file:org.geant.sat.ui.MainView.java

License:BSD License

/** {@inheritDocs}. */
@SuppressWarnings("rawtypes")
@Override//from   w  ww  .  j ava  2s.c o  m
public void enter(ViewChangeEvent event) {
    if (MENU_ENTITIES.equals(event.getParameters())) {
        workPanel.setContent(new EntityListViewer((MainUI) getUI()));
        return;
    }
    if (MENU_SURVEYS.equals(event.getParameters())) {
        workPanel.setContent(new SurveyViewer((MainUI) getUI()));
        return;
    }
    if (MENU_USERS.equals(event.getParameters())) {
        workPanel.setContent(new UserListViewer((MainUI) getUI()));
        return;
    }
    if (MENU_PROFILE.equals(event.getParameters())) {
        workPanel.setContent(new ProfileViewer((MainUI) getUI(), ((MainUI) getUI()).getUser().getDetails()));
        return;
    }
    if (MENU_ABOUT.equals(event.getParameters())) {
        workPanel.setContent(new AboutViewer());
        return;
    }
    if (MENU_LIMESURVEY.equals(event.getParameters())) {
        final String hostUrl = getBaseUrl(((MainUI) getUI()).getPage().getLocation());
        log.debug("Using the following baseUrl: {}", hostUrl);
        final String limesurveyPath = ((MainUI) getUI()).getLimesurveyPath();
        log.debug("The limesurvey path is {}", limesurveyPath);
        final BrowserFrame browserFrame = new BrowserFrame("Browser",
                new ExternalResource(hostUrl + limesurveyPath + "admin/"));
        browserFrame.setHeight("100%");
        browserFrame.setWidth("100%");
        workPanel.setContent(browserFrame);
        return;
    }
    workPanel.setContent(new AboutViewer());
    return;

}

From source file:org.opencms.ui.dialogs.permissions.CmsPrincipalSelect.java

License:Open Source License

/**
 * Opens the principal select dialog window.<p>
 *//*w w  w  . j  a va  2  s.c om*/
void openPrincipalSelect() {

    String parameters = "?type=" + m_widgetType.name() + "&realonly=" + m_realOnly
            + "&flags=null&action=listindependentaction&useparent=true&listaction=";
    if ((m_widgetType.equals(WidgetType.principalwidget)
            && I_CmsPrincipal.PRINCIPAL_GROUP.equals(m_principalTypeSelect.getValue()))
            || m_widgetType.equals(WidgetType.groupwidget)) {
        parameters += "iag";
    } else {
        parameters += "iau";
    }
    BrowserFrame selectFrame = new BrowserFrame("Select principal",
            new ExternalResource(OpenCms.getLinkManager().substituteLinkForUnknownTarget(A_CmsUI.getCmsObject(),
                    "/system/workplace/commons/principal_selection.jsp") + parameters));
    selectFrame.setWidth("100%");
    selectFrame.setHeight("500px");
    CmsBasicDialog dialog = new CmsBasicDialog();
    dialog.setContent(selectFrame);
    m_window = CmsBasicDialog.prepareWindow();
    m_window.setCaption(CmsVaadinUtils.getMessageText(
            org.opencms.workplace.commons.Messages.GUI_PRINCIPALSELECTION_LIST_ACTION_SELECT_NAME_0));
    m_window.setContent(dialog);
    A_CmsUI.get().addWindow(m_window);
    CmsPrincipalSelectExtension.getInstance().setCurrentSelect(this);
}