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