com.limegroup.gnutella.update.gui
Class UpdateCallback

java.lang.Object
  extended bycom.limegroup.gnutella.update.gui.UpdateCallback

public final class UpdateCallback
extends java.lang.Object

This class handles all gui callbacks from the udpate code, displaying messages and such to the user.


Constructor Summary
UpdateCallback()
           
 
Method Summary
static void displayErrorMessage(java.lang.String error)
          Displays a message to the user indicating that the update has failed for some reason.
static void displayMessage(java.lang.String message)
          Diplays a message to the user.
static void hideProgressWindow()
          Hides the progress window and disposes of it.
static void setDownloadFile(java.lang.String text)
          Sets the text displayed in the update progress window.
static void setDownloadSize(int size)
          Sets the size of the download for calculating the percent complete.
static void showProgressWindow()
          Shows the window to the user that shows the progress of the update.
static boolean showUpdatePrompt(java.lang.String message)
          Shows the message window asking the user if they would like to update to the newer version.
static boolean showUpdatePromptWithParentFrame(java.lang.String message)
           
static void updateProgressWindow(int amountRead)
          Updates the progress window with the new amount of the file that has been read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateCallback

public UpdateCallback()
Method Detail

showUpdatePrompt

public static final boolean showUpdatePrompt(java.lang.String message)
Shows the message window asking the user if they would like to update to the newer version. Returns true if the user would like to upgrade. If the user clicks "Don't check again", changes the SettingsManager.

Parameters:
message - the message to display to the user regarding the update.
Returns:
true if the user selects the "yes" option in response to the message, false otherwise

showUpdatePromptWithParentFrame

public static final boolean showUpdatePromptWithParentFrame(java.lang.String message)

showProgressWindow

public static final void showProgressWindow()
Shows the window to the user that shows the progress of the update.


setDownloadFile

public static final void setDownloadFile(java.lang.String text)
Sets the text displayed in the update progress window.

Parameters:
text - the text to display in the progress window

setDownloadSize

public static final void setDownloadSize(int size)
Sets the size of the download for calculating the percent complete.

Parameters:
size - the size of the download in bytes

hideProgressWindow

public static final void hideProgressWindow()
Hides the progress window and disposes of it.


updateProgressWindow

public static final void updateProgressWindow(int amountRead)
Updates the progress window with the new amount of the file that has been read.

Parameters:
amountRead - the amount of the file that has been read in bytes

displayErrorMessage

public static final void displayErrorMessage(java.lang.String error)
Displays a message to the user indicating that the update has failed for some reason. The error String parameter must be of the form gerund (verb ending in 'ing') followed by the end of the sentence (including a period), as in: 'connecting to the LimeWire server.'

Parameters:
error - String beginning with a gerund and ending with a period that specifies the type of error for display to the user

displayMessage

public static final void displayMessage(java.lang.String message)
Diplays a message to the user.

Parameters:
message - the message to diplay