Example usage for com.vaadin.ui Accordion Accordion

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

Introduction

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

Prototype

public Accordion() 

Source Link

Document

Creates an empty accordion.

Usage

From source file:org.escidoc.browser.layout.NavigationSimpleLayout.java

License:Open Source License

private Accordion buildAccordion() throws EscidocClientException, URISyntaxException {
    final Accordion accordion = new Accordion();
    accordion.setSizeFull();//from   w w  w.  ja  va  2 s.co m
    accordion.addListener(new OnNavigationTabChange());

    addResourcesTab(accordion);
    addOrgUnitTab(accordion);
    addUserAccountsTab(accordion);
    addGroupsTab(accordion);
    addContentModelsTab(accordion);
    addToolsTab(accordion);

    return accordion;
}

From source file:org.escidoc.browser.ui.maincontent.ContainerMetadataRecordsView.java

License:Open Source License

@Deprecated
/**//  w  ww  .j ava  2  s . co  m
 * Using asPanel instead
 * @return
 */
public Accordion asAccord() {
    metadataRecs = new Accordion();
    metadataRecs.setSizeFull();

    pnlmdRec = lblMetadaRecs();
    addComponentsAsTabs(lblAddtionalResources());
    return metadataRecs;
}

From source file:org.escidoc.browser.ui.maincontent.ContextRightPanel.java

License:Open Source License

public Accordion asAccord() {
    final Accordion metadataRecs = new Accordion();
    metadataRecs.setSizeFull();/* w w  w . j  av  a 2 s  .  com*/
    addComponentAsTabs(metadataRecs);
    return metadataRecs;
}

From source file:org.escidoc.browser.ui.maincontent.MetadataRecsItem.java

License:Open Source License

protected Accordion asAccord() {
    final Accordion metadataRecs = new Accordion();
    metadataRecs.setSizeFull();/*from   w  w  w  .  j  a  v  a2s  . c om*/

    final Panel pnlMetadataRecs = lblMetadaRecs();
    final Panel pnlAdditionalResources = lblAddtionalResources();

    // Add the components as tabs in the Accordion.
    metadataRecs.addTab(pnlMetadataRecs, "Metadata", null);
    metadataRecs.addTab(pnlAdditionalResources, "Additional Resources", null);
    return metadataRecs;
}

From source file:org.escidoc.browser.ui.maincontent.ParentsView.java

License:Open Source License

public Component asAccord() {
    final Accordion accordion = new Accordion();
    accordion.setSizeFull();/*from  ww w  .j  a v a  2  s.c om*/
    accordion.addTab(buildParentsList(), ViewConstants.PARENTS, null);
    return accordion;
}

From source file:org.escidoc.browser.ui.tools.CreateResourcesView.java

License:Open Source License

private Accordion buildCreateUserAccount() {
    // common part: create layout
    final Accordion add = new Accordion();
    add.setImmediate(false);//from  ww w .  j ava 2 s .com
    add.setWidth("100.0%");
    add.setHeight("100.0%");

    // vlPnlCreateOrgUnit
    final VerticalLayout layout = new VerticalLayout();
    layout.setImmediate(false);
    layout.setSizeUndefined();
    layout.setMargin(false);

    formAddUser(layout);
    add.addTab(layout, "Create User Account");

    return add;
}

From source file:org.escidoc.browser.ui.tools.CreateResourcesView.java

License:Open Source License

