Example usage for com.vaadin.ui Embedded Embedded

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

Introduction

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

Prototype

public Embedded() 

Source Link

Document

Creates a new empty Embedded object.

Usage

From source file:org.fossa.rolp.ui.leb.LebAnzeigen.java

License:Open Source License

public LebAnzeigen(FossaApplication app, SchuelerLaso schueler, KlasseLaso klasse)
        throws DocumentException, IOException {
    super(app);/*  w ww .j av a2  s  . c om*/
    setCaption(" - Lernentwicklungsbericht anzeigen - ");
    VerticalLayout layout = new VerticalLayout();
    setWidth("800px");
    setContent(layout);
    layout.setSpacing(true);

    Embedded embeddedPdf = new Embedded();
    embeddedPdf.setType(Embedded.TYPE_BROWSER);
    DateFormat dateFormat = new SimpleDateFormat("ddMMyy-HHmmss");
    String dateiname = "Klasse" + klasse.getKlassenname() + "_" + schueler.getVorname() + "_"
            + schueler.getName() + "_" + dateFormat.format(new Date()) + ".pdf";
    embeddedPdf.setSource(new LebCreator(app, schueler, klasse, dateiname).getLebResource());
    embeddedPdf.setWidth(100, Sizeable.UNITS_PERCENTAGE);
    embeddedPdf.setHeight("580px");
    windowCloseButton.setWidth(100, Sizeable.UNITS_PERCENTAGE);
    layout.addComponent(embeddedPdf);
    layout.addComponent(windowCloseButton);
}

From source file:org.hip.vif.skin.dflt.Skin.java

License:Open Source License

@Override
public Component getHeader(final String inAppName) {
    final HorizontalLayout outLayout = new HorizontalLayout();
    outLayout.setStyleName("vif-head");
    outLayout.setMargin(false);//from w  w  w. j  a  v  a  2s .  com
    outLayout.setWidth("100%");
    outLayout.setHeight(80, Unit.PIXELS);

    final Embedded lImage = new Embedded();
    lImage.setSource(new ThemeResource("images/vifLogo.gif"));
    outLayout.addComponent(lImage);
    outLayout.setComponentAlignment(lImage, Alignment.TOP_LEFT);
    outLayout.setExpandRatio(lImage, 0.42f);

    final Label lTitle = LabelHelper.createLabel("VIF Forum", "vif-head-title");
    lTitle.setSizeUndefined();
    outLayout.addComponent(lTitle);
    outLayout.setComponentAlignment(lTitle, Alignment.MIDDLE_LEFT);
    outLayout.setExpandRatio(lTitle, 0.58f);

    return outLayout;
}

From source file:org.hip.vif.skin.green.Skin.java

License:Open Source License

@Override
public Component getHeader(final String inAppName) {
    final HorizontalLayout outLayout = new HorizontalLayout();
    outLayout.setWidth("100%");
    outLayout.setHeight(115, Unit.PIXELS);
    outLayout.setStyleName("vif-green-head");

    final Embedded lImage = new Embedded();
    lImage.setSource(new ThemeResource("images/head.jpg"));
    outLayout.addComponent(lImage);/*from   w  w w.  j a v a 2  s  .  co m*/
    outLayout.setComponentAlignment(lImage, Alignment.TOP_LEFT);

    final Label lTitle = new Label("VIF - Virtual Discussion Forum");
    lTitle.setStyleName("vif-head-title");
    lTitle.setWidth(700, Unit.PIXELS);
    outLayout.addComponent(lTitle);

    return outLayout;
}

From source file:org.lunifera.examples.vaaclipse.demo1.e4.editors.ImageView.java

License:Open Source License

@Inject
public ImageView(VerticalLayout container, MInputPart inputPart) {
    super(inputPart.getInputURI());
    embedded = new Embedded();
    container.addComponent(embedded);/*from   ww w.  j  a  va 2 s.c o m*/
    container.setComponentAlignment(embedded, Alignment.MIDDLE_CENTER);
    container.setSizeFull();

    embedded.setSource(new FileResource(getFile()));
}

From source file:org.lunifera.examples.vaaclipse.demo1.e4.views.ProcessView.java

License:Open Source License

@Inject
public ProcessView(VerticalLayout parent, IEclipseContext context, MApplication app) {
    this.parent = parent;
    parent.setSizeFull();/*from w ww. j a v a2 s . c o m*/
    parent.setMargin(true);

    embedded = new Embedded();
    parent.addComponent(embedded);
    parent.setComponentAlignment(embedded, Alignment.MIDDLE_CENTER);
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.ImagePresentation.java

License:Open Source License

/**
 * {@inheritDoc}/*from   w  w w .j av  a  2 s  .c o m*/
 */
@Override
public Component doCreateWidget(Object parent) {
    if (image == null) {

        image = new Embedded();
        image.addStyleName(CSS_CLASS_CONTROL);
        image.setImmediate(true);
        setupComponent(image, getCastedModel());

        associateWidget(image, modelAccess.yField);
        if (modelAccess.isCssIdValid()) {
            image.setId(modelAccess.getCssID());
        } else {
            image.setId(getEditpart().getId());
        }

        // creates the binding for the field
        createBindings(modelAccess.yField, image, null);

        if (modelAccess.isCssClassValid()) {
            image.addStyleName(modelAccess.getCssClass());
        }

        // set the captions
        applyCaptions();
    }
    return image;
}

From source file:org.opennms.features.topology.netutils.internal.TracerouteWindow.java

License:Open Source License

/**
 * The buildEmbeddedBrowser method creates a new browser instance and adds it to the 
 * bottom layout. The browser is set to invisible by default.
 *//* ww w .  j av  a 2s .c  o  m*/
private void buildEmbeddedBrowser() {
    resultsBrowser = new Embedded();
    resultsBrowser.setType(Embedded.TYPE_BROWSER);
    resultsBrowser.setImmediate(true);
    resultsBrowser.setVisible(false);
    bottomLayout.addComponent(resultsBrowser);
}

From source file:org.processbase.ui.servlet.MainWindow.java

License:Open Source License

Layout getHeader() {
    HorizontalLayout header = new HorizontalLayout();
    header.setWidth("100%");
    header.setMargin(false);/*from   w w  w .j  a  v a  2s  . c  o m*/
    header.setSpacing(true);

    ThemeResource themeResource = new ThemeResource("icons/processbase.png");
    Embedded logo = new Embedded();
    logo.setSource(themeResource);
    logo.setType(Embedded.TYPE_IMAGE);

    header.addComponent(logo);
    header.setExpandRatio(logo, 1.0f);

    Label helloUser = new Label("Welcome, " + user.getFirstName() + " " + user.getLastName());
    //        helloUser.setStyleName(Runo.LABEL_H2);
    header.addComponent(helloUser);
    header.setComponentAlignment(helloUser, Alignment.MIDDLE_RIGHT);
    header.setExpandRatio(helloUser, 1.0f);

    Button profile = new Button(((PbApplication) getApplication()).getPbMessages().getString("btnProfile"),
            new Button.ClickListener() {

                public void buttonClick(ClickEvent event) {
                    openProfileWindow();
                }
            });
    profile.setStyleName(Runo.BUTTON_LINK);
    header.addComponent(profile);
    header.setComponentAlignment(profile, Alignment.MIDDLE_RIGHT);

    Button logout = new Button(((PbApplication) getApplication()).getPbMessages().getString("btnLogout"),
            new Button.ClickListener() {

                public void buttonClick(ClickEvent event) {
                    openLogoutWindow();
                }
            });
    logout.setStyleName(Runo.BUTTON_LINK);
    header.addComponent(logout);
    header.setComponentAlignment(logout, Alignment.MIDDLE_RIGHT);

    return header;
}

From source file:org.semanticsoft.vaaclipsedemo.cassandra.app.editors.ImageView.java

License:Open Source License

@Inject
public ImageView(VerticalLayout container, MInputPart inputPart) {
    super(inputPart.getInputURI());
    embedded = new Embedded();
    container.addComponent(embedded);/*from w w  w. j av a 2s. c  o m*/
    container.setComponentAlignment(embedded, Alignment.MIDDLE_CENTER);

    embedded.setSource(new FileResource(getFile()));
}

From source file:org.vaadin.alump.fancylayouts.demo.PanelDemo.java

License:Apache License

/**
 * Sample content for panel//from  w w w  .ja  va 2  s .com
 * 
 * @return
 */
private ComponentContainer createPanelContentA() {

    VerticalLayout layout = new VerticalLayout();
    layout.setWidth("100%");
    layout.setMargin(true);
    layout.setSpacing(true);

    Label label = new Label(LOREM_STR);
    layout.addComponent(label);

    Embedded image = new Embedded();
    image.setSource(new ExternalResource("http://misc.siika.fi/fancy-demo1.jpg"));
    image.setWidth("500px");
    image.setHeight("281px");
    layout.addComponent(image);

    return layout;

}