org.knime.base.node.viz.pie.datamodel.interactive
Class InteractivePieDataModel
java.lang.Object
org.knime.base.node.viz.pie.datamodel.PieDataModel
org.knime.base.node.viz.pie.datamodel.interactive.InteractivePieDataModel
- All Implemented Interfaces:
- Iterable<DataRow>
public class InteractivePieDataModel
- extends PieDataModel
- implements Iterable<DataRow>
This is the interactive implementation of the PieDataModel
which
allows hiliting and column changing.
- Author:
- Tobias Koetter, University of Konstanz
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InteractivePieDataModel
public InteractivePieDataModel(ExecutionMonitor exec,
DataTable table,
int noOfRows,
boolean detailsAvailable)
throws CanceledExecutionException
- Constructor for class InteractivePieDataModel.
- Parameters:
exec
- the ExecutionMonitor
table
- the data tablenoOfRows
- the optional number of rows to initialize the row arraydetailsAvailable
- true
if details are available
- Throws:
CanceledExecutionException
- if the progress was canceled
save2File
public void save2File(File dataDir,
ExecutionMonitor exec)
throws IOException,
CanceledExecutionException
- Parameters:
dataDir
- the data directory to write toexec
- the ExecutionMonitor
- Throws:
IOException
- if the output file could not be created
CanceledExecutionException
- if the saving was canceled
loadFromFile
public static InteractivePieDataModel loadFromFile(File dataDir,
ExecutionMonitor exec)
throws IOException,
InvalidSettingsException,
CanceledExecutionException
- Parameters:
dataDir
- the data directory to read fromexec
- ExecutionMonitor
- Returns:
- the
InteractivePieDataModel
- Throws:
IOException
- if the file could not be read
InvalidSettingsException
- if a setting wasn't present
CanceledExecutionException
- if the operation was canceled
getDataRows
public Iterator<DataRow> getDataRows()
- Returns:
- all data rows
iterator
public Iterator<DataRow> iterator()
-
- Specified by:
iterator
in interface Iterable<DataRow>
getDataTableSpec
public DataTableSpec getDataTableSpec()
- Returns:
- the
DataTableSpec
getColSpec
public DataColumnSpec getColSpec(String colName)
- Parameters:
colName
- the column name to get the spec for
- Returns:
- the
DataColumnSpec
or null
if the name is
not in the spec
getColIndex
public int getColIndex(String colName)
- Parameters:
colName
- the column name to get the index for
- Returns:
- the index of the given column name
getRowColor
public Color getRowColor(DataRow row)
- Parameters:
row
- the row to get the color for
- Returns:
- the color of this row
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.