PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/org/osflash/signals/events/GenericEvent.as

http://github.com/robertpenner/as3-signals
ActionScript | 44 lines | 27 code | 7 blank | 10 comment | 0 complexity | fdcd84dba7aecf3f2309f4ec0ecfc462 MD5 | raw file
 1package org.osflash.signals.events
 2{
 3	import org.osflash.signals.IPrioritySignal;
 4
 5	/**
 6	 *
 7	 * @see org.osflash.signals.events.IEvent
 8	 * Documentation for the event interface being maintained in IEvent to avoid duplication for now.
 9	 */
10	public class GenericEvent implements IEvent
11	{
12		protected var _bubbles:Boolean;
13		protected var _target:Object;
14		protected var _currentTarget:Object;
15		protected var _signal:IPrioritySignal;
16		
17		public function GenericEvent(bubbles:Boolean = false)
18		{
19			_bubbles = bubbles;
20		}
21		
22		/** @inheritDoc */
23		public function get signal():IPrioritySignal { return _signal; }
24		public function set signal(value:IPrioritySignal):void { _signal = value; }
25		
26		/** @inheritDoc */
27		public function get target():Object { return _target; }
28		public function set target(value:Object):void { _target = value; }
29		
30		/** @inheritDoc */
31		public function get currentTarget():Object { return _currentTarget; }
32		public function set currentTarget(value:Object):void { _currentTarget = value; }
33		
34		/** @inheritDoc */
35		public function get bubbles():Boolean { return _bubbles; }
36		public function set bubbles(value:Boolean):void	{ _bubbles = value;	}
37		
38		/** @inheritDoc */
39		public function clone():IEvent
40		{
41			return new GenericEvent(_bubbles);
42		}
43	}
44}