package components { import mx.containers.Box; /** * ExtendedBox extends the standard Box class with some additional functionality. **/ public class ExtendedBox extends Box { [Bindable] [Inspectable(category="General", enumeration="true,false", defaultValue="false")] /** * Enforces the measured minimal width within the parent container. **/ public var enforceMeasuredMinWidth:Boolean = false; [Bindable] [Inspectable(category="General", enumeration="true,false", defaultValue="false")] /** * Enforces the measured minimal height within the parent container. **/ public var enforceMeasuredMinHeight:Boolean = false; /** * Measures all child components (by calling Box.measure) and optionally sets * the minWidth and minHeight properties. **/ override protected function measure():void { super.measure(); if(enforceMeasuredMinWidth) { minWidth = measuredMinWidth; } if(enforceMeasuredMinHeight) { minHeight = measuredMinHeight; } } } }