Revision 37298 branches/v2_0_0_prep/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/events/ExtentEvent.java
ExtentEvent.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
|
44 | 44 |
import org.gvsig.fmap.geom.primitive.Envelope; |
45 |
import org.gvsig.timesupport.Time; |
|
45 | 46 |
|
46 | 47 |
|
47 | 48 |
|
48 | 49 |
/** |
49 |
* <p>Event produced when the adjusted extent of the view port has changed.</p> |
|
50 |
* <p>Event produced when the adjusted extent or the time |
|
51 |
* of the view port have changed.</p> |
|
52 |
* <p> |
|
53 |
* TODO: This class has to be renamed to ViewPortEvent. |
|
54 |
* </p> |
|
50 | 55 |
* |
51 | 56 |
* @author Vicente Caballero Navarro |
52 | 57 |
*/ |
... | ... | |
55 | 60 |
* <p>Reference to the new adjusted extent.</p> |
56 | 61 |
*/ |
57 | 62 |
private Envelope newExtent; |
63 |
|
|
64 |
/** |
|
65 |
* <p>Reference to the new time.</p> |
|
66 |
*/ |
|
67 |
private Time newTime; |
|
58 | 68 |
|
59 | 69 |
/** |
60 | 70 |
* <p>Identifier of this kind of event.</p> |
61 | 71 |
*/ |
62 | 72 |
private static final int EXTENT_EVENT = 0; |
73 |
private static final int TIME_EVENT = 1; |
|
63 | 74 |
|
64 | 75 |
/** |
65 | 76 |
* <p>Returns a new extent event.</p> |
... | ... | |
67 | 78 |
* @param c the new adjusted extent |
68 | 79 |
* |
69 | 80 |
* @return a new extent event |
81 |
* @deprecated |
|
82 |
* use the constructor |
|
70 | 83 |
*/ |
71 | 84 |
public static ExtentEvent createExtentEvent(Envelope r){ |
72 | 85 |
return new ExtentEvent(r, EXTENT_EVENT); |
... | ... | |
82 | 95 |
setEventType(eventType); |
83 | 96 |
newExtent = r; |
84 | 97 |
} |
98 |
|
|
99 |
/** |
|
100 |
* <p>Creates a new extent event.</p> |
|
101 |
* |
|
102 |
* @param c the new adjusted extent |
|
103 |
*/ |
|
104 |
public ExtentEvent(Envelope envelope) { |
|
105 |
this(envelope, EXTENT_EVENT); |
|
106 |
} |
|
107 |
|
|
108 |
/** |
|
109 |
* <p>Creates a new time event.</p> |
|
110 |
* @param time |
|
111 |
* the new time |
|
112 |
*/ |
|
113 |
public ExtentEvent(Time time) { |
|
114 |
setEventType(TIME_EVENT); |
|
115 |
newTime = time; |
|
116 |
} |
|
85 | 117 |
|
86 | 118 |
/** |
87 | 119 |
* <p>Gets the new adjusted event.</p> |
... | ... | |
91 | 123 |
public Envelope getNewExtent() { |
92 | 124 |
return newExtent; |
93 | 125 |
} |
126 |
|
|
127 |
/** |
|
128 |
* <p>Gets the new time event.</p> |
|
129 |
* |
|
130 |
* @return the new time extent |
|
131 |
*/ |
|
132 |
public Time getNewTime() { |
|
133 |
return newTime; |
|
134 |
} |
|
94 | 135 |
} |
95 | 136 |
|
96 | 137 |
|
Also available in: Unified diff