com.mmoui.manager.services
Interface UpdateStatusListener


public interface UpdateStatusListener

An interface through which update services can report information back to the MMOUI Manager regarding update status.

Version:
$Id: UpdateStatusListener.java 120 2009-02-16 06:57:15Z mpdelbuono $
Author:
Matthew P. Del Buono

Nested Class Summary
static class UpdateStatusListener.Status
          Status codes indicating how the GUI should display the related Updatable component.
 
Method Summary
 void setProgress(int progress)
          Sets the current progress as displayed on the progress bar.
 void setProgressBarOverride(javax.swing.JComponent object)
          Overrides the progress bar by hiding it and replacing it with the specified component.
 void setProgressBounds(int min, int max)
          Sets the bounds of progress on the displayed progress bar.
 void setStatus(java.lang.String text)
          A convenience method to set the displayed status text.
 void setStatus(java.lang.String text, UpdateStatusListener.Status status)
          Sets the displayed status of this Updatable component.
 

Method Detail

setStatus

void setStatus(java.lang.String text)
A convenience method to set the displayed status text. The status type remains the same as what it was prior to the call. (All UpdateStatusListeners default to NORMAL status if no prior calls to setStatus() have occurred).

Parameters:
text - The text to display
See Also:
setStatus(java.lang.String, com.mmoui.manager.services.UpdateStatusListener.Status)

setStatus

void setStatus(java.lang.String text,
               UpdateStatusListener.Status status)
Sets the displayed status of this Updatable component.

Parameters:
text - The text to display on the status line
status - The scheme to display indicating what type of status the process is currently in.

setProgressBarOverride

void setProgressBarOverride(javax.swing.JComponent object)
Overrides the progress bar by hiding it and replacing it with the specified component. This is a convenient way to request user input easily. This method is designed with JButton derivatives in mind.

Parameters:
object - The JComponent that will replace the progress bar, or null if the current override component should be removed and replaced with the standard progress bar

setProgress

void setProgress(int progress)
                 throws java.lang.IllegalArgumentException
Sets the current progress as displayed on the progress bar.

Parameters:
progress - The current progress, in relation to the minimum and maximum bounds that have been set.
Throws:
java.lang.IllegalArgumentException - if the progress is outside of the bounds that have been set
See Also:
setProgressBounds(int, int)

setProgressBounds

void setProgressBounds(int min,
                       int max)

Sets the bounds of progress on the displayed progress bar. If setting the bounds will cause the current progress to go out of bounds, the current progress will be set to the minimum or maximum, depending on whether the progress went below the minimum or above the maximum, respectively.

If min is equal to max, the progress bar will be put into an indeterminate state.

Parameters:
min - The minimum progress
max - The maximum progress
See Also:
setProgress(int)