org.knime.core.node.port.image
Class ImagePortObjectSpec

java.lang.Object
  extended by org.knime.core.node.port.AbstractSimplePortObjectSpec
      extended by org.knime.core.node.port.image.ImagePortObjectSpec
All Implemented Interfaces:
PortObjectSpec

public final class ImagePortObjectSpec
extends AbstractSimplePortObjectSpec

Port object spec to an ImagePortObject. It only wraps the DataType of the cell that would be generated by the port objects ImagePortObject.toDataCell() method.

Author:
Thomas Gabriel, KNIME.com, Zurich, Switzerland

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObjectSpec
PortObjectSpec.PortObjectSpecSerializer<T extends PortObjectSpec>
 
Constructor Summary
ImagePortObjectSpec()
          Framework constructor - do not use. The constructor is required by the super class implementation to restort the content.
ImagePortObjectSpec(DataType type)
          Constructor to be used.
 
Method Summary
 DataType getDataType()
          Get the DataType of the cell that will be generated by the port objects ImagePortObject.toDataCell() method.
 JComponent[] getViews()
          The returned views are displayed in the out port view of the referring node.
protected  void load(ModelContentRO model)
          Loads the content into the freshly instantiated object.
protected  void save(ModelContentWO model)
          Saves this object to model content object.
 
Methods inherited from class org.knime.core.node.port.AbstractSimplePortObjectSpec
equals, getPortObjectSpecSerializer, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagePortObjectSpec

public ImagePortObjectSpec(DataType type)
Constructor to be used. Init spec with argument type.

Parameters:
type - The type of the cell (see class description for details).

ImagePortObjectSpec

public ImagePortObjectSpec()
Framework constructor - do not use. The constructor is required by the super class implementation to restort the content. Client code must not call this constructor.

Method Detail

getDataType

public DataType getDataType()
Get the DataType of the cell that will be generated by the port objects ImagePortObject.toDataCell() method.

Returns:
The type of the cell, never null.

getViews

public JComponent[] getViews()
The returned views are displayed in the out port view of the referring node. Each component is displayed in an extra tab. The name of the component is used as the title for the tab. It is important that no external members are kept in the component so it can be deleted, when the port object is deleted. If the port object has no view return an empty array.

Specified by:
getViews in interface PortObjectSpec
Overrides:
getViews in class AbstractSimplePortObjectSpec
Returns:
an array of views for the port object spec, each displayed as a tab in the out port view

load

protected void load(ModelContentRO model)
             throws InvalidSettingsException
Loads the content into the freshly instantiated object. This method is called at most once in the life time of the object (after the serializer has created a new object using the public no-arg constructor.)

Specified by:
load in class AbstractSimplePortObjectSpec
Parameters:
model - To load from.
Throws:
InvalidSettingsException - If settings are incomplete/deficient.

save

protected void save(ModelContentWO model)
Saves this object to model content object.

Specified by:
save in class AbstractSimplePortObjectSpec
Parameters:
model - To save to.


Copyright, 2003 - 2012. 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.