Mp3dings 
20100427

de.mospace.swing
Class SimpleProgressMonitor

java.lang.Object
  extended by de.mospace.swing.SimpleProgressMonitor

public class SimpleProgressMonitor
extends Object

A simplified progress monitor. It calls "close()" whenever it is terminated. By overriding the close() method you can thus handle any form of termination (e.g. for re-enabling another window).

Version:
$Revision: 12 $ ($Date: 2007-07-27 11:48:53 +0200 (Fr, 27 Jul 2007) $)
Author:
Moritz Ringler

Constructor Summary
SimpleProgressMonitor(Frame f, String title, String note)
           
SimpleProgressMonitor(Frame f, String title, String note, int min, int max)
          Deprecated. use SimpleProgressMonitor(Frame f, String title, String note) instead
 
Method Summary
 void cancel()
          Cancels the progress monitor dialog.
 void close()
          Closes the progress monitor dialog.
 int getProgress()
          Returns the current value of the progress bar.
 boolean isCanceled()
          Returns whether the dialog has been cancelled.
 boolean isVisible()
           
 void reset(Frame f, String title, String note)
           
 void setMaximum(int max)
           
 void setMinimum(int min)
           
 void setNote(String s)
          Changes the text displayed in the dialog window.
 void setProgress(int i)
          Updates the progress bar with the indicated value.
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleProgressMonitor

public SimpleProgressMonitor(Frame f,
                             String title,
                             String note,
                             int min,
                             int max)
Deprecated. use SimpleProgressMonitor(Frame f, String title, String note) instead

Constructs a new ProgressMonitor dialog and makes it visible.

Parameters:
f - parent window
title - title of the dialog
note - initial text to display
min - integer corresponding to 0% progress
max - integer corresponding to 100% progress

SimpleProgressMonitor

public SimpleProgressMonitor(Frame f,
                             String title,
                             String note)
Method Detail

reset

public void reset(Frame f,
                  String title,
                  String note)

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

setProgress

public void setProgress(int i)
Updates the progress bar with the indicated value.

See Also:
JProgressBar.setValue(int)

getProgress

public int getProgress()
Returns the current value of the progress bar.

See Also:
JProgressBar.getValue()

setNote

public void setNote(String s)
Changes the text displayed in the dialog window.


setMaximum

public void setMaximum(int max)

setMinimum

public void setMinimum(int min)

isCanceled

public boolean isCanceled()
Returns whether the dialog has been cancelled.

See Also:
cancel()

cancel

public void cancel()
Cancels the progress monitor dialog.


close

public void close()
Closes the progress monitor dialog.


Mp3dings 
20100427