Changeset 12370 in josm for trunk/src/org
- Timestamp:
- 2017-06-09T20:50:22+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/io
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
r11366 r12370 39 39 */ 40 40 public class BasicUploadSettingsPanel extends JPanel { 41 /** 42 * Preference name for history collection 43 */ 41 44 public static final String HISTORY_KEY = "upload.comment.history"; 45 /** 46 * Preference name for last used upload comment 47 */ 42 48 public static final String HISTORY_LAST_USED_KEY = "upload.comment.last-used"; 49 /** 50 * Preference name for the max age search comments may have 51 */ 43 52 public static final String HISTORY_MAX_AGE_KEY = "upload.comment.max-age"; 53 /** 54 * Preference name for the history of source values 55 */ 44 56 public static final String SOURCE_HISTORY_KEY = "upload.source.history"; 45 57 -
trunk/src/org/openstreetmap/josm/gui/io/MaxChangesetSizeExceededPolicy.java
r3083 r12370 2 2 package org.openstreetmap.josm.gui.io; 3 3 4 /** 5 * This determines what to do when the max changeset size was exceeded by a upload. 6 */ 4 7 public enum MaxChangesetSizeExceededPolicy { 5 8 /** -
trunk/src/org/openstreetmap/josm/gui/io/UploadOrSaveState.java
r4310 r12370 2 2 package org.openstreetmap.josm.gui.io; 3 3 4 /** 5 * The state a layer may have after attempting to upload it 6 */ 4 7 public enum UploadOrSaveState { 5 8 /** -
trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
r11608 r12370 22 22 import org.openstreetmap.josm.tools.ImageProvider; 23 23 24 // FIXME this class should extend HtmlPanel instead (duplicated code in here) 24 /** 25 * A panel that displays a summary of data the user is about to upload 26 * <p> 27 * FIXME this class should extend HtmlPanel instead (duplicated code in here) 28 */ 25 29 public class UploadParameterSummaryPanel extends JPanel implements HyperlinkListener, PropertyChangeListener { 26 30 private transient UploadStrategySpecification spec = new UploadStrategySpecification(); … … 129 133 } 130 134 135 /** 136 * Sets the {@link UploadStrategySpecification} the user chose 137 * @param spec The specification to display 138 */ 131 139 public void setUploadStrategySpecification(UploadStrategySpecification spec) { 132 140 this.spec = spec; … … 134 142 } 135 143 144 /** 145 * Sets the number of objects that will be uploaded 146 * @param numObjects The number to display 147 */ 136 148 public void setNumObjects(int numObjects) { 137 149 this.numObjects = numObjects; … … 139 151 } 140 152 153 /** 154 * Display that the changeset will be closed after the upload 155 * @param value <code>true</code> if it will be closed 156 */ 141 157 public void setCloseChangesetAfterNextUpload(boolean value) { 142 158 this.closeChangesetAfterNextUpload = value; -
trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
r11747 r12370 145 145 } 146 146 147 /** 148 * See if the user pressed the cancel button 149 * @return <code>true</code> if the user canceled the upload 150 */ 147 151 public boolean isCanceled() { 148 152 return canceled; … … 153 157 } 154 158 159 /** 160 * Gets the list of primitives the user selected 161 * @return The primitives 162 */ 155 163 public List<OsmPrimitive> getSelectedPrimitives() { 156 164 List<OsmPrimitive> ret = new ArrayList<>(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategy.java
r11489 r12370 8 8 import org.openstreetmap.josm.Main; 9 9 10 /** 11 * The chunk mode to use when uploading 12 */ 10 13 public enum UploadStrategy { 11 14 /** … … 28 31 } 29 32 33 /** 34 * Reads the value from preferences 35 * @param preferenceValue The preference value 36 * @return The {@link UploadStrategy} for that preference or <code>null</code> if unknown 37 */ 30 38 public static UploadStrategy fromPreference(String preferenceValue) { 31 39 if (preferenceValue == null) return null; -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
r10626 r12370 234 234 } 235 235 236 /** 237 * Sets the number of uploaded objects to display 238 * @param numUploadedObjects The number of objects 239 */ 236 240 public void setNumUploadedObjects(int numUploadedObjects) { 237 241 this.numUploadedObjects = Math.max(numUploadedObjects, 0); … … 239 243 } 240 244 245 /** 246 * Fills the inputs using a {@link UploadStrategySpecification} 247 * @param strategy The strategy 248 */ 241 249 public void setUploadStrategySpecification(UploadStrategySpecification strategy) { 242 250 if (strategy == null) … … 253 261 } 254 262 263 /** 264 * Gets the upload strategy the user chose 265 * @return The strategy 266 */ 255 267 public UploadStrategySpecification getUploadStrategySpecification() { 256 268 UploadStrategy strategy = getUploadStrategy(); … … 301 313 } 302 314 315 /** 316 * Load the panel contents from preferences 317 */ 303 318 public void initFromPreferences() { 304 319 UploadStrategy strategy = UploadStrategy.getFromPreferences(); … … 309 324 } 310 325 326 /** 327 * Stores the values that the user has input into the preferences 328 */ 311 329 public void rememberUserInput() { 312 330 UploadStrategy strategy = getUploadStrategy(); … … 376 394 } 377 395 396 /** 397 * Sets the focus on the chunk size field 398 */ 378 399 public void initEditingOfChunkSize() { 379 400 tfChunkSize.requestFocusInWindow(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
r10378 r12370 56 56 } 57 57 58 /** 59 * Gets the chunk size 60 * @return The max size of each upload chunk 61 */ 58 62 public int getChunkSize() { 59 63 return chunkSize; 60 64 } 61 65 66 /** 67 * Gets a special value that is used to indicate that the chunk size was not specified 68 * @return A special integer 69 */ 62 70 public static int getUnspecifiedChunkSize() { 63 71 return UNSPECIFIED_CHUNK_SIZE; 64 72 } 65 73 74 /** 75 * Gets the policy that is used when the server max changeset size is exceeded. 76 * @return What to do when the changeset size is exceeded 77 */ 66 78 public MaxChangesetSizeExceededPolicy getPolicy() { 67 79 return policy; 68 80 } 69 81 82 /** 83 * Sets the upload strategy (chunk mode) 84 * @param strategy The upload strategy 85 * @return This object, for easy chaining 86 */ 70 87 public UploadStrategySpecification setStrategy(UploadStrategy strategy) { 71 88 this.strategy = strategy; … … 73 90 } 74 91 92 /** 93 * Sets the upload chunk size 94 * @param chunkSize The chunk size 95 * @return This object, for easy chaining 96 */ 75 97 public UploadStrategySpecification setChunkSize(int chunkSize) { 76 98 this.chunkSize = chunkSize; … … 78 100 } 79 101 102 /** 103 * Sets the policy to use when the max changeset size is exceeded 104 * @param policy The policy 105 * @return This object, for easy chaining 106 */ 80 107 public UploadStrategySpecification setPolicy(MaxChangesetSizeExceededPolicy policy) { 81 108 this.policy = policy; … … 83 110 } 84 111 112 /** 113 * Sets whether to close the changeset after this upload 114 * @param closeChangesetAfterUpload <code>true</code> to close it 115 * @return This object, for easy chaining 116 */ 85 117 public UploadStrategySpecification setCloseChangesetAfterUpload(boolean closeChangesetAfterUpload) { 86 118 this.closeChangesetAfterUpload = closeChangesetAfterUpload; … … 88 120 } 89 121 122 /** 123 * Gets if the changeset should be closed after this upload 124 * @return <code>true</code> to close it 125 */ 90 126 public boolean isCloseChangesetAfterUpload() { 91 127 return closeChangesetAfterUpload; 92 128 } 93 129 130 /** 131 * Gets the number of requests that will be required to upload the objects 132 * @param numObjects The number of objects 133 * @return The number of requests 134 */ 94 135 public int getNumRequests(int numObjects) { 95 136 if (numObjects <= 0) -
trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
r11553 r12370 25 25 */ 26 26 public class UploadedObjectsSummaryPanel extends JPanel { 27 /** 28 * The swing property name for the number of objects to upload 29 */ 27 30 public static final String NUM_OBJECTS_TO_UPLOAD_PROP = UploadedObjectsSummaryPanel.class.getName() + ".numObjectsToUpload"; 28 31
Note:
See TracChangeset
for help on using the changeset viewer.