01: package org.tcat.citd.sim.udig.bookmarks;
02:
03: import org.geotools.geometry.jts.ReferencedEnvelope;
04: import org.tcat.citd.sim.udig.bookmarks.internal.MapReference;
05:
06: /**
07: * Representation of a bookmark.
08: * <p>
09: * A <code>Bookmark</code> consists of the <code>IMap</code> object it is associated with, the
10: * <code>Envelope</code> that decscribes the bounds, and a user-defined name.
11: * </p>
12: *
13: * @author cole.markham
14: * @since 1.0.0
15: */
16: public class Bookmark {
17: private ReferencedEnvelope envelope;
18: private MapReference mapID;
19: private String name;
20:
21: /**
22: * Construct a new bookmark with the given center and envelope.
23: *
24: * @param envelope
25: * @param map
26: * @param name
27: */
28: public Bookmark(ReferencedEnvelope envelope, MapReference map,
29: String name) {
30: this .envelope = envelope;
31: this .mapID = map;
32: this .name = name;
33: }
34:
35: /**
36: * @return Returns the envelope.
37: */
38: public ReferencedEnvelope getEnvelope() {
39: return envelope;
40: }
41:
42: /**
43: * @param envelope The envelope to set.
44: */
45: public void setEnvelope(ReferencedEnvelope envelope) {
46: this .envelope = envelope;
47: }
48:
49: /**
50: * @return Returns the map.
51: */
52: public MapReference getMap() {
53: return mapID;
54: }
55:
56: /**
57: * @param map The map to set.
58: */
59: public void setMap(MapReference map) {
60: this .mapID = map;
61: }
62:
63: /**
64: * @return Returns the name.
65: */
66: public String getName() {
67: return name;
68: }
69:
70: @Override
71: public String toString() {
72: return this .getName();
73: }
74:
75: /**
76: * @param name The name to set.
77: */
78: public void setName(String name) {
79: this.name = name;
80: }
81:
82: }
|