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

リビジョン 1346, 3.7 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.MouseEvent;
30         import snapfit.events.FAbstractFixAdapter;
31        
32         /**
33         * Mouse Event Adapter
34         * @author nutsu
35         * @version 0.1
36         */
37         public class FMouseAdapter extends FAbstractFixAdapter
38         {
39                 public function FMouseAdapter( dispatcher_:IEventDispatcher )
40                 {
41                         super(dispatcher_);
42                 }
43                
44                 override public function bind( target:* ):void
45                 {
46                         bindHandlers( target,
47                                                   "click",
48                                                   "doubleClick",
49                                                   "mouseDown",
50                                                   "mouseUp",
51                                                   "mouseOver",
52                                                   "mouseOut",
53                                                   "mouseMove",
54                                                   "mouseWheel",
55                                                   "rollOver",
56                                                   "rollOut" );
57                 }
58                
59                 public function get click():*{ return getlistener(MouseEvent.CLICK); }
60                 public function set click( value:* ):void
61                 {
62                         inject( MouseEvent.CLICK, value );
63                 }
64                
65                 public function get doubleClick():*{ return getlistener(MouseEvent.DOUBLE_CLICK); }
66                 public function set doubleClick( value:* ):void
67                 {
68                         inject( MouseEvent.DOUBLE_CLICK, value );
69                 }
70                
71                 public function get mouseDown():*{ return getlistener(MouseEvent.MOUSE_DOWN); }
72                 public function set mouseDown( value:* ):void
73                 {
74                         inject( MouseEvent.MOUSE_DOWN, value );
75                 }
76                
77                 public function get mouseUp():*{ return getlistener(MouseEvent.MOUSE_UP); }
78                 public function set mouseUp( value:* ):void
79                 {
80                         inject( MouseEvent.MOUSE_UP, value );
81                 }
82                
83                 public function get mouseOver():*{ return getlistener(MouseEvent.MOUSE_OVER); }
84                 public function set mouseOver( value:* ):void
85                 {
86                         inject( MouseEvent.MOUSE_OVER, value );
87                 }
88                
89                 public function get mouseOut():*{ return getlistener(MouseEvent.MOUSE_OUT); }
90                 public function set mouseOut( value:* ):void
91                 {
92                         inject( MouseEvent.MOUSE_OUT, value );
93                 }
94                
95                 public function get mouseMove():*{ return getlistener(MouseEvent.MOUSE_MOVE); }
96                 public function set mouseMove( value:* ):void
97                 {
98                         inject( MouseEvent.MOUSE_MOVE, value );
99                 }
100                
101                 public function get mouseWheel():*{ return getlistener(MouseEvent.MOUSE_WHEEL); }
102                 public function set mouseWheel( value:* ):void
103                 {
104                         inject( MouseEvent.MOUSE_WHEEL, value );
105                 }
106                
107                 public function get rollOver():*{ return getlistener(MouseEvent.ROLL_OVER); }
108                 public function set rollOver( value:* ):void
109                 {
110                         inject( MouseEvent.ROLL_OVER, value );
111                 }
112                
113                 public function get rollOut():*{ return getlistener(MouseEvent.ROLL_OVER); }
114                 public function set rollOut( value:* ):void
115                 {
116                         inject( MouseEvent.ROLL_OVER, value );
117                 }
118         }
119        
120 }
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。