org.knime.base.node.viz.histogram.datamodel
Class InteractiveHistogramDataModel

java.lang.Object
  extended by org.knime.base.node.viz.histogram.datamodel.InteractiveHistogramDataModel
All Implemented Interfaces:
Iterable<DataRow>

public class InteractiveHistogramDataModel
extends Object
implements Iterable<DataRow>

This data model holds all information (DataRows, DataTableSpec) to provide the flexibility.

Author:
Tobias Koetter, University of Konstanz

Constructor Summary
InteractiveHistogramDataModel(DataArray array, List<Color> rowColors)
          Constructor for class InteractiveHistogramDataModel.
 
Method Summary
 DataColumnSpec getColumnSpec(int idx)
           
 List<DataRow> getDataRows()
           
 List<Color> getRowColors()
           
 Iterator<DataRow> iterator()
          
static InteractiveHistogramDataModel loadFromFile(File dataDir, ExecutionMonitor exec)
           
 void save2File(File dataDir, ExecutionMonitor exec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveHistogramDataModel

public InteractiveHistogramDataModel(DataArray array,
                                     List<Color> rowColors)
Constructor for class InteractiveHistogramDataModel.

Parameters:
array - the data array
rowColors - the row colors
Method Detail

save2File

public void save2File(File dataDir,
                      ExecutionMonitor exec)
               throws IOException,
                      CanceledExecutionException
Parameters:
dataDir - the data directory to write to
exec - the ExecutionMonitor
Throws:
IOException - if the file can't be created
CanceledExecutionException - if the process was canceled

loadFromFile

public static InteractiveHistogramDataModel loadFromFile(File dataDir,
                                                         ExecutionMonitor exec)
                                                  throws IOException,
                                                         InvalidSettingsException,
                                                         CanceledExecutionException
Parameters:
dataDir - the data directory to read from
exec - the ExecutionMonitor
Returns:
the InteractiveHistogramDataModel
Throws:
IOException - if the file is invalid
InvalidSettingsException - if a setting is invalid
CanceledExecutionException - if the process was canceled

getRowColors

public List<Color> getRowColors()
Returns:
the rowColors

getColumnSpec

public DataColumnSpec getColumnSpec(int idx)
Parameters:
idx - the index of the column
Returns:
the DataColumnSpec of the column with the given index

getDataRows

public List<DataRow> getDataRows()
Returns:
the data rows to display

iterator

public Iterator<DataRow> iterator()

Specified by:
iterator in interface Iterable<DataRow>


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.