01: /* uDig - User Friendly Desktop Internet GIS client
02: * http://udig.refractions.net
03: * (C) 2004, Refractions Research Inc.
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation;
08: * version 2.1 of the License.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: */
15: package net.refractions.udig.project.render;
16:
17: import net.refractions.udig.project.UDIGEvent;
18:
19: /**
20: * Encapsulates a ViewportModelEvent
21: * @author Jesse
22: * @since 1.1.0
23: */
24: public class ViewportModelEvent extends UDIGEvent {
25:
26: public static enum EventType {
27: /**
28: * Indicates the CoordinateReferenceSystem of the ViewportModel has changed.
29: */
30: CRS,
31: /**
32: * Indicates the Bounds of the ViewportModel has changed.
33: */
34: BOUNDS
35: }
36:
37: private final EventType type;
38:
39: public ViewportModelEvent(Object source2, EventType type,
40: Object newValue2, Object oldValue2) {
41: super (source2, newValue2, oldValue2);
42: this .type = type;
43: }
44:
45: @Override
46: public IViewportModel getSource() {
47: return (IViewportModel) source;
48: }
49:
50: /**
51: * @return Returns the type of the event.
52: */
53: public EventType getType() {
54: return type;
55: }
56:
57: }
|