Changeset 17238 in josm for trunk/src/org/openstreetmap/josm/gui/io/UploadTextComponentValidator.java
- Timestamp:
- 2020-10-19T00:54:46+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/UploadTextComponentValidator.java
r16697 r17238 22 22 abstract class UploadTextComponentValidator extends AbstractTextComponentValidator { 23 23 private final JLabel feedback; 24 protected boolean uploadRejected; 24 25 25 26 UploadTextComponentValidator(JTextComponent tc, JLabel feedback) { … … 60 61 61 62 /** 63 * Determines if the input validator considers the violation bad enough to reject upload. 64 * @return {@code true} if the input validator considers the violation bad enough to reject upload 65 * @since 17238 66 */ 67 public final boolean isUploadRejected() { 68 return uploadRejected; 69 } 70 71 /** 62 72 * Validator for the changeset {@code comment} tag 63 73 */ … … 85 95 String rejection = UploadDialog.UploadAction.validateUploadTag(uploadComment, "upload.comment", 86 96 Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); 87 if (rejection != null) { 97 uploadRejected = rejection != null; 98 if (uploadRejected) { 88 99 feedbackWarning(tr("Your upload comment is <i>rejected</i>.") + "<br />" + rejection); 89 100 } else { … … 120 131 final String rejection = UploadDialog.UploadAction.validateUploadTag( 121 132 uploadSource, "upload.source", Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); 122 if (rejection != null) { 133 uploadRejected = rejection != null; 134 if (uploadRejected) { 123 135 feedbackWarning(tr("Your changeset source is <i>rejected</i>.") + "<br />" + rejection); 124 136 } else {
Note:
See TracChangeset
for help on using the changeset viewer.