Last change
on this file since 12826 was 12719, checked in by Don-vip, 7 years ago |
fix #15232 - Allow user to request feedback when uploading by adding the review_requested=yes changeset tag.
Inspired by:
|
-
Property svn:eol-style
set to
native
|
File size:
975 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.io;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.gui.util.ChangeNotifier;
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * ChangesetReviewModel is an observable model for the changeset review requested
|
---|
8 | * in the {@link UploadDialog}.
|
---|
9 | * @since 12719
|
---|
10 | */
|
---|
11 | public class ChangesetReviewModel extends ChangeNotifier {
|
---|
12 | private boolean review;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Sets the current changeset review request state and notifies observers if it has changed.
|
---|
16 | *
|
---|
17 | * @param review the new review request state
|
---|
18 | */
|
---|
19 | public void setReviewRequested(boolean review) {
|
---|
20 | boolean oldValue = this.review;
|
---|
21 | this.review = review;
|
---|
22 | if (oldValue != this.review) {
|
---|
23 | fireStateChanged();
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Determines if a changeset review has been requested.
|
---|
29 | *
|
---|
30 | * @return {@code true} if a changeset review has been requested
|
---|
31 | */
|
---|
32 | public boolean isReviewRequested() {
|
---|
33 | return review;
|
---|
34 | }
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.