svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / ProjectionEvent.java @ 25764
History | View | Annotate | Download (1.09 KB)
1 |
package com.iver.cit.gvsig.fmap; |
---|---|
2 |
|
3 |
import org.cresques.cts.IProjection; |
4 |
|
5 |
/**
|
6 |
* <p>Event produced when the projection of the view port has changed.</p>
|
7 |
*/
|
8 |
public class ProjectionEvent extends FMapEvent { |
9 |
/**
|
10 |
* <p>The new projection.</p>
|
11 |
*/
|
12 |
private IProjection newProyection;
|
13 |
|
14 |
/**
|
15 |
* <p>Identifies this object as an event related with the projection.</p>
|
16 |
*/
|
17 |
private static final int PROJECTION_EVENT = 0; |
18 |
|
19 |
/**
|
20 |
* <p>Creates a new projection event.</p>
|
21 |
*
|
22 |
* @param proj the new projection
|
23 |
*
|
24 |
* @return a new projection event
|
25 |
*/
|
26 |
public static ProjectionEvent createProjectionEvent(IProjection proj){ |
27 |
return new ProjectionEvent(proj, PROJECTION_EVENT); |
28 |
} |
29 |
|
30 |
/**
|
31 |
* <p>Creates a new projection event of the specified type.</p>
|
32 |
*
|
33 |
* @param proj the new projection
|
34 |
* @param eventType identifier of this kind of event
|
35 |
*/
|
36 |
private ProjectionEvent(IProjection proj, int eventType) { |
37 |
setEventType(eventType); |
38 |
newProyection = proj; |
39 |
} |
40 |
|
41 |
/**
|
42 |
* <p>Gets the new projection.</p>
|
43 |
*
|
44 |
* @return the new projection
|
45 |
*/
|
46 |
public IProjection getNewProjection() {
|
47 |
return newProyection;
|
48 |
} |
49 |
} |