    package flare.vis.controls
    {
        import flare.vis.events.SelectionEvent;

        import flash.display.DisplayObject;
        import flash.display.InteractiveObject;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.events.TimerEvent;
        import flash.utils.Timer;

        [Event("select",   type="flare.vis.events.SelectionEvent")]
        [Event("deselect", type="flare.vis.events.SelectionEvent")]

        /**
         * Interactive control for responding to mouse clicks events. Select event
         * listeners can be added to respond to the mouse clicks. This control
         * also allows the number of mouse-clicks (single, double, triple, etc) and
         * maximum delay time between clicks to be configured.
         * @see flare.vis.events.SelectionEvent
         */
        public class ClickControl extends Control
        {
            private var _timer:Timer;
            private var _cur:DisplayObject;
            private var _clicks:uint = 0;
            private var _clear:Boolean = false;
            private var _evt:MouseEvent = null;

            /** The number of clicks needed to trigger a click event. Setting this
             *  value to zero effectively disables the click control. */
            public var numClicks:uint;

            /** The maximum allowed delay (in milliseconds) between clicks.
             *  The delay determines the maximum time interval between a
             *  mouse up event and a subsequent mouse down event. */
            public function get clickDelay():Number { return _timer.delay; }
            public function set clickDelay(d:Number):void { _timer.delay = d; }

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

            /**
             * Creates a new ClickControl.
             * @param filter a Boolean-valued filter function indicating which
             *  items should trigger hover processing
             * @param numClicks the number of clicks
             * @param onClick an optional SelectionEvent listener for click events
             */
            public function ClickControl(filter:*=n