     {
     }
 
-    //--------------------------------------------------------------------------
-    //
-    //  Overridden event handlers: UIComponent
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override protected function focusOutHandler(event:FocusEvent):void
-    {
-        // Most of the time the system sends a rollout, but there are
-        // situations where the mouse is over something else
-        // that you don't get one so we force one on FOCUS_OUT.
-        super.focusOutHandler(event);
-
-        mouseCaptured = false;
-        keyboardPressed = false;
-    }
-
-    /**
-     *  @private
-     */
-    override protected function keyDownHandler(event:KeyboardEvent):void
-    {
-        if (event.keyCode != Keyboard.SPACE)
-            return;
-        keyboardPressed = true;
-        event.updateAfterEvent();
-    }
-
-    /**
-     *  @private
-     */
-    override protected function keyUpHandler(event:KeyboardEvent):void
-    {
-        if (event.keyCode != Keyboard.SPACE)
-            return;
-        keyboardPressed = false;
-        
-        if (enabled)
-            dispatchEvent(new MouseEvent(MouseEvent.CLICK));
-        event.updateAfterEvent();
-    }
-
-    /**
-     *  @private
-     *  <code>true</code> when we need to check whether to dispatch
-     *  a button down event
-     */
-    private var checkForButtonDownConditions:Boolean = false;
-
-    /**
-     *  @private
-     *  Timer for doing auto-repeat.
-     */
-    private var autoRepeatTimer:Timer;
-    
-    /**
-     *  @private
-     */
-    private function checkAutoRepeatTimerConditions(buttonDown:Boolean):void
-    {
-        var needsTimer:Boolean = autoRepeat && buttonDown;
-        var hasTimer:Boolean = autoRepeatTimer != null;
-        
-        if (needsTimer == hasTimer)
-            return;
-
-        if (needsTimer)
-            startTimer();
-        else
-            stopTimer();
-    }
-
-    /**
-     *  @private
-     */
-    private function startTimer():void
-    {
-        autoRepeatTimer = new Timer(1);
-        autoRepeatTimer.delay = getStyle("repeatDelay");
-        autoRepeatTimer.addEventListener(TimerEvent.TIMER, autoRepeat_timerDelayHandler);
-        autoRepeatTimer.start();
-    }
-
-    /**
-     *  @private
-     */
-    private function stopTimer():void
-    {
-        autoRepeatTimer.stop();
-        autoRepeatTimer = null;
-    }
-
     /**
      *  @private
      */

        if (ButtonBase.createAccessibilityImplementation != null)
            ButtonBase.createAccessibilityImplementation(this);
    }
    
    //----------------------------------
    //  baselinePosition
    //----------------------------------

    /**
     *  @private
     */
    override public function get baselinePosition():Number
    {
        return getBaselinePositionForPart(labelDisplay);
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden methods
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     */
    override protected function partAdded(partName:String, instance:Object):void
    {
        super.partAdded(partName, instance);
        
        // Push down to the part only if the label was explicitly set
        if (_content !== undefined && instance == labelDisplay)
            labelDisplay.text = label;
    }

    /**
     *  @private
     *  Remember whether we have fired an event already,
     *  so that we don't fire a second time.
     */
    private var _downEventFired:Boolean = false;
    
    /**
     *  @private

        // add event listeners to the button
        addHandlers();
    }   
    
    //--------------------------------------------------------------------------
    //
    //  Variables
    //
    //--------------------------------------------------------------------------

    /**
     *  @private
     *  Remember whether we have fired an event already,
     *  so that we don't fire a second time.
     */
    private var _downEventFired:Boolean = false;
    
    /**
     *  @private
     *  <code>true</code> when we need to check whether to dispatch
     *  a button down event
     */
    private var checkForButtonDownConditions:Boolean = false;

    /**
     *  @private
     *  Timer for doing auto-repeat.
     */
    private var autoRepeatTimer:Timer;
    
    //--------------------------------------------------------------------------
    //
    //  Skin parts
    //
    //--------------------------------------------------------------------------

