root/as3/snapfit/trunk/src/snapfit/events/adapters/FInteractiveAdapter.as

リビジョン 1346, 5.9 kB (コミッタ: nutsu, コミット時期: 3 年 前)

stretch util

Line 
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 flash.events.MouseEvent;
31         import flash.events.KeyboardEvent;
32         import flash.events.FocusEvent;
33        
34         /**
35         * InteractiveObject Event Adapter
36         * @author nutsu
37         * @version 0.1
38         */
39         public class FInteractiveAdapter extends FDisplayAdapter
40         {
41                
42                 public function FInteractiveAdapter(dispatcher_:IEventDispatcher )
43                 {
44                         super(dispatcher_);
45                 }
46                
47                 override public function bind( target:* ):void
48                 {
49                         super.bind( target );
50                         bindHandlers( target,
51                                                   "click",
52                                                   "doubleClick",
53                                                   "mouseDown",
54                                                   "mouseUp",
55                                                   "mouseOver",
56                                                   "mouseOut",
57                                                   "mouseMove",
58                                                   "mouseWheel",
59                                                   "rollOver",
60                                                   "rollOut",
61                                                   "keyUp",
62                                                   "keyDown",
63                                                   "focusIn",
64                                                   "focusOut",
65                                                   "keyFocusChange",
66                                                   "mouseFocusChange",
67                                                   "tabChildrenChange",
68                                                   "tabEnabledChange",
69                                                   "tabIndexChange" );
70                 }
71                
72                 //
73                
74                 public function get click():*{ return getlistener(MouseEvent.CLICK); }
75                 public function set click( value:* ):void
76                 {
77                         inject( MouseEvent.CLICK, value );
78                 }
79                
80                 public function get doubleClick():*{ return getlistener(MouseEvent.DOUBLE_CLICK); }
81                 public function set doubleClick( value:* ):void
82                 {
83                         inject( MouseEvent.DOUBLE_CLICK, value );
84                 }
85                
86                 public function get mouseDown():*{ return getlistener(MouseEvent.MOUSE_DOWN); }
87                 public function set mouseDown( value:* ):void
88                 {
89                         inject( MouseEvent.MOUSE_DOWN, value );
90                 }
91                
92                 public function get mouseUp():*{ return getlistener(MouseEvent.MOUSE_UP); }
93                 public function set mouseUp( value:* ):void
94                 {
95                         inject( MouseEvent.MOUSE_UP, value );
96                 }
97                
98                 public function get mouseOver():*{ return getlistener(MouseEvent.MOUSE_OVER); }
99                 public function set mouseOver( value:* ):void
100                 {
101                         inject( MouseEvent.MOUSE_OVER, value );
102                 }
103                
104                 public function get mouseOut():*{ return getlistener(MouseEvent.MOUSE_OUT); }
105                 public function set mouseOut( value:* ):void
106                 {
107                         inject( MouseEvent.MOUSE_OUT, value );
108                 }
109                
110                 public function get mouseMove():*{ return getlistener(MouseEvent.MOUSE_MOVE); }
111                 public function set mouseMove( value:* ):void
112                 {
113                         inject( MouseEvent.MOUSE_MOVE, value );
114                 }
115                
116                 public function get mouseWheel():*{ return getlistener(MouseEvent.MOUSE_WHEEL); }
117                 public function set mouseWheel( value:* ):void
118                 {
119                         inject( MouseEvent.MOUSE_WHEEL, value );
120                 }
121                
122                 public function get rollOver():*{ return getlistener(MouseEvent.ROLL_OVER); }
123                 public function set rollOver( value:* ):void
124                 {
125                         inject( MouseEvent.ROLL_OVER, value );
126                 }
127                
128                 public function get rollOut():*{ return getlistener(MouseEvent.ROLL_OVER); }
129                 public function set rollOut( value:* ):void
130                 {
131                         inject( MouseEvent.ROLL_OVER, value );
132                 }
133                
134                 //
135                
136                 public function get keyUp():*{ return getlistener(KeyboardEvent.KEY_UP); }
137                 public function set keyUp( value:* ):void
138                 {
139                         inject( KeyboardEvent.KEY_UP, value );
140                 }
141                
142                 public function get keyDown():*{ return getlistener(KeyboardEvent.KEY_DOWN); }
143                 public function set keyDown( value:* ):void
144                 {
145                         inject( KeyboardEvent.KEY_DOWN, value );
146                 }
147                
148                 //
149                
150                 public function get focusIn():*{ return getlistener(FocusEvent.FOCUS_IN); }
151                 public function set focusIn( value:* ):void
152                 {
153                         inject( FocusEvent.FOCUS_IN, value );
154                 }
155                
156                 public function get focusOut():*{ return getlistener(FocusEvent.FOCUS_OUT); }
157                 public function set focusOut( value:* ):void
158                 {
159                         inject( FocusEvent.FOCUS_OUT, value );
160                 }
161                
162                 public function get keyFocusChange():*{ return getlistener(FocusEvent.KEY_FOCUS_CHANGE); }
163                 public function set keyFocusChange( value:* ):void
164                 {
165                         inject( FocusEvent.KEY_FOCUS_CHANGE, value );
166                 }
167                
168                 public function get mouseFocusChange():*{ return getlistener(FocusEvent.MOUSE_FOCUS_CHANGE); }
169                 public function set mouseFocusChange( value:* ):void
170                 {
171                         inject( FocusEvent.MOUSE_FOCUS_CHANGE, value );
172                 }
173                
174                 //
175                
176                 public function get tabChildrenChange():*{ return getlistener(Event.TAB_CHILDREN_CHANGE); }
177                 public function set tabChildrenChange( value:* ):void
178                 {
179                         inject( Event.TAB_CHILDREN_CHANGE, value );
180                 }
181                
182                 public function get tabEnabledChange():*{ return getlistener(Event.TAB_ENABLED_CHANGE); }
183                 public function set tabEnabledChange( value:* ):void
184                 {
185                         inject( Event.TAB_ENABLED_CHANGE, value );
186                 }
187                
188                 public function get tabIndexChange():*{ return getlistener(Event.TAB_INDEX_CHANGE); }
189                 public function set tabIndexChange( value:* ):void
190                 {
191                         inject( Event.TAB_INDEX_CHANGE, value );
192                 }
193         }
194        
195 }
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。