All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.edu.icm.unity.webadmin.RegistrationsManagementTab Maven / Gradle / Ivy

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright (c) 2013 ICM Uniwersytet Warszawski All rights reserved.
 * See LICENCE.txt file for licensing information.
 */
package pl.edu.icm.unity.webadmin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.vaadin.ui.VerticalLayout;

import pl.edu.icm.unity.MessageSource;
import pl.edu.icm.unity.webadmin.reg.formfill.FormsChooserComponent;
import pl.edu.icm.unity.webadmin.reg.formman.EnquiryFormsComponent;
import pl.edu.icm.unity.webadmin.reg.formman.RegistrationFormsComponent;
import pl.edu.icm.unity.webadmin.reg.invitation.InvitationsComponent;
import pl.edu.icm.unity.webadmin.reg.reqman.RequestsComponent;
import pl.edu.icm.unity.webui.common.Styles;

/**
 * Tab containing management views for the management of registrations: forms, requests and form filling.
 * 
 * @author K. Benedyczak
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class RegistrationsManagementTab  extends VerticalLayout
{
	private MessageSource msg;
	private MainTabPanel tabs;

	@Autowired
	public RegistrationsManagementTab(MessageSource msg, RegistrationFormsComponent regComponent,
			RequestsComponent requestsComponent, FormsChooserComponent reqFillComponent,
			InvitationsComponent invitationsComponent, EnquiryFormsComponent enquiryFormsComponent)
	{
		super();
		this.msg = msg;
		this.tabs = new MainTabPanel(requestsComponent, reqFillComponent, invitationsComponent, 
				regComponent, enquiryFormsComponent);
		this.tabs.addStyleName(Styles.vTabsheetMinimal.toString());
		initUI();
	}

	private void initUI()
	{
		setMargin(false);
		setSpacing(false);
		setCaption(msg.getMessage("RegistrationsManagementTab.caption"));
		VerticalLayout wrapper = new VerticalLayout();
		wrapper.setSpacing(false);
		wrapper.addComponent(tabs);
		wrapper.setSizeFull();
		addComponent(wrapper);
		setSizeFull();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy