| 1 |
// |
|---|
| 2 |
// Licensed under the MIT License |
|---|
| 3 |
// |
|---|
| 4 |
// Copyright (C) 2008 TAKANAWA Tomoaki (http://nutsu.com) and |
|---|
| 5 |
// Spark project (www.libspark.org) |
|---|
| 6 |
// |
|---|
| 7 |
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|---|
| 8 |
// of this software and associated documentation files (the "Software"), to deal |
|---|
| 9 |
// in the Software without restriction, including without limitation the rights |
|---|
| 10 |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|---|
| 11 |
// copies of the Software, and to permit persons to whom the Software is |
|---|
| 12 |
// furnished to do so, subject to the following conditions: |
|---|
| 13 |
// |
|---|
| 14 |
// The above copyright notice and this permission notice shall be included in |
|---|
| 15 |
// all copies or substantial portions of the Software. |
|---|
| 16 |
// |
|---|
| 17 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|---|
| 18 |
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|---|
| 19 |
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|---|
| 20 |
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|---|
| 21 |
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|---|
| 22 |
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|---|
| 23 |
// THE SOFTWARE. |
|---|
| 24 |
// |
|---|
| 25 |
|
|---|
| 26 |
package snapfit.events.adapters |
|---|
| 27 |
{ |
|---|
| 28 |
import flash.events.IEventDispatcher; |
|---|
| 29 |
import flash.events.Event; |
|---|
| 30 |
import snapfit.events.FAbstractFixAdapter; |
|---|
| 31 |
|
|---|
| 32 |
/** |
|---|
| 33 |
* DisplayObject Event Adapter |
|---|
| 34 |
* @author nutsu |
|---|
| 35 |
* @version 0.1 |
|---|
| 36 |
*/ |
|---|
| 37 |
public class FDisplayAdapter extends FAbstractFixAdapter |
|---|
| 38 |
{ |
|---|
| 39 |
public function FDisplayAdapter( dispatcher_:IEventDispatcher ) |
|---|
| 40 |
{ |
|---|
| 41 |
super(dispatcher_); |
|---|
| 42 |
} |
|---|
| 43 |
|
|---|
| 44 |
override public function bind( target:* ):void |
|---|
| 45 |
{ |
|---|
| 46 |
bindHandlers( target, |
|---|
| 47 |
"enterFrame", |
|---|
| 48 |
"added", |
|---|
| 49 |
"addedToStage", |
|---|
| 50 |
"removed", |
|---|
| 51 |
"removedFromStage", |
|---|
| 52 |
"render"); |
|---|
| 53 |
} |
|---|
| 54 |
|
|---|
| 55 |
public function get enterFrame():*{ return getlistener(Event.ENTER_FRAME); } |
|---|
| 56 |
public function set enterFrame( value:* ):void |
|---|
| 57 |
{ |
|---|
| 58 |
inject( Event.ENTER_FRAME, value ); |
|---|
| 59 |
} |
|---|
| 60 |
|
|---|
| 61 |
public function get added():*{ return getlistener(Event.ADDED); } |
|---|
| 62 |
public function set added( value:* ):void |
|---|
| 63 |
{ |
|---|
| 64 |
inject( Event.ADDED, value ); |
|---|
| 65 |
} |
|---|
| 66 |
|
|---|
| 67 |
public function get addedToStage():*{ return getlistener(Event.ADDED_TO_STAGE); } |
|---|
| 68 |
public function set addedToStage( value:* ):void |
|---|
| 69 |
{ |
|---|
| 70 |
inject( Event.ADDED_TO_STAGE, value ); |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|
| 73 |
public function get removed():*{ return getlistener(Event.REMOVED); } |
|---|
| 74 |
public function set removed( value:* ):void |
|---|
| 75 |
{ |
|---|
| 76 |
inject( Event.REMOVED, value ); |
|---|
| 77 |
} |
|---|
| 78 |
|
|---|
| 79 |
public function get removedFromStage():*{ return getlistener(Event.REMOVED_FROM_STAGE); } |
|---|
| 80 |
public function set removedFromStage( value:* ):void |
|---|
| 81 |
{ |
|---|
| 82 |
inject( Event.REMOVED_FROM_STAGE, value ); |
|---|
| 83 |
} |
|---|
| 84 |
|
|---|
| 85 |
public function get render():*{ return getlistener(Event.RENDER); } |
|---|
| 86 |
public function set render( value:* ):void |
|---|
| 87 |
{ |
|---|
| 88 |
inject( Event.RENDER, value ); |
|---|
| 89 |
} |
|---|
| 90 |
} |
|---|
| 91 |
|
|---|
| 92 |
} |
|---|