Changeset 8520 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-06-22T13:20:28+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r8516 r8520 123 123 @Override 124 124 public void stateChanged(ChangeEvent ignore) { 125 GuiHelper.runInEDT(new Runnable() {125 /*GuiHelper.runInEDT(new Runnable() { 126 126 @Override 127 127 public void run() { 128 128 progressRenderer.setTasks(progressMonitor.toString()); 129 129 } 130 }); 130 });*/ 131 131 } 132 132 … … 266 266 @Deprecated 267 267 public void finishTask() { 268 } 269 268 // Not used 269 } 270 271 /** 272 * Displays the given task as finished. 273 * @param title the task title 274 */ 270 275 public void finishTask(String title) { 271 276 final Task task = Utils.find(tasks, Predicates.<Task>equalTo(new MeasurableTask(title))); 272 if (task != null && taskinstanceof MeasurableTask) {277 if (task instanceof MeasurableTask) { 273 278 ((MeasurableTask) task).finish(); 274 279 Main.debug(tr("{0} completed in {1}", title, ((MeasurableTask) task).duration)); … … 279 284 @Override 280 285 public void invalidate() { 286 // Not used 281 287 } 282 288 283 289 @Override 284 290 public void setTicksCount(int ticks) { 291 // Not used 285 292 } 286 293 … … 301 308 @Override 302 309 public void worked(int ticks) { 310 // Not used 303 311 } 304 312 … … 310 318 @Override 311 319 public void cancel() { 320 // Not used 312 321 } 313 322 314 323 @Override 315 324 public void addCancelListener(CancelListener listener) { 325 // Not used 316 326 } 317 327 318 328 @Override 319 329 public void removeCancelListener(CancelListener listener) { 330 // Not used 320 331 } 321 332 322 333 @Override 323 334 public void appendLogMessage(String message) { 335 // Not used 324 336 } 325 337 326 338 @Override 327 339 public void setProgressTaskId(ProgressTaskId taskId) { 340 // Not used 328 341 } 329 342 … … 350 363 private final JosmEditorPane lblTaskTitle = new JosmEditorPane(); 351 364 private final JProgressBar progressBar = new JProgressBar(JProgressBar.HORIZONTAL); 352 private static final String labelHtml= "<html>"365 private static final String LABEL_HTML = "<html>" 353 366 + "<style>ul {margin-top: 0; margin-bottom: 0; padding: 0;} li {margin: 0; padding: 0;}</style>"; 354 367 … … 357 370 358 371 JosmEditorPane.makeJLabelLike(lblTaskTitle, false); 359 lblTaskTitle.setText( labelHtml);372 lblTaskTitle.setText(LABEL_HTML); 360 373 final JScrollPane scrollPane = new JScrollPane(lblTaskTitle, 361 374 ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); … … 368 381 } 369 382 383 /** 384 * Constructs a new {@code SplashScreenProgressRenderer}. 385 */ 370 386 public SplashScreenProgressRenderer() { 371 387 build(); … … 374 390 public void setTasks(String tasks) { 375 391 synchronized (lblTaskTitle) { 376 lblTaskTitle.setText( labelHtml+ tasks);392 lblTaskTitle.setText(LABEL_HTML + tasks); 377 393 lblTaskTitle.setCaretPosition(lblTaskTitle.getDocument().getLength()); 378 394 }
Note:
See TracChangeset
for help on using the changeset viewer.