package info.bukova.isspst.ui.main;

import org.zkoss.bind.annotation.GlobalCommand;
import org.zkoss.bind.annotation.Init;
import org.zkoss.bind.annotation.NotifyChange;

public class TabPanelsVM
{
	private boolean showCentre;
	private boolean showWorkgroup;
	private boolean showAll;
	private boolean selectMy;
	private boolean selectCentre;
	private boolean selectWorkgroup;
	private boolean selectAll;

	@Init
	public void init()
	{
		showCentre = true;
		showWorkgroup = true;
		showAll = true;
		
		selectMy = true;       
		selectCentre = false;   
		selectWorkgroup = false;
		selectAll = false;
	}
	
	@GlobalCommand
	@NotifyChange("showCentre")
	public void disableCentre()
	{
		showCentre = false;
	}

	@GlobalCommand
	@NotifyChange("showWorkgroup")
	public void disableWorkgroup()
	{
		showWorkgroup = false;
	}

	@GlobalCommand
	@NotifyChange("showAll")
	public void disableAll()
	{
		showAll = false;
	}
	
	@GlobalCommand
	@NotifyChange("selectCentre")
	public void selectCentre() {
		selectMy = false;
		selectCentre = true;
	}
	
	@GlobalCommand
	@NotifyChange("selectWorkgroup")
	public void selectWorkgroup() {
		selectMy = false;
		selectWorkgroup = true;
	}
	
	@GlobalCommand
	@NotifyChange("selectAll")
	public void selectAll() {
		selectMy = false;
		selectAll = true;
	}

	public boolean isShowCentre()
	{
		return showCentre;
	}

	public boolean isShowWorkgroup()
	{
		return showWorkgroup;
	}

	public boolean isShowAll()
	{
		return showAll;
	}

	public boolean isSelectMy() {
		return selectMy;
	}

	public boolean isSelectCentre() {
		return selectCentre;
	}

	public boolean isSelectWorkgroup() {
		return selectWorkgroup;
	}

	public boolean isSelectAll() {
		return selectAll;
	}
	
}
