Package freenet.client.messages

Examples of freenet.client.messages.Message


  public void closeConnection() {
    timer.cancel();
    // If it wasn't cancelled, then we show a message about pushing cancelled. It makes sure that this message shows only once
    if (cancelled == false) {
      if (FreenetJs.isPushingCancelledExpected == false) {
        MessageManager.get().addMessage(new Message(L10n.get("pushingCancelled"), Priority.ERROR, null, true));
      }
      cancelled = true;
    }
  }
View Full Code Here


  public ImageElementUpdater() {
    int[] counted = countImageProgress();
    lastCounted = counted;
    if (counted[1] != 0) {
      // Only show the messages if image loading is in progress
      Message newMsg = makeProgressMsg(counted[0], counted[1]);
      MessageManager.get().addMessage(newMsg);
      lastMessage = newMsg;
    }
  }
View Full Code Here

      nowCounted[1] = lastCounted[1] - previousFetched[1] + counted[1];
      // Update the overall progress
      lastCounted = nowCounted;
      // Replace the message, if not complete yet
      if (nowCounted[1] != 0) {
        Message newMsg = makeProgressMsg(nowCounted[0], nowCounted[1]);
        if (lastMessage != null) {
          MessageManager.get().replaceMessageAtPosition(MessageManager.get().getMessagePosition(lastMessage), newMsg);
        } else {
          MessageManager.get().addMessage(newMsg);
        }
View Full Code Here

   * @param total
   *            - The number of the total blocks
   * @return The message to be shown in the messages panel
   */
  private Message makeProgressMsg(int fetched, int total) {
    return new Message(L10n.get("imageprogress") + fetched + "/" + total, Priority.MINOR, null,true);
  }
View Full Code Here

TOP

Related Classes of freenet.client.messages.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.