// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java
// public interface ButtonArea extends Container {
// 
// 	public abstract Button getButton(ConstButtonType button_type);
// 	
// 	public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException;
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/Page.java
// public interface Page extends Container {
// 
// 	public abstract PropertiesPage getProperties();
// 	
// 	public abstract ButtonArea getButtonArea();
// 	
// 	public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException;
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java
// public interface PropertiesPage extends PropertiesComponent {
// 	
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java
// public interface FormComponentButtonArea extends FormComponentContainer {
// 
// 	public abstract void setButtonMapping(String button_type, String button_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract FormComponentPage getCurrentPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentPage.java
// public interface FormComponentPage extends FormComponentContainer {
// 
// 	public abstract void setButtonAreaComponentId(String button_area_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void pagesSiblingsChanged();
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// 	
// 	public abstract ButtonArea getButtonArea();
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java
// public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage {
// 	
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java
// public interface XFormsManagerPage extends XFormsManagerContainer {
// 
// 	public abstract void addComponentToDocument(FormComponent component);
// 
// 	public abstract void removeComponentFromXFormsDocument(FormComponent component);
// 
// 	public abstract void moveComponent(FormComponent component,
// 			String before_component_id);
// 
// 	public abstract void pageContextChanged(FormComponent component);
// 
// }


import com.idega.documentmanager.business.component.ButtonArea;
import com.idega.documentmanager.business.component.Page;
import com.idega.documentmanager.business.component.properties.PropertiesPage;
import com.idega.documentmanager.component.FormComponentButtonArea;
import com.idega.documentmanager.component.FormComponentPage;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage;
import com.idega.documentmanager.manager.XFormsManagerPage;
	}
	public ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException {
		
		if(getButtonArea() != null)
			throw new IllegalArgumentException("Button area already exists in the page, remove first");
		
		return (ButtonArea)addComponent(FormComponentFactory.fbc_button_area, component_after_this_id);
	}
	public void setButtonAreaComponentId(String button_area_id) {
		this.button_area_id = button_area_id;
	}
	public void setPageSiblings(FormComponentPage previous, FormComponentPage next) {
		
		next_page = next;
		previous_page = previous;
	}
	public void pagesSiblingsChanged() {
		getXFormsManager().pageContextChanged(this);
		FormComponentButtonArea button_area = (FormComponentButtonArea)getButtonArea();
		if(button_area == null)
			return;
		
		button_area.setPageSiblings(previous_page, next_page);
	}
	public FormComponentPage getPreviousPage() {
		return previous_page;
	}
	public FormComponentPage getNextPage() {
		return next_page;
	}
// Path: src/java/com/idega/documentmanager/business/component/ButtonArea.java
// public interface ButtonArea extends Container {
// 
// 	public abstract Button getButton(ConstButtonType button_type);
// 	
// 	public abstract Button addButton(ConstButtonType button_type, String component_after_this_id) throws NullPointerException;
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/Page.java
// public interface Page extends Container {
// 
// 	public abstract PropertiesPage getProperties();
// 	
// 	public abstract ButtonArea getButtonArea();
// 	
// 	public abstract ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException;
// }
// 
// Path: src/java/com/idega/documentmanager/business/component/properties/PropertiesPage.java
// public interface PropertiesPage extends PropertiesComponent {
// 	
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentButtonArea.java
// public interface FormComponentButtonArea extends FormComponentContainer {
// 
// 	public abstract void setButtonMapping(String button_type, String button_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract FormComponentPage getCurrentPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// }
// 
// Path: src/java/com/idega/documentmanager/component/FormComponentPage.java
// public interface FormComponentPage extends FormComponentContainer {
// 
// 	public abstract void setButtonAreaComponentId(String button_area_id);
// 	
// 	public abstract void setPageSiblings(FormComponentPage previous, FormComponentPage next);
// 	
// 	public abstract void pagesSiblingsChanged();
// 	
// 	public abstract FormComponentPage getPreviousPage();
// 	
// 	public abstract FormComponentPage getNextPage();
// 	
// 	public abstract void announceLastPage(String last_page_id);
// 	
// 	public abstract ButtonArea getButtonArea();
// }
// 
// Path: src/java/com/idega/documentmanager/component/properties/impl/ComponentPropertiesPage.java
// public class ComponentPropertiesPage extends ComponentProperties implements PropertiesPage {
// 	
// }
// 
// Path: src/java/com/idega/documentmanager/manager/XFormsManagerPage.java
// public interface XFormsManagerPage extends XFormsManagerContainer {
// 
// 	public abstract void addComponentToDocument(FormComponent component);
// 
// 	public abstract void removeComponentFromXFormsDocument(FormComponent component);
// 
// 	public abstract void moveComponent(FormComponent component,
// 			String before_component_id);
// 
// 	public abstract void pageContextChanged(FormComponent component);
// 
// }


// Path: src/java/com/idega/documentmanager/component/impl/FormComponentPageImpl.java
import com.idega.documentmanager.business.component.ButtonArea;
import com.idega.documentmanager.business.component.Page;
import com.idega.documentmanager.business.component.properties.PropertiesPage;
import com.idega.documentmanager.component.FormComponentButtonArea;
import com.idega.documentmanager.component.FormComponentPage;
import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPage;
import com.idega.documentmanager.manager.XFormsManagerPage;

	}
	public ButtonArea createButtonArea(String component_after_this_id) throws NullPointerException {
		
		if(getButtonArea() != null)
			throw new IllegalArgumentException("Button area already exists in the page, remove first");
		
		return (ButtonArea)addComponent(FormComponentFactory.fbc_button_area, component_after_this_id);
	}
	public void setButtonAreaComponentId(String button_area_id) {
		this.button_area_id = button_area_id;
	}
	public void setPageSiblings(FormComponentPage previous, FormComponentPage next) {
		
		next_page = next;
		previous_page = previous;
	}
	public void pagesSiblingsChanged() {
		getXFormsManager().pageContextChanged(this);
		FormComponentButtonArea button_area = (FormComponentButtonArea)getButtonArea();
		if(button_area == null)
			return;
		
		button_area.setPageSiblings(previous_page, next_page);
	}
	public FormComponentPage getPreviousPage() {
		return previous_page;
	}
	public FormComponentPage getNextPage() {
		return next_page;
	}
	public void announceLastPage(String last_page_id) {