 
 package flex.component
 {
+
+import flash.geom.Point;
+
+import flex.intf.ILayoutItem;
+import flex.layout.LayoutItemFactory;
 
 /**
  *  VSlider

    //--------------------------------------------------------------------------

    /**
     *  Position the thumb button according to the given thumbPos parameter,
     *  relative to the current y location of the track in the VSlider control.
     * 
     *  @param thumbPos A number representing the new position of the thumb
     *  button in the control.
     */
    override protected function positionThumb(thumbPos:Number):void
    {
        if (thumb)
        {
            var trackPos:Number = track ? track.y : 0;   
            thumb.y = trackPos + track.height - thumbPos; 
        }
    }
    
    /**
     *  The position of the thumb on an HSlider is equal to the track
     *  height minus the difference between localY and the track
     *  position. This is because we want the thumb to start
     *  at the bottom by default.
     * 
     *  @param localX The x position relative to the HSlider control
     *  @param localY The y position relative to the HSlider control
     */
    override protected function pointToPosition(localX:Number, 
                                                localY:Number):Number
    {
        return track.height - (localY - track.y);
    }
}

}

    //--------------------------------------------------------------------------

    /**
     *  The size of the track on an VSlider equals the height 
     *  of the track.
     */
    override protected function get trackSize():Number
        {
        if (track)
        {
            var trackLItem:ILayoutItem = 
                LayoutItemFactory.getLayoutItemFor(track);
            return trackLItem.actualSize.y;
        }
        else
           return 0;
    }
    
    /**
     *  The size of the thumb is equal to the height of the thumb.
     */
    override protected function calculateThumbSize():Number
    {
        var thumbLItem:ILayoutItem = 
            LayoutItemFactory.getLayoutItemFor(thumb);
        return thumbLItem.actualSize.y;
    }

    //--------------------------------------------------------------------------
