1 | /*
|
---|
2 | * JOSMng - a Java Open Street Map editor, the next generation.
|
---|
3 |
|
---|
4 | *
|
---|
5 | * Copyright (C) 2008 Petr Nejedly <P.Nejedly@sh.cvut.cz>
|
---|
6 | *
|
---|
7 | * This program is free software; you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation; either version 2 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * This program is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 |
|
---|
17 | * You should have received a copy of the GNU General Public License along
|
---|
18 | * with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
20 | */
|
---|
21 |
|
---|
22 | package org.openstreetmap.josm.data.osm;
|
---|
23 |
|
---|
24 | import java.util.Collection;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * A listener listening for all DataSet changes.
|
---|
28 | * INCOMPLETE (missing relation-related events)!
|
---|
29 | *
|
---|
30 | * @author nenik
|
---|
31 | */
|
---|
32 | public interface DataSetListener {
|
---|
33 | /**
|
---|
34 | * A bunch of primitives were added into the DataSet, or existing
|
---|
35 | * deleted/invisible primitives were resurrected.
|
---|
36 | *
|
---|
37 | * @param added A collection of newly-visible primitives
|
---|
38 | */
|
---|
39 | public void primtivesAdded(Collection<? extends OsmPrimitive> added);
|
---|
40 |
|
---|
41 | /**
|
---|
42 | * A bunch of primitives were removed from the DataSet, or preexisting
|
---|
43 | * primitives were marked as deleted.
|
---|
44 | *
|
---|
45 | * @param removed A collection of newly-invisible primitives
|
---|
46 | */
|
---|
47 | public void primtivesRemoved(Collection<? extends OsmPrimitive> removed);
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * There was some change in the tag set of a primitive. It can have been
|
---|
51 | * a tag addition, tag removal or change in tag value.
|
---|
52 | *
|
---|
53 | * @param prim the primitive, whose tags were affected.
|
---|
54 | */
|
---|
55 | public void tagsChanged(OsmPrimitive prim);
|
---|
56 |
|
---|
57 | /**
|
---|
58 | * A node's coordinates were modified.
|
---|
59 | * @param node The node that was moved.
|
---|
60 | */
|
---|
61 | public void nodeMoved(Node node);
|
---|
62 |
|
---|
63 | /**
|
---|
64 | * A way's node list was changed.
|
---|
65 | * @param way The way that was modified.
|
---|
66 | */
|
---|
67 | public void wayNodesChanged(Way way);
|
---|
68 |
|
---|
69 | /**
|
---|
70 | * A relation's members have changed.
|
---|
71 | * @param relation The relation that was modified.
|
---|
72 | */
|
---|
73 | public void relationMembersChanged(Relation r);
|
---|
74 |
|
---|
75 |
|
---|
76 | }
|
---|