private Accordion buildPnlCreateContext() {
    // common part: create layout
    final Accordion accCreateContext = new Accordion();
    accCreateContext.setImmediate(false);
    accCreateContext.setWidth("100.0%");
    accCreateContext.setHeight("100.0%");

    // vlPnlCreateContext
    final VerticalLayout vlAccCreateContext = new VerticalLayout();
    vlAccCreateContext.setImmediate(false);
    vlAccCreateContext.setMargin(false);
    vlAccCreateContext.setSpacing(false);
    vlAccCreateContext.setSizeUndefined();

    // AddContext Form
    try {/*from w w  w  .j a v  a 2s. co m*/
        formAddContext(vlAccCreateContext);
    } catch (final EscidocClientException e) {
        router.getMainWindow().showNotification(ViewConstants.ERROR_CREATING_RESOURCE + e.getLocalizedMessage(),
                Window.Notification.TYPE_ERROR_MESSAGE);
    }
    accCreateContext.addTab(vlAccCreateContext, "Create Context");

    return accCreateContext;
}

From source file:org.escidoc.browser.ui.tools.CreateResourcesView.java

License:Open Source License

private Accordion buildCreateContentModel() {
    // common part: create layout
    final Accordion accCreateContentModel = new Accordion();
    accCreateContentModel.setImmediate(false);
    accCreateContentModel.setWidth("100.0%");
    accCreateContentModel.setHeight("100.0%");

    // vlPnlCreate
    final VerticalLayout vlAccCreate = new VerticalLayout();
    vlAccCreate.setImmediate(false);//from   ww  w .ja va 2  s  . c  om
    vlAccCreate.setMargin(false);
    vlAccCreate.setSpacing(false);
    vlAccCreate.setSizeUndefined();
    formAddContentModel(vlAccCreate);
    accCreateContentModel.addTab(vlAccCreate, "Create Content Model");

    return accCreateContentModel;
}

From source file:org.escidoc.browser.ui.tools.CreateResourcesView.java

License:Open Source License

private Accordion buildPnlCreateOrgUnit() {
    // common part: create layout
    final Accordion accCreateOrgUnit = new Accordion();
    accCreateOrgUnit.setImmediate(false);
    accCreateOrgUnit.setWidth("100.0%");
    accCreateOrgUnit.setHeight("100.0%");

    // vlPnlCreateOrgUnit
    final VerticalLayout vlAccCreateOrgUnit = new VerticalLayout();
    vlAccCreateOrgUnit.setImmediate(false);
    vlAccCreateOrgUnit.setMargin(false);
    vlAccCreateOrgUnit.setSpacing(false);
    vlAccCreateOrgUnit.setSizeUndefined();
    formAddOrgUnit(vlAccCreateOrgUnit);/* w  w w  .  j av  a2  s.  c o  m*/
    accCreateOrgUnit.addTab(vlAccCreateOrgUnit, "Create Organizational Units");

    return accCreateOrgUnit;
}

From source file:org.generationcp.breeding.manager.crosses.NurseryTemplateMain.java

License:Open Source License

protected void initializeComponents() {
    titleLayout = new HorizontalLayout();
    titleLayout.setSpacing(true);//from www  .j  av  a2 s  . co  m
    setTitleContent(STEP_1_GUIDE_MESSAGE);
    addComponent(titleLayout);

    accordion = new Accordion();
    accordion.setImmediate(true);
    selectNurseryTemplateTab = new NurseryTemplateImportFileComponent(this, accordion);
    specifyNurseryConditionsTab = new NurseryTemplateConditionsComponent(this);

    wizardTabOne = accordion.addTab(selectNurseryTemplateTab,
            messageSource.getMessage(Message.SELECT_NURSERY_TEMPLATE)); //Select Nursery Template
    wizardTabTwo = accordion.addTab(specifyNurseryConditionsTab,
            messageSource.getMessage(Message.SPECIFY_NURSERY_CONDITIONS_LABEL)); //Specify Nursery Conditions

    accordion.addListener(new SelectedTabChangeListener() {
        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            Component selected = accordion.getSelectedTab();
            Tab tab = accordion.getTab(selected);

            if (tab != null && tab.equals(wizardTabOne)) {
                setTitleContent(STEP_1_GUIDE_MESSAGE);
                disableNurseryTemplateConditionsComponent();
            }

        }
    });

    disableNurseryTemplateConditionsComponent();
    addComponent(accordion);
}