edu.stanford.smi.protegex.owl.model.impl
Class NoopProgressManager

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.model.impl.NoopProgressManager
All Implemented Interfaces:
ProgressManager

public class NoopProgressManager
extends Object
implements ProgressManager

An "empty" implementation of ProgressManager. This is the default choice if the API is used stand-alone.

Author:
Holger Knublauch

Constructor Summary
NoopProgressManager()
           
 
Method Summary
 void begin(String title, boolean canBeCancelled)
          Notifies the manager that a new modal process is about to start.
 void end()
          Notifies the manager that the recently started process has ended.
 boolean isCancelled()
          Checks if the user has cancelled the current process.
 void setIcon(Class iconBaseClass, String iconName)
          Specifies an (optional) icon that can be displayed alongside with the status text.
 void setProgress(double progress)
          Sets an (optional) value for progress bars.
 void setText(String text)
          Changes the status text that is being displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoopProgressManager

public NoopProgressManager()
Method Detail

begin

public void begin(String title,
                  boolean canBeCancelled)
Description copied from interface: ProgressManager
Notifies the manager that a new modal process is about to start. Calling this method is only valid if no other process is currently managed by this instance.

Specified by:
begin in interface ProgressManager
Parameters:
title - an (optional) title that could be displayed in a dialog etc.

end

public void end()
Description copied from interface: ProgressManager
Notifies the manager that the recently started process has ended. This method must always be called after a process was terminated so that the manager can close windows, etc.

Specified by:
end in interface ProgressManager

isCancelled

public boolean isCancelled()
Description copied from interface: ProgressManager
Checks if the user has cancelled the current process. The process can call this method occasionally to interrupt itself, and then invoke endProcess()
Specified by:
isCancelled in interface ProgressManager
Returns:
true if the user wants to cancel

setProgress

public void setProgress(double progress)
Description copied from interface: ProgressManager
Sets an (optional) value for progress bars. The caller typically makes sure that the values increase continuously from 0 to 1

Specified by:
setProgress in interface ProgressManager
Parameters:
progress - the progress value between 0 and 1

setIcon

public void setIcon(Class iconBaseClass,
                    String iconName)
Description copied from interface: ProgressManager
Specifies an (optional) icon that can be displayed alongside with the status text.

Specified by:
setIcon in interface ProgressManager
Parameters:
iconBaseClass - the Class that the icon is relative to
iconName - the file name relative to the base class

setText

public void setText(String text)
Description copied from interface: ProgressManager
Changes the status text that is being displayed.

Specified by:
setText in interface ProgressManager
Parameters:
text - the new text