Last change
on this file since 2622 was 2622, checked in by jttt, 15 years ago |
Dataset changed events refactored - DatasetEventManager now allows to register listeners to current dataset (no need to reregister when activeLayer is changed, events from current dataset are always returned), possibility to automatically receive events in EDT
|
-
Property svn:mime-type
set to
text/plain
|
File size:
879 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.osm.event;
|
---|
3 |
|
---|
4 | import java.util.Collections;
|
---|
5 | import java.util.List;
|
---|
6 |
|
---|
7 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
8 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
9 | import org.openstreetmap.josm.data.osm.Relation;
|
---|
10 |
|
---|
11 | public class RelationMembersChangedEvent extends AbstractDatasetChangedEvent {
|
---|
12 |
|
---|
13 | private final Relation relation;
|
---|
14 |
|
---|
15 | public RelationMembersChangedEvent(DataSet dataSet, Relation relation) {
|
---|
16 | super(dataSet);
|
---|
17 | this.relation = relation;
|
---|
18 | }
|
---|
19 |
|
---|
20 | @Override
|
---|
21 | public void fire(DataSetListener listener) {
|
---|
22 | listener.relationMembersChanged(this);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public Relation getRelation() {
|
---|
26 | return relation;
|
---|
27 | }
|
---|
28 |
|
---|
29 | @Override
|
---|
30 | public List<? extends OsmPrimitive> getPrimitives() {
|
---|
31 | return Collections.singletonList(relation);
|
---|
32 | }
|
---|
33 |
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.