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

pl.edu.icm.unity.webadmin.MainTabPanel 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 com.vaadin.ui.Component;
import com.vaadin.ui.TabSheet;

import pl.edu.icm.unity.webui.ActivationListener;

/**
 * The main panel with tabs.
 * @author K. Benedyczak
 */
public class MainTabPanel extends TabSheet
{
	public MainTabPanel(Component... elements)
	{
		setSizeFull();
		
		for (Component element: elements)
			addTab(element);
		addSelectedTabChangeListener(tabChanged -> {
			Component selectedTab = getSelectedTab();
			if (selectedTab instanceof ActivationListener)
				((ActivationListener) selectedTab).stateChanged(true);
		});
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy