- Timestamp:
- 04/16/19 09:52:23 (5 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/auth/Actions.java
r1313 r1314 50 50 import org.expeditee.gui.FrameIO; 51 51 import org.expeditee.gui.MessageBay; 52 import org.expeditee.gui.MessageBay.Progress; 52 53 import org.expeditee.io.ExpReader; 53 54 import org.expeditee.items.Item; … … 378 379 // Track progress 379 380 String message = "Creating new user account..."; 381 int progress = 0; 382 int step = 20; 380 383 381 384 // Extract user details … … 384 387 String email = userdata.get(AuthenticationTag.Email); 385 388 386 System.out.println(message + "Generating Keys."); 389 Progress progressBar = MessageBay.displayProgress(message); 390 try { 391 progressBar.UpdateMessage(message + "Generating Keys.", progress += step); 392 } catch (Exception e) { 393 e.printStackTrace(); 394 } 395 DisplayController.refreshBayArea(); 387 396 388 397 // Generate keys … … 401 410 String privateKey = Base64.getEncoder().encodeToString(keyPair.getPrivate().getEncoded()); 402 411 403 System.out.println(message + "Creating Profile Frameset."); 412 try { 413 progressBar.UpdateMessage(message + "Creating Profile Frameset.", progress += step); 414 } catch (Exception e) { 415 e.printStackTrace(); 416 } 417 DisplayController.refreshBayArea(); 404 418 405 419 // Update in memory settings … … 470 484 } 471 485 472 System.out.println(message + "Establishing user credentials."); 486 try { 487 progressBar.UpdateMessage(message + "Establishing user credentials.", progress += step); 488 } catch (Exception e) { 489 e.printStackTrace(); 490 } 491 DisplayController.refreshBayArea(); 473 492 474 493 // Create credentials … … 489 508 FrameIO.migrateFrame(credentialsFrame, destinationFile); 490 509 491 System.out.println(message + "Creating Individual Space."); 510 MessageBay.displayMessage(message + "Creating Individual Space."); 511 DisplayController.refreshBayArea(); 492 512 493 513 // Copy private resources to personal area … … 496 516 File contactsDir = new File(personalResources.resolve("contacts").toAbsolutePath().toString()); 497 517 contactsDir.mkdir(); 498 499 System.out.println(message + "Creating Space For Dead Drops"); 518 519 try { 520 progressBar.UpdateMessage(message + "Creating Space For Dead Drops.", progress += step); 521 } catch (Exception e) { 522 e.printStackTrace(); 523 } 524 DisplayController.refreshBayArea(); 500 525 501 526 File deadDropsDir = new File(personalResources.resolve("deaddrops").toAbsolutePath().toString()); … … 505 530 AudioPathManager.activateAndScanAudioDir(); // **** 506 531 507 System.out.println(message + "Done."); 532 try { 533 progressBar.UpdateMessage(message + "Done.", progress += step); 534 } catch (Exception e) { 535 e.printStackTrace(); 536 } 537 DisplayController.refreshBayArea(); 538 508 539 } 509 540 -
trunk/src/org/expeditee/auth/account/Authenticate.java
r1303 r1314 81 81 // Update were we get our frames. 82 82 UserSettings.setupDefaultFolders(); 83 MessageBay.clear(); 83 84 MessageBay.updateFramesetLocation(); 84 85 MailBay.disconnect(); -
trunk/src/org/expeditee/gui/DisplayController.java
r1258 r1314 1375 1375 } 1376 1376 1377 /* 1378 * 1379 * Thread-safe rendering. 1380 * 1381 */ 1382 1377 public static void refreshBayArea() { 1378 // Always get the clip as it clears at the same time 1379 Clip clip = _damagedAreas.getClip(); 1380 GraphicsManager g = EcosystemManager.getGraphicsManager(); 1381 pushBayAreaUpdate(true, clip, g); 1382 } 1383 1383 1384 /** 1384 1385 * Redraws the entire window. Shouldn't be called directly, instead use … … 1441 1442 } 1442 1443 1444 pushBayAreaUpdate(useInvalidation, clip, g); 1445 1446 // Draw any separator lines 1447 g.drawLine(getMessageBaySeparatorLine(), SEPARATOR_COLOUR, SEPARATOR_STROKE); 1448 g.drawLine(getTwinFramesSeparatorLine(), SEPARATOR_COLOUR, SEPARATOR_STROKE); 1449 1450 // Paint any popups 1451 if (PopupManager.getInstance() != null) { 1452 PopupManager.getInstance().paint(); 1453 } 1454 1455 g.popDrawingSurface(); 1456 g.drawImage(_refreshBuffer, Point.ORIGIN); 1457 return true; 1458 } 1459 1460 private static void pushBayAreaUpdate(boolean useInvalidation, Clip clip, GraphicsManager g) { 1443 1461 if (!isAudienceMode()) { 1444 1462 if (!isMailMode()) { … … 1450 1468 } 1451 1469 } 1452 1453 // Draw any separator lines 1454 g.drawLine(getMessageBaySeparatorLine(), SEPARATOR_COLOUR, SEPARATOR_STROKE); 1455 g.drawLine(getTwinFramesSeparatorLine(), SEPARATOR_COLOUR, SEPARATOR_STROKE); 1456 1457 // Paint any popups 1458 if (PopupManager.getInstance() != null) { 1459 PopupManager.getInstance().paint(); 1460 } 1461 1462 g.popDrawingSurface(); 1463 g.drawImage(_refreshBuffer, Point.ORIGIN); 1464 return true; 1465 } 1466 1470 } 1471 1467 1472 private static void paintMessageBay(boolean useInvalidation, Clip clip, GraphicsManager g) { 1468 1473 Clip messageBayClip = null; -
trunk/src/org/expeditee/gui/MessageBay.java
r1304 r1314 165 165 return _messageBuffer; 166 166 } 167 168 public static void clear() { 169 MessageBay._messageCount = 0; 170 MessageBay._messages.clear(); 171 } 167 172 168 173 /** Updates the image buffer to reflect the current state of the message bay. */
Note:
See TracChangeset
for help on using the changeset viewer.