Package org.knime.core.node.interrupt

This package contains the necessary classes for an interruptible framework.

See:
          Description

Class Summary
InterruptControlPanel A simple control panel holding the control elements necessary to control the InterruptibleNodeModel, that is a "Run"-, "Break"- and "Finish"-Button and a slider to adjust the delay.
InterruptibleNodeModel This class provides a generic implementation of a node that can be stopped and resumed during execution.
InterruptibleNodeView This class provides a generic view for the InterruptibleNodeModel and all deriving classes, which basically consists in a control panel, with some control elements such as a "Run"-, a "Break"- and a "Finish"-Button and a slider to adjust the delay.
LayoutHelper A helper class for the use of the GridBagLayout.
 

Package org.knime.core.node.interrupt Description

This package contains the necessary classes for an interruptible framework. The InterruptibleNodeModel consists of three abstract methods:

When an InterruptibleNodeModel is executed, first the init m(DataTable[]) method is called. The model starts with paused = true. When this is set to paused = false the executeOneIteration method is called until the model is set to the paused state again. In this way the model could be run and paused arbitrary often. When the model is set to finish() the getOutput()method is called and the result is provided at the out-port and the model is executed and must be reset for a new run.
Existing models can be easily be adapted to an interruptible model, since most of all models contain a for- or while-loop. Then the content of this loop has to be put into executeOneIteration method.
A default implementation for the InterruptibleNodeView is also provided, with some default control elements always on top. These control elements are contained in the InterruptControlPanel. They are a play, break and finish and a next step button and a slider to adjust the delay how often the InterruptibleNodeView is refreshed.



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.