         if (border)
         {
             border.setActualSize(unscaledWidth, unscaledHeight);
-            bm = border is IBorder ?
-                    IBorder(border).borderMetrics : EdgeMetrics.EMPTY;
+            bm = border is IRectangularBorder ?
+                    IRectangularBorder(border).borderMetrics : EdgeMetrics.EMPTY;
         }
         else
         {

    {
        super.measure();

        var bm:EdgeMetrics = border && border is IBorder ?
                             IBorder(border).borderMetrics :
                             EdgeMetrics.EMPTY;

        var w:Number;

import mx.controls.listClasses.IListItemRenderer;
import mx.core.EdgeMetrics;
import mx.core.FlexVersion;
import mx.core.IDataRenderer;
import mx.core.IFlexDisplayObject;
import mx.core.IFlexModuleFactory;
import mx.core.IFontContextComponent;
import mx.core.IIMESupport;
import mx.core.IInvalidating;
import mx.core.IRectangularBorder;
import mx.core.IUITextField;
import mx.core.UIComponent;
import mx.core.UITextField;
