Example usage for com.vaadin.ui AbstractComponentContainer addComponent

List of usage examples for com.vaadin.ui AbstractComponentContainer addComponent

Introduction

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

Prototype

@Override
public void addComponent(Component c) 

Source Link

Document

This only implements the events and component parent calls.

Usage

From source file:module.contents.presentationTier.component.SimplePageView.java

License:Open Source License

private void renderPageMenuArea(final AbstractComponentContainer container) {
    final AbstractComponentContainer menuArea = new PageMenuComponent(page);
    container.addComponent(menuArea);
}

From source file:module.contents.presentationTier.component.SimplePageView.java

License:Open Source License

private void renderPageContent(final AbstractComponentContainer container) {
    final SimplePageBodyComponent pageBodyComponent = new SimplePageBodyComponent(page);
    container.addComponent(pageBodyComponent);
}

From source file:module.contents.presentationTier.component.SimpleSectionComponent.java

License:Open Source License

private SimpleSectionComponent addSectionComponent(final AbstractComponentContainer container,
        final Section section) {
    final SimpleSectionComponent sectionComponent = new SimpleSectionComponent(section);
    container.addComponent(sectionComponent);
    return sectionComponent;
}

From source file:org.escidoc.browser.controller.ContentModelView.java

License:Open Source License

private static void addHorizontalRuler(AbstractComponentContainer contentLayout) {
    final Label descRuler = new Label("<hr />", Label.CONTENT_RAW);
    descRuler.setStyleName("hr");
    contentLayout.addComponent(descRuler);
}

From source file:org.escidoc.browser.ui.view.helpers.BreadCrumbMenu.java

License:Open Source License

/**
 * Context case//from  w  w w .j a v a2  s.  co  m
 * 
 * @param cssLayout
 * @param resourceProxy
 * @param repositories
 */
public BreadCrumbMenu(final AbstractComponentContainer componentContainer, final ResourceProxy resourceProxy) {
    String name;
    if (resourceProxy.getName().length() > 100) {
        name = resourceProxy.getName().substring(0, 100);
    } else {
        name = resourceProxy.getName();
    }
    componentContainer.addComponent(new Label(
            "<ul id='crumbs'><li><a href='#'>Home</a></li><li><a href='#'>" + name + "... </a></li></ul>",
            Label.CONTENT_RAW));
}

From source file:org.escidoc.browser.ui.view.helpers.CreateResourceLinksVH.java

License:Open Source License

public CreateResourceLinksVH(String url, ResourceProxy resourceProxy,
        AbstractComponentContainer componentContainer, Router router) {
    HorizontalLayout vl = buildInitialElements();

    if (resourceProxy.getType().equals(ResourceType.ITEM)) {
        vl.setStyleName("permanentLinkItem");
    } else {//  ww  w  .j a va2 s.c o m
        vl.setStyleName("permanentLink");
    }
    if (!resourceProxy.getType().equals(ResourceType.CONTEXT)) {

        final Button btnVersionHistory = new Button(" ", new VersionHistoryClickListener(resourceProxy,
                router.getMainWindow(), router.getRepositories()));
        btnVersionHistory.setStyleName(BaseTheme.BUTTON_LINK);
        btnVersionHistory.setDescription("Show Version history in a Pop-up");
        btnVersionHistory.addStyleName("paddingright10");
        btnVersionHistory.setIcon(ICON_HISTORY);
        vl.addComponent(btnVersionHistory);
    }
    try {
        l = new Link("",
                new ExternalResource(
                        url + "?id=" + resourceProxy.getId() + "&type=" + resourceProxy.getType().toString()
                                + "&escidocurl=" + router.getServiceLocation().getEscidocUrl()));
        l.setDescription(ViewConstants.PERMANENT_LINK);
        l.setIcon(new ThemeResource("images/wpzoom/globe-1.png"));
        vl.addComponent(l);

    } catch (MalformedURLException e) {
        componentContainer.getWindow().showNotification(ViewConstants.COULD_NOT_RETRIEVE_APPLICATION_URL);
        LOG.error(ViewConstants.COULD_NOT_RETRIEVE_APPLICATION_URL + e.getLocalizedMessage());
    }
    componentContainer.addComponent(hl);
}

From source file:org.escidoc.browser.ui.view.helpers.CreateResourceLinksVH.java

License:Open Source License

public CreateResourceLinksVH(String url, UserProxy userProxy, AbstractComponentContainer componentContainer,
        Router router, UserAccountController controller) {
    buildInitialElements();//from  w  ww  .ja  va2s.  c  o  m
    // Checking if has access on changing password here as well
    HorizontalLayout hl = buildInitialElements();
    hl.setStyleName("permanentLink");
    final Button btnVersionHistory = new Button(" ", new ChangeUserPassword(userProxy, router, controller));
    btnVersionHistory.setStyleName(BaseTheme.BUTTON_LINK);
    btnVersionHistory.setDescription("Change user password");
    btnVersionHistory.addStyleName("paddingright10");
    btnVersionHistory.setIcon(ICON_KEY);
    hl.addComponent(btnVersionHistory);
    componentContainer.addComponent(hl);
}

From source file:ru.codeinside.adm.ui.employee.TableEmployee.java

License:Mozilla Public License

public static TextField addTextField(AbstractComponentContainer container, String widthColumn, String content) {
    HorizontalLayout l;//from  ww w.  j a va  2  s . c  om
    l = new HorizontalLayout();
    Label label = new Label(content);
    label.setWidth(widthColumn);
    l.addComponent(label);
    l.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
    final TextField field = new TextField();
    l.addComponent(field);
    container.addComponent(l);
    return field;
}

From source file:ru.codeinside.adm.ui.employee.TableEmployee.java

License:Mozilla Public License

public static MaskedTextField addMaskedTextField(AbstractComponentContainer container, String widthColumn,
        String content) {//from  w  w  w . j  ava 2s .  c o m
    HorizontalLayout l;
    l = new HorizontalLayout();
    Label label = new Label(content);
    label.setWidth(widthColumn);
    l.addComponent(label);
    l.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
    final MaskedTextField field = new MaskedTextField();
    l.addComponent(field);
    container.addComponent(l);
    return field;
}

From source file:ru.codeinside.adm.ui.employee.TableEmployee.java

License:Mozilla Public License

public static PasswordField addPasswordField(AbstractComponentContainer container, String widthColumn,
        String content) {//from w ww  . j  a  v a  2 s.  c  o  m
    HorizontalLayout l;
    l = new HorizontalLayout();
    Label label = new Label(content);
    label.setWidth(widthColumn);
    l.addComponent(label);
    l.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
    final PasswordField field = new PasswordField();
    l.addComponent(field);
    container.addComponent(l);
    return field;
}