Changeset 6084 in josm for trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
- Timestamp:
- 2013-07-26T13:38:17+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
r5170 r6084 65 65 =======*/ 66 66 67 @Override 67 68 public void beginTask(String title) { 68 69 beginTask(title, DEFAULT_TICKS); 69 70 } 70 71 72 @Override 71 73 public synchronized void beginTask(String title, int ticks) { 72 74 this.taskTitle = title; … … 78 80 } 79 81 82 @Override 80 83 public synchronized void finishTask() { 81 84 if (state != State.FINISHED) { … … 91 94 } 92 95 96 @Override 93 97 public synchronized void invalidate() { 94 98 if (state == State.INIT) { … … 98 102 } 99 103 104 @Override 100 105 public synchronized void subTask(final String title) { 101 106 if (state == State.IN_SUBTASK) { … … 115 120 } 116 121 122 @Override 117 123 public synchronized void indeterminateSubTask(String title) { 118 124 if (state == State.IN_SUBTASK) { … … 132 138 } 133 139 140 @Override 134 141 public synchronized void setCustomText(String text) { 135 142 if (state == State.IN_SUBTASK) { … … 141 148 } 142 149 150 @Override 143 151 public synchronized void setExtraText(String text) { 144 152 if (state == State.IN_SUBTASK) { … … 153 161 * Default implementation is empty. Override in subclasses to display the log messages. 154 162 */ 163 @Override 155 164 public void appendLogMessage(String message) { 156 165 // do nothing … … 177 186 } 178 187 188 @Override 179 189 public void cancel() { 180 190 cancelHandler.cancel(); 181 191 } 182 192 193 @Override 183 194 public boolean isCanceled() { 184 195 return cancelHandler.isCanceled(); 185 196 } 186 197 198 @Override 187 199 public void addCancelListener(CancelListener listener) { 188 200 cancelHandler.addCancelListener(listener); 189 201 } 190 202 203 @Override 191 204 public void removeCancelListener(CancelListener listener) { 192 205 cancelHandler.removeCancelListener(listener); … … 199 212 abstract void updateProgress(double value); 200 213 214 @Override 201 215 public synchronized void setTicks(int ticks) { 202 216 if (ticks >= ticksCount) { … … 207 221 } 208 222 223 @Override 209 224 public synchronized void setTicksCount(int ticks) { 210 225 this.ticksCount = ticks; … … 212 227 } 213 228 229 @Override 214 230 public void worked(int ticks) { 215 231 if (ticks == ALL_TICKS) { … … 228 244 } 229 245 246 @Override 230 247 public synchronized int getTicks() { 231 248 return ticks; 232 249 } 233 250 251 @Override 234 252 public synchronized int getTicksCount() { 235 253 return ticksCount; … … 240 258 ==========*/ 241 259 260 @Override 242 261 public synchronized ProgressMonitor createSubTaskMonitor(int ticks, boolean internal) { 243 262 if (ticks == ALL_TICKS) {
Note:
See TracChangeset
for help on using the changeset viewer.