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

java.lang.Object
  extended by org.knime.base.node.viz.histogram.datamodel.AbstractHistogramVizModel
      extended by org.knime.base.node.viz.histogram.datamodel.InteractiveHistogramVizModel

public class InteractiveHistogramVizModel
extends AbstractHistogramVizModel

Extends the AbstractHistogramVizModel to allow hiliting and column changing.

Author:
Tobias Koetter, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.knime.base.node.viz.histogram.datamodel.AbstractHistogramVizModel
AbstractHistogramVizModel.HistogramHiliteCalculator
 
Field Summary
 
Fields inherited from class org.knime.base.node.viz.histogram.datamodel.AbstractHistogramVizModel
BAR_SURROUNDING_SPACE, BIN_SURROUNDING_SPACE, DEFAULT_NO_OF_BINS, HILITE_RECT_WIDTH_FACTOR, INTERVAL_DIGITS, MIN_BIN_WIDTH, MINIMUM_BAR_HEIGHT, MINIMUM_ELEMENT_WIDTH, MISSING_VAL_BAR_CAPTION, SPACE_BETWEEN_BARS, SPACE_BETWEEN_BINS, SPACE_BETWEEN_ELEMENTS
 
Constructor Summary
InteractiveHistogramVizModel(List<Color> rowColors, AggregationMethod aggrMethod, HistogramLayout layout, DataTableSpec spec, List<DataRow> rows, DataColumnSpec xColSpec, Collection<ColorColumn> aggrColumns, int noOfBins)
          Constructor for class InteractiveHistogramVizModel.
 
Method Summary
 Collection<ColorColumn> getAggrColumns()
          
 Set<RowKey> getHilitedKeys()
          
 Set<RowKey> getSelectedKeys()
          
 DataTableSpec getTableSpec()
           
 String getXColumnName()
          
 DataColumnSpec getXColumnSpec()
          
 boolean setAggregationColumns(Collection<ColorColumn> aggrCols)
           
 boolean setNoOfBins(int noOfBins)
          
 boolean setXColumn(DataColumnSpec xColSpec)
           
 boolean supportsHiliting()
          
 void unHiliteAll()
          Unhilites all rows.
 void updateHiliteInfo(Set<RowKey> hilited, boolean hilite)
          This method un/hilites all rows with the given key.
 
Methods inherited from class org.knime.base.node.viz.histogram.datamodel.AbstractHistogramVizModel
calculateSurroundingRectangle, clearSelection, containsEmptyBins, containsMissingValueBin, containsNotPresentableBin, getAggregationMethod, getBin, getBin, getBinCaptions, getBins, getBinWidth, getDisplayedNoOfBins, getDrawingSpace, getHiliteCalculator, getHistogramLayout, getHTMLDetailData, getLabelDisplayPolicy, getMaxAggregationValue, getMaxBinWidth, getMaxNoOfBins, getMinAggregationValue, getMissingValueBin, getNoOfBins, getNoOfElements, getRowColors, getSelectedBins, getSelectedElement, isBinNominal, isShowBarOutline, isShowBinOutline, isShowElementOutline, isShowEmptyBins, isShowGridLines, isShowLabelVertical, isShowMissingValBin, selectElement, selectElement, setAggregationMethod, setBinNominal, setBins, setBinWidth, setDrawingSpace, setHistogramLayout, setLabelDisplayPolicy, setShowBarOutline, setShowBinOutline, setShowElementOutline, setShowEmptyBins, setShowGridLines, setShowLabelVertical, setShowMissingValBin, updateNoOfBins
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveHistogramVizModel

public InteractiveHistogramVizModel(List<Color> rowColors,
                                    AggregationMethod aggrMethod,
                                    HistogramLayout layout,
                                    DataTableSpec spec,
                                    List<DataRow> rows,
                                    DataColumnSpec xColSpec,
                                    Collection<ColorColumn> aggrColumns,
                                    int noOfBins)
Constructor for class InteractiveHistogramVizModel.

Parameters:
rowColors - all possible colors the user has defined for a row
aggrMethod - the AggregationMethod to use
layout - HistogramLayout to use
spec - the DataTableSpec
rows - the DataRow
xColSpec - the DataColumnSpec of the selected x column
aggrColumns - the selected aggregation columns
noOfBins - the number of bins to create
Method Detail

setNoOfBins

public boolean setNoOfBins(int noOfBins)

Overrides:
setNoOfBins in class AbstractHistogramVizModel
Parameters:
noOfBins - the new number of bins to create
Returns:
true if the number of bins has changed

setXColumn

public boolean setXColumn(DataColumnSpec xColSpec)
Parameters:
xColSpec - the new x column specification
Returns:
true if the variable has changed

setAggregationColumns

public boolean setAggregationColumns(Collection<ColorColumn> aggrCols)
Parameters:
aggrCols - the new aggregation columns
Returns:
true if the variable has changed

getXColumnName

public String getXColumnName()

Specified by:
getXColumnName in class AbstractHistogramVizModel
Returns:
the x column name

getXColumnSpec

public DataColumnSpec getXColumnSpec()

Specified by:
getXColumnSpec in class AbstractHistogramVizModel
Returns:
the x column specification

getAggrColumns

public Collection<ColorColumn> getAggrColumns()

Specified by:
getAggrColumns in class AbstractHistogramVizModel
Returns:
the aggregation columns. Could be null!

supportsHiliting

public boolean supportsHiliting()

Specified by:
supportsHiliting in class AbstractHistogramVizModel
Returns:
true if the bins support hiliting otherwise false

getTableSpec

public DataTableSpec getTableSpec()
Returns:
the DataTableSpec of the table on which this histogram based on

getHilitedKeys

public Set<RowKey> getHilitedKeys()

Specified by:
getHilitedKeys in class AbstractHistogramVizModel
Returns:
all keys of hilited rows

getSelectedKeys

public Set<RowKey> getSelectedKeys()

Specified by:
getSelectedKeys in class AbstractHistogramVizModel
Returns:
all keys of the selected elements

updateHiliteInfo

public void updateHiliteInfo(Set<RowKey> hilited,
                             boolean hilite)
This method un/hilites all rows with the given key.

Specified by:
updateHiliteInfo in class AbstractHistogramVizModel
Parameters:
hilited - the rowKeys of the rows to un/hilite
hilite - if the given keys should be hilited true or unhilited false

unHiliteAll

public void unHiliteAll()
Unhilites all rows.

Specified by:
unHiliteAll in class AbstractHistogramVizModel


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.