Example usage for com.vaadin.ui ComponentContainer addComponent

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

Introduction

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

Prototype

public void addComponent(Component c);

Source Link

Document

Adds the component into this container.

Usage

From source file:com.klwork.explorer.ui.business.flow.act.MyTaskRelatedContentComponent.java

License:Apache License

protected void addEmptySpace(ComponentContainer container) {
    Label emptySpace = new Label(" ", Label.CONTENT_XHTML);
    emptySpace.setSizeUndefined();//from   w  w w  .  j  ava 2 s  .c  om
    container.addComponent(emptySpace);
}

From source file:com.klwork.explorer.ui.task.TaskDetailPanel.java

License:Apache License

protected void addEmptySpace(ComponentContainer container) {
    Label emptySpace = new Label(" ", ContentMode.HTML);
    emptySpace.setSizeUndefined();//w  w w . jav  a2 s .co  m
    container.addComponent(emptySpace);
}

From source file:com.mycollab.module.project.view.ProjectListPresenter.java

License:Open Source License

@Override
protected void onGo(HasComponents container, ScreenData<?> data) {
    ComponentContainer componentContainer = (ComponentContainer) container;
    componentContainer.removeAllComponents();
    componentContainer.addComponent(view);
    ProjectSearchCriteria searchCriteria = new ProjectSearchCriteria();
    doSearch(searchCriteria);//from  ww  w.  j  a v  a2  s  .  c o  m
}

From source file:com.mycollab.module.project.view.UserProjectDashboardPresenter.java

License:Open Source License

@Override
protected void onGo(HasComponents container, ScreenData data) {
    ComponentContainer componentContainer = (ComponentContainer) container;
    componentContainer.removeAllComponents();
    componentContainer.addComponent(view);
    view.lazyLoadView();/*w w w  .  ja  va 2  s  .  co  m*/
}

From source file:de.catma.ui.menu.MenuFactory.java

License:Open Source License

public Menu createMenu(final ComponentContainer componentContainer,
        final MenuEntryDefinition... menuEntryDefintions) {

    final MenuBar menuBar = new MenuBar();
    Menu menu = new Menu(menuBar);

    for (final MenuEntryDefinition menuEntryDefinition : menuEntryDefintions) {
        Command command = new Command() {

            public void menuSelected(MenuItem selectedItem) {
                if (menuEntryDefinition.getWindow().getParent() != null) {
                    menuEntryDefinition.getWindow().bringToFront();
                } else {
                    componentContainer.getWindow().addWindow(menuEntryDefinition.getWindow());
                    menuEntryDefinition.getWindow().setPosition();
                }/*from  w ww.  ja v a  2  s. c o m*/
            }
        };
        menu.addEntry(menuEntryDefinition.getWindow().getContent(), command);
        menuBar.addItem(menuEntryDefinition.getCaption(), command);
    }
    componentContainer.addComponent(menuBar);

    return menu;
}

From source file:de.unioninvestment.eai.portal.portlet.crud.CrudUI.java

License:Apache License

/**
 * Erzeugt ein verstecktes HTML-Element mit der PortletPresenter-Window-ID
 * fr die Akzeptanztests.//from   www. j  a v a 2s  .  c om
 * 
 * @param container
 */
private void addHiddenPortletId(ComponentContainer container) {
    Label labelForPortletId = new Label(getPortletId());
    labelForPortletId.setStyleName("crudPortletId");
    labelForPortletId.setHeight(0, AbstractComponent.UNITS_PIXELS);

    container.addComponent(labelForPortletId);

    Label labelForCommunityId = new Label(String.valueOf(getCommunityId()));
    labelForCommunityId.setStyleName("crudPortletCommunityId");
    labelForCommunityId.setHeight(0, AbstractComponent.UNITS_PIXELS);

    container.addComponent(labelForCommunityId);
}

From source file:it.vige.greenarea.bpm.custom.ui.dettaglio.admin.letturafiltri.LetturaFiltriPanel.java

License:Apache License

protected void addEmptySpace(ComponentContainer container) {
    Label emptySpace = new Label("&nbsp;", CONTENT_XHTML);
    emptySpace.setSizeUndefined();/*www. ja  v  a 2  s.c om*/
    container.addComponent(emptySpace);
}

From source file:me.uni.emuseo.view.menu.MenuView.java

License:Open Source License

@Override
public void enter(ViewChangeEvent event) {
    setNavigator(event.getNavigator());// w ww .  ja  va 2  s.  c  o  m
    String parameters = event.getParameters();

    ComponentContainer content = getContentContainer();
    if (parameters == null || parameters.isEmpty()) {
        content.addComponent(new MenuStartLayout());
    } else if (Permissions.USERS_VIEW.equals(parameters)) {
        content.addComponent(new UserLayout());
    } else if (Permissions.EXHIBITS_VIEW.equals(parameters)) {
        content.addComponent(new ExhibitLayout());
    } else if (Permissions.CATEGORIES_VIEW.equals(parameters)) {
        content.addComponent(new CategoryLayout());
    } else if (Permissions.RESOURCES_VIEW.equals(parameters)) {
        content.addComponent(new ResourceLayout());
    } else if (Permissions.MY_ACCOUNT_VIEW.equals(parameters)) {
        content.addComponent(new MyAccountView());
    } else if (Permissions.SETTINGS_VIEW.equals(parameters)) {
        content.addComponent(new SettingsView());
    } else {
        content.addComponent(new Label("Bdna strona eMuseo?"));
    }
}

From source file:org.eclipse.skalli.view.component.Tray.java

License:Open Source License

public Tray(Component component, String caption, String description, ThemeResource icon, boolean isVisible,
        boolean isEnabled, boolean isRequired) {
    this.component = component;
    ComponentContainer content = createContent(caption, description, icon, isRequired);
    content.addComponent(component);
    setContentState(isVisible, isEnabled);
}

From source file:org.escidoc.browser.ui.GroupRolesView.java

License:Open Source License

private void listRolesForUser(ComponentContainer grantListLayout) {
    grantListLayout.removeAllComponents();

    try {/*from w w  w. ja v a 2 s  .co m*/
        if (repositories.group().getGrantsForGroup(groupId).size() == 0) {
            grantListLayout.addComponent(new Label("<h2>The group has no roles.</h2>", Label.CONTENT_XHTML));
        } else {
            showExistingGrants(grantListLayout);
        }
    } catch (EscidocClientException e) {
        LOG.error("Cannot get grants for Group " + groupId + e.getLocalizedMessage() + "while showing Group "
                + groupId);

    } catch (Exception finalexception) {
        router.getMainWindow().showNotification("Fatal error!",
                "There has been a problem with this view. The Grants could not be retrieved saving them would attempt to overwrite the old ones. Please proceed with care <br />"
                        + finalexception.getMessage(),
                Notification.TYPE_TRAY_NOTIFICATION);
        LOG.error("Final Exception" + finalexception.getLocalizedMessage());
    }

    grantListLayout.addComponent(buildGrantRowAddView());
}