package flater.blogsamples.degrafabutton.skins
{

import com.degrafa.skins.GraphicBorderSkin;

/**
 *  A base class to add bindable width and height properties to GraphicBorderSkin
 * 
 *  @author - Adam Flater - adamflater.net
 */
public class BaseGraphicBorderSkin extends GraphicBorderSkin
{
    //--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------

    /**
     *  Constructor
     */    
    public function BaseGraphicBorderSkin()
    {
        super();
    }


    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    /**
     *  The bindable unscaled width property
     */
    [Bindable] public var awidth    : Number        = 0;
    
    /**
     *  The bindable unscaled height property
     */
    [Bindable] public var aheight    : Number        = 0;

    
    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     *  @override
     * 
     *  Overriding updateDisplayList to set <code>awidth</code> and <code>aheight</code>.
     */    
    override protected function updateDisplayList( unscaledWidth : Number, 
                                                   unscaledHeight : Number) : void 
    {
        super.updateDisplayList( unscaledWidth, unscaledHeight );
        awidth      = unscaledWidth;
        aheight     = unscaledHeight;
    }    
    
    
} //  end class
} //  end package