org.argouml.ui
Class ProgressMonitorWindow

java.lang.Object
  extended by org.argouml.ui.ProgressMonitorWindow
All Implemented Interfaces:
java.util.EventListener, ProgressListener, ProgressMonitor

Deprecated. in 0.29.1 This is only a helper class for save/load and will become package scope. It is not designed for reuse outside this package. TODO: Bob says: I don't like the naming of this class. Its confusing that its called ...Window and yet it is not a window. Lets rename once we have it hidden.

public class ProgressMonitorWindow
extends java.lang.Object
implements ProgressMonitor

Manages a ProgressMonitor dialog. NOTE: Users of this class should use the type of the interface ProgressMonitor wherever possible to maintain GUI independence.


Constructor Summary
ProgressMonitorWindow(java.awt.Frame parent, javax.swing.ProgressMonitor progressMonitor)
          Deprecated. initializes a ProgressMonitor
ProgressMonitorWindow(java.awt.Frame parent, java.lang.String title)
          Deprecated. initializes a ProgressMonitor
 
Method Summary
 void close()
          Deprecated. Indicate that the operation is complete.
 boolean isCanceled()
          Deprecated. Determines if the user wants to cancel the current action.
 void notifyMessage(java.lang.String title, java.lang.String introduction, java.lang.String message)
          Deprecated. If something happens the user should be notified.
 void notifyNullAction()
          Deprecated. This method notifies the GUI that the working thread determines that there are no actions that could be done for various reasons.
 void progress(ProgressEvent event)
          Deprecated. Called when a ProgressEvent is fired.
 void setMaximumProgress(int max)
          Deprecated. Determines the maximum amount of progress that can be reached.
 void updateMainTask(java.lang.String name)
          Deprecated. Updates the major task that is going on.
 void updateProgress(int progress)
          Deprecated. Informs the progress tool that the total progress was updated.
 void updateSubTask(java.lang.String action)
          Deprecated. Updates the subtask that is in progress.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressMonitorWindow

public ProgressMonitorWindow(java.awt.Frame parent,
                             java.lang.String title)
Deprecated. 
initializes a ProgressMonitor

Parameters:
parent - the Component to be set as parent
title - the (internationalized) title of the ProgressMonitor

ProgressMonitorWindow

public ProgressMonitorWindow(java.awt.Frame parent,
                             javax.swing.ProgressMonitor progressMonitor)
Deprecated. 
initializes a ProgressMonitor

Parameters:
parent - the Component to be set as parent
progressMonitor - the ProgressMonitor
Method Detail

progress

public void progress(ProgressEvent event)
Deprecated. 
Description copied from interface: ProgressListener
Called when a ProgressEvent is fired.

Specified by:
progress in interface ProgressListener
Parameters:
event - the ProgressEvent

updateProgress

public void updateProgress(int progress)
Deprecated. 
Description copied from interface: ProgressMonitor
Informs the progress tool that the total progress was updated.

Specified by:
updateProgress in interface ProgressMonitor
Parameters:
progress - the amount of progress done so far, this is the whole progress until now, not just the subtask's progress or the main task's progress

isCanceled

public boolean isCanceled()
Deprecated. 
Description copied from interface: ProgressMonitor
Determines if the user wants to cancel the current action. If this happens the current action should be stopped.

So in a long running action, you should query this periodicaly to see if the user still wants to continue or he canceled the action.

NOTE: It appears to be some kind of Java tradition to misspell the name of this method, so we follow the Swing and Eclipse tradition of spelling it with a single "L".

Specified by:
isCanceled in interface ProgressMonitor
Returns:
true if the user cancelled the action and false otherwise

close

public void close()
Deprecated. 
Description copied from interface: ProgressMonitor
Indicate that the operation is complete. This happens automatically when the value set by setProgress is >= max, but it may be called earlier if the operation ends early.

Specified by:
close in interface ProgressMonitor

notifyMessage

public void notifyMessage(java.lang.String title,
                          java.lang.String introduction,
                          java.lang.String message)
Deprecated. 
Description copied from interface: ProgressMonitor
If something happens the user should be notified.

Specified by:
notifyMessage in interface ProgressMonitor
Parameters:
title - a title for the error/information/etc
introduction - a short message that will continue with the message
message - the actual message with all the details

notifyNullAction

public void notifyNullAction()
Deprecated. 
Description copied from interface: ProgressMonitor
This method notifies the GUI that the working thread determines that there are no actions that could be done for various reasons. The GUI should notify the user too.

Specified by:
notifyNullAction in interface ProgressMonitor

setMaximumProgress

public void setMaximumProgress(int max)
Deprecated. 
Description copied from interface: ProgressMonitor
Determines the maximum amount of progress that can be reached. This should be set before the progress is updated.

Specified by:
setMaximumProgress in interface ProgressMonitor
Parameters:
max - the maximum progress value or -1 if the value is unknown

updateSubTask

public void updateSubTask(java.lang.String action)
Deprecated. 
Description copied from interface: ProgressMonitor
Updates the subtask that is in progress.

Specified by:
updateSubTask in interface ProgressMonitor
Parameters:
action - the name of the subtask

updateMainTask

public void updateMainTask(java.lang.String name)
Deprecated. 
Description copied from interface: ProgressMonitor
Updates the major task that is going on.

Specified by:
updateMainTask in interface ProgressMonitor
Parameters:
name - the new task


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook