org.knime.core.node
Interface NodeProgressMonitor

All Known Implementing Classes:
DefaultNodeProgressMonitor, DefaultNodeProgressMonitor.SilentSubNodeProgressMonitor, DefaultNodeProgressMonitor.SubNodeProgressMonitor

public interface NodeProgressMonitor

Implement this interface if you want to get informed about progress change events and if you want to can ask for cancelation.

Author:
Thomas Gabriel, University of Konstanz

Method Summary
 void addProgressListener(NodeProgressListener l)
          Adds a new listener to the list of instances which are interested in receiving progress events.
 void checkCanceled()
           
 String getMessage()
          The current progress message displayed.
 Double getProgress()
          The current progress value or null if no progress available.
 void removeAllProgressListener()
          Removes all registered progress listeners.
 void removeProgressListener(NodeProgressListener l)
          Removes the given listener from the list and will therefore no longer receive progress events.
 void reset()
          Reset progress, message and cancel flag.
 void setExecuteCanceled()
          Sets the cancel requested flag.
 void setMessage(String message)
          Displays the message as given by the argument.
 void setProgress(double progress)
          Sets a new progress value.
 void setProgress(double progress, String message)
          Sets a new progress value.
 void setProgress(String message)
          Displays the message as given by the argument.
 

Method Detail

checkCanceled

void checkCanceled()
                   throws CanceledExecutionException
Throws:
CanceledExecutionException - If the execution of the NodeModel has been canceled during execute.

setProgress

void setProgress(double progress)
Sets a new progress value. If the value is not in range, the old value is kept.

Parameters:
progress - The value between 0 and 1.

getProgress

Double getProgress()
The current progress value or null if no progress available.

Returns:
Progress value between 0 and 1, or null.

setProgress

void setProgress(double progress,
                 String message)
Sets a new progress value. If the value is not in range, the old value is kept. The message is displayed.

Parameters:
progress - The value between 0 and 1.
message - A convenience message shown in the progress monitor or null.

setMessage

void setMessage(String message)
Displays the message as given by the argument.

Parameters:
message - A convenience message shown in the progress monitor.
See Also:
setProgress(String)

setProgress

void setProgress(String message)
Displays the message as given by the argument.

Parameters:
message - A convenience message shown in the progress monitor.

getMessage

String getMessage()
The current progress message displayed.

Returns:
Progress message.

setExecuteCanceled

void setExecuteCanceled()
Sets the cancel requested flag.


reset

void reset()
Reset progress, message and cancel flag.


addProgressListener

void addProgressListener(NodeProgressListener l)
Adds a new listener to the list of instances which are interested in receiving progress events.

Parameters:
l - The progress listener to add.

removeProgressListener

void removeProgressListener(NodeProgressListener l)
Removes the given listener from the list and will therefore no longer receive progress events.

Parameters:
l - The progress listener to remove.

removeAllProgressListener

void removeAllProgressListener()
Removes all registered progress listeners.



Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.