Worldwind public release 0.2.1
[worldwind-tracker.git] / gov / nasa / worldwind / PositionEvent.java
blob60d5a76f2b4bf5f55a03b3a8d798b1f39d5337a9
1 /*
2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
5 All Rights Reserved.
6 */
7 package gov.nasa.worldwind;
9 import gov.nasa.worldwind.geom.*;
11 import java.util.*;
13 /**
14 * @author tag
15 * @version $Id: PositionEvent.java 1941 2007-06-02 08:52:28Z tgaskins $
17 public class PositionEvent extends EventObject
19 private final java.awt.Point screenPoint;
20 private final Position position;
21 private final Position previousPosition;
23 public PositionEvent(Object source, java.awt.Point screenPoint, Position previousPosition, Position position)
25 super(source);
26 this.screenPoint = screenPoint;
27 this.position = position;
28 this.previousPosition = previousPosition;
31 public java.awt.Point getScreenPoint()
33 return screenPoint;
36 public Position getPosition()
38 return position;
41 public Position getPreviousPosition()
43 return previousPosition;
46 @Override
47 public String toString()
49 return this.getClass().getName() + " "
50 + (this.previousPosition != null ? this.previousPosition : "null")
51 + " --> "
52 + (this.position != null ? this.position : "null");