VdexReload 1.1.3 API

uk.ac.reload.dweezil.gui
Class ReloadProgressMonitor

java.lang.Object
  extended byuk.ac.reload.dweezil.gui.ReloadProgressMonitor

public class ReloadProgressMonitor
extends java.lang.Object

My Progress Monitor based on Sun's - this one doesn't have all the waiting for time millis crap and you can reset it to start over from the beginning.


Constructor Summary
ReloadProgressMonitor(java.awt.Component parentComponent, java.lang.String title, java.lang.String message, java.lang.String note, boolean indeterminate, javax.swing.Icon icon)
          Constructor - specify an initial dialog title, message, note and the indeterminate value
 
Method Summary
 void close()
          Close the dialog and clean up
 void incProgress(int inc, boolean closeOnMax)
          Increment the progress by by inc amount If closeOnmax is true the PMonitor will close when max is reached
 void init(int max)
          Reset the PMonitor to start from zero with same message and note
 void init(java.lang.String message, java.lang.String note, int max)
          Reset the PMonitor to start from zero with new message and note
 boolean isCanceled()
          Determine if the dialog's cancel button is selected or not
 void setIndeterminate(boolean indeterminate)
          Set the indeterminate value
 void setMessage(java.lang.String message)
          Set a message in the dialog
 void setNote(java.lang.String note)
          Set a note in the dialog
 void setProgress(int progress, boolean closeOnMax)
          Set the progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReloadProgressMonitor

public ReloadProgressMonitor(java.awt.Component parentComponent,
                             java.lang.String title,
                             java.lang.String message,
                             java.lang.String note,
                             boolean indeterminate,
                             javax.swing.Icon icon)
Constructor - specify an initial dialog title, message, note and the indeterminate value

Parameters:
parentComponent - the non-null parent component from which the dialog is displayed
title - the initial dialog title
message - the message to display in the dialog
note - the additional note to display in the dialog
indeterminate - the indeterminate value
icon - the icon to use for the JOptionPane
Method Detail

init

public void init(int max)
Reset the PMonitor to start from zero with same message and note

Parameters:
max - the maximum value

init

public void init(java.lang.String message,
                 java.lang.String note,
                 int max)
Reset the PMonitor to start from zero with new message and note

Parameters:
message - the new message to display in the dialog
note - the new note to display in the dialog
max - the maximum value

setProgress

public void setProgress(int progress,
                        boolean closeOnMax)
Set the progress

Parameters:
progress - the current progress value
closeOnMax - true if the dialog has to be closed when the maximum progress value is reached, false otherwise

incProgress

public void incProgress(int inc,
                        boolean closeOnMax)
Increment the progress by by inc amount If closeOnmax is true the PMonitor will close when max is reached

Parameters:
inc - the amount by which to increment the progress
closeOnMax - true if the dialog has to be closed when the maximum progress value is reached, false otherwise

setIndeterminate

public void setIndeterminate(boolean indeterminate)
Set the indeterminate value

Parameters:
indeterminate - true if the progress is indeterminate, false otherwise

close

public void close()
Close the dialog and clean up


setMessage

public void setMessage(java.lang.String message)
Set a message in the dialog

Parameters:
message - the message to be displayed in the dialog, if message is null display Empty

setNote

public void setNote(java.lang.String note)
Set a note in the dialog

Parameters:
note - the note to be displayed in the dialog, if note is null display Empty

isCanceled

public boolean isCanceled()
Determine if the dialog's cancel button is selected or not

Returns:
true if the dialog is cancelled, false otherwise

VdexReload 1.1.3 API