|
@@ -1,49 +1,49 @@ |
1 |
|
- |
// This Source Code is Copyright & Licenced as indicated below |
2 |
|
- |
package org.litesoft.GWT.client.widgets.nonpublic.external; |
3 |
|
- |
/* |
4 |
|
- |
* Copyright 2006 Mat Gessel <mat.gessel@gmail.com> |
5 |
|
- |
* |
6 |
|
- |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
7 |
|
- |
* use this file except in compliance with the License. You may obtain a copy of |
8 |
|
- |
* the License at |
9 |
|
- |
* |
10 |
|
- |
* http://www.apache.org/licenses/LICENSE-2.0 |
11 |
|
- |
* |
12 |
|
- |
* Unless required by applicable law or agreed to in writing, software |
13 |
|
- |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
14 |
|
- |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
15 |
|
- |
* License for the specific language governing permissions and limitations under |
16 |
|
- |
* the License. |
17 |
|
- |
*/ |
18 |
|
- |
|
19 |
|
- |
/** |
20 |
|
- |
* A base class for wrapping a DragGesture. By default, the |
21 |
|
- |
* {@link #start(int, int)}, {@link #step(int, int)} and |
22 |
|
- |
* {@link #finish(int, int)} methods called the delegate implementation. |
23 |
|
- |
*/ |
24 |
|
- |
public class DragGestureWrapper implements DragGesture { |
25 |
|
- |
private final DragGesture m_delegate; |
26 |
|
- |
|
27 |
|
- |
public DragGestureWrapper( DragGesture delegate ) { |
28 |
|
- |
m_delegate = delegate; |
29 |
|
- |
} |
30 |
|
- |
|
31 |
|
- |
public DragGesture getDelegate() { |
32 |
|
- |
return m_delegate; |
33 |
|
- |
} |
34 |
|
- |
|
35 |
|
- |
@Override |
36 |
|
- |
public void start( MouseEvent e ) { |
37 |
|
- |
m_delegate.start( e ); |
38 |
|
- |
} |
39 |
|
- |
|
40 |
|
- |
@Override |
41 |
|
- |
public void step( DragEvent e ) { |
42 |
|
- |
m_delegate.step( e ); |
43 |
|
- |
} |
44 |
|
- |
|
45 |
|
- |
@Override |
46 |
|
- |
public void finish() { |
47 |
|
- |
m_delegate.finish(); |
48 |
|
- |
} |
49 |
|
- |
} |
|
1 |
+ |
// This Source Code is Copyright & Licenced as indicated below |
|
2 |
+ |
package org.litesoft.GWT.client.widgets.nonpublic.external; |
|
3 |
+ |
/* |
|
4 |
+ |
* Copyright 2006 Mat Gessel <mat.gessel@gmail.com> |
|
5 |
+ |
* |
|
6 |
+ |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
|
7 |
+ |
* use this file except in compliance with the License. You may obtain a copy of |
|
8 |
+ |
* the License at |
|
9 |
+ |
* |
|
10 |
+ |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
11 |
+ |
* |
|
12 |
+ |
* Unless required by applicable law or agreed to in writing, software |
|
13 |
+ |
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|
14 |
+ |
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|
15 |
+ |
* License for the specific language governing permissions and limitations under |
|
16 |
+ |
* the License. |
|
17 |
+ |
*/ |
|
18 |
+ |
|
|
19 |
+ |
/** |
|
20 |
+ |
* A base class for wrapping a DragGesture. By default, the |
|
21 |
+ |
* {@link #start(int, int)}, {@link #step(int, int)} and |
|
22 |
+ |
* {@link #finish(int, int)} methods called the delegate implementation. |
|
23 |
+ |
*/ |
|
24 |
+ |
public class DragGestureWrapper implements DragGesture { |
|
25 |
+ |
private final DragGesture m_delegate; |
|
26 |
+ |
|
|
27 |
+ |
public DragGestureWrapper( DragGesture delegate ) { |
|
28 |
+ |
m_delegate = delegate; |
|
29 |
+ |
} |
|
30 |
+ |
|
|
31 |
+ |
public DragGesture getDelegate() { |
|
32 |
+ |
return m_delegate; |
|
33 |
+ |
} |
|
34 |
+ |
|
|
35 |
+ |
@Override |
|
36 |
+ |
public void start( MouseEvent e ) { |
|
37 |
+ |
m_delegate.start( e ); |
|
38 |
+ |
} |
|
39 |
+ |
|
|
40 |
+ |
@Override |
|
41 |
+ |
public void step( DragEvent e ) { |
|
42 |
+ |
m_delegate.step( e ); |
|
43 |
+ |
} |
|
44 |
+ |
|
|
45 |
+ |
@Override |
|
46 |
+ |
public void finish() { |
|
47 |
+ |
m_delegate.finish(); |
|
48 |
+ |
} |
|
49 |
+ |
} |