source: trunk/src/org/expeditee/gio/gesture/data/PanGestureData.java

Last change on this file was 1097, checked in by davidb, 6 years ago

Newly structured files from Corey's work on logic/graphics separation

File size: 881 bytes
Line 
1package org.expeditee.gio.gesture.data;
2
3import org.expeditee.core.Point;
4
5/**
6 * Extra data provided with PAN gestures.
7 *
8 * @author cts16
9 *
10 */
11public class PanGestureData extends GestureData {
12
13 /** The position where this PAN gesture started. */
14 private Point _panStart;
15 /** The distance to pan through. */
16 private Point _panDelta;
17
18 public PanGestureData(Point position, Point startPosition, Point deltaPosition)
19 {
20 super(position);
21 _panStart = startPosition.clone();
22 _panDelta = deltaPosition.clone();
23 }
24
25 public PanGestureData(PanGestureData other) {
26 super(other);
27 _panStart = other._panStart.clone();
28 _panDelta = other._panDelta.clone();
29 }
30
31 public Point getPanStart()
32 {
33 return _panStart.clone();
34 }
35
36 public Point getPanDelta()
37 {
38 return _panDelta.clone();
39 }
40
41 @Override
42 public GestureData clone() {
43 return new PanGestureData(this);
44 }
45
46}
Note: See TracBrowser for help on using the repository browser.