package cls.com.ils.common.component
{
	import flash.display.DisplayObject;
	
	import mx.containers.Form;

	public class IlsForm extends Form implements IIlsContainer
	{
		public function IlsForm()
		{
			super();
			setStyle("paddingTop","0");
			setStyle("paddingBottom","0");
			verticalScrollPolicy="off";
			horizontalScrollPolicy="off";			
		}
		
		public function clearCtrl():void
		{
	        for(var i:int = 0; i < this.getChildren().length; i++) {
	            var child:DisplayObject = this.getChildAt(i);	            
	            if (child is IIlsContainer)
	            {
	            	IIlsContainer(child).clearCtrl();
	            }else if(child is IIlsControl){
	            	IIlsControl(child).clearMe();
	            }
	        }			            			
		}
		
		public function lockCtrl(isLock:Boolean):void
		{
	        for(var i:int = 0; i < this.getChildren().length; i++) {
	            var child:DisplayObject = this.getChildAt(i);	            
	            if (child is IIlsContainer)
	            {
	            	IIlsContainer(child).lockCtrl(isLock);
	            }else if(child is IIlsControl){
	            	IIlsControl(child).lock(isLock);
	            }
	        }			            
		}
		
	}
}