org.knime.core.node
Class ExternalApplicationNodeView<T extends NodeModel>

java.lang.Object
  extended by org.knime.core.node.AbstractNodeView<T>
      extended by org.knime.core.node.ExternalApplicationNodeView<T>
Type Parameters:
T - The node model class.

public abstract class ExternalApplicationNodeView<T extends NodeModel>
extends AbstractNodeView<T>

Node view which opens an external application. Opening, closing and updating the application is task of derived view classes.

Author:
Bernd Wiswedel, University of Konstanz

Constructor Summary
protected ExternalApplicationNodeView(T model)
          Creates the view instance but does not open the external application yet.
 
Method Summary
(package private)  void callCloseView()
          Called from AbstractNodeView.closeView() to close the view and release all allocated resources.
(package private)  void callOpenView(String title)
          Direct(!) subclasses override this method and open the view or frame.
 void closeView()
          To be called by client code when the external view is closed.
protected abstract  void onClose()
          Close the view.
protected abstract  void onOpen(String title)
          Open the external application.
 
Methods inherited from class org.knime.core.node.AbstractNodeView
callModelChanged, getLogger, getNodeModel, getViewName, modelChanged, openView, updateModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalApplicationNodeView

protected ExternalApplicationNodeView(T model)
Creates the view instance but does not open the external application yet.

Parameters:
model - The node model assigned to the view, must not be null.
Method Detail

callCloseView

void callCloseView()
Called from AbstractNodeView.closeView() to close the view and release all allocated resources. The view will not be opened again.

Specified by:
callCloseView in class AbstractNodeView<T extends NodeModel>

callOpenView

void callOpenView(String title)
Direct(!) subclasses override this method and open the view or frame. This method is called from AbstractNodeView.openView(String) and is called at most once.

Specified by:
callOpenView in class AbstractNodeView<T extends NodeModel>
Parameters:
title - the default title of the view. It should be shown in the view title bar (if at all possible).

closeView

public final void closeView()
To be called by client code when the external view is closed. This will initiate the usual closing procedure, i.e. unregistering this view from its model and also calling onClose(). Closes the view and disposes all allocated resources. The view is not meant to be opened again. This method is the counterpart to AbstractNodeView.openView(String). (Core) Sub-classes may widen the scope of this method.

Overrides:
closeView in class AbstractNodeView<T extends NodeModel>

onOpen

protected abstract void onOpen(String title)
Open the external application.

Parameters:
title - The desired title of the application, possibly ignored.

onClose

protected abstract void onClose()
Close the view. This method is called when the node is deleted or closeView() is called. This method should not be used if the external application initiates the close operation. Clients should call closeView() instead.



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.