org.knime.base.node.viz.pie.datamodel
Class PieSectionDataModel

java.lang.Object
  extended by org.knime.base.node.viz.aggregation.AggregationValModel<PieSubSectionDataModel,Arc2D,Arc2D>
      extended by org.knime.base.node.viz.pie.datamodel.PieSectionDataModel
All Implemented Interfaces:
Serializable, AggregationModel<Arc2D,Arc2D>

public class PieSectionDataModel
extends AggregationValModel<PieSubSectionDataModel,Arc2D,Arc2D>

This class implements a section of a pie chart.

Author:
Tobias Koetter, University of Konstanz
See Also:
Serialized Form

Constructor Summary
PieSectionDataModel(String name, Color color, boolean supportHiliting)
          Constructor for class PieSectionDataModel.
 
Method Summary
protected  PieSubSectionDataModel createElement(Color color)
          
protected  Collection<PieSubSectionDataModel> loadElements(ConfigRO config, ExecutionMonitor exec)
          
static PieSectionDataModel loadFromFile(Config config, ExecutionMonitor exec)
           
protected  void saveElements(Collection<PieSubSectionDataModel> elements, ConfigWO config, ExecutionMonitor exec)
          
 void setPieSection(Arc2D arc, PieHiliteCalculator calculator)
           
 
Methods inherited from class org.knime.base.node.viz.aggregation.AggregationValModel
addDataRow, calculateHiliteShape, clearHilite, clone, getAggregationSum, getAggregationValue, getColor, getElement, getElements, getHiliteRowCount, getHiliteShape, getName, getNoOfElements, getRowCount, getSelectedElements, getSelectedSubElement, getShape, getValueCount, isEmpty, isHilited, isPresentable, isSelected, removeHilitedKeys, save2File, selectElement, selectElement, setColor, setHilitedKeys, setHiliteShape, setPresentable, setSelected, setShape, supportsHiliting
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieSectionDataModel

public PieSectionDataModel(String name,
                           Color color,
                           boolean supportHiliting)
Constructor for class PieSectionDataModel.

Parameters:
name - the name of this section
color - the color oft his section
supportHiliting - if hiliting should be supported
Method Detail

createElement

protected PieSubSectionDataModel createElement(Color color)

Specified by:
createElement in class AggregationValModel<PieSubSectionDataModel,Arc2D,Arc2D>
Parameters:
color - the color of the new sub element
Returns:
the new sub element with the given color

setPieSection

public void setPieSection(Arc2D arc,
                          PieHiliteCalculator calculator)
Parameters:
arc - the arc of this section
calculator - the hilite calculator

saveElements

protected void saveElements(Collection<PieSubSectionDataModel> elements,
                            ConfigWO config,
                            ExecutionMonitor exec)
                     throws CanceledExecutionException

Specified by:
saveElements in class AggregationValModel<PieSubSectionDataModel,Arc2D,Arc2D>
Parameters:
elements - the elements to save
config - the config object to use
exec - the ExecutionMonitor to provide progress information
Throws:
CanceledExecutionException - if the operation is canceled

loadElements

protected Collection<PieSubSectionDataModel> loadElements(ConfigRO config,
                                                          ExecutionMonitor exec)
                                                   throws CanceledExecutionException,
                                                          InvalidSettingsException

Specified by:
loadElements in class AggregationValModel<PieSubSectionDataModel,Arc2D,Arc2D>
Parameters:
config - the config object to use
exec - the ExecutionMonitor to provide progress information
Returns:
the elements
Throws:
CanceledExecutionException - if the operation is canceled
InvalidSettingsException - if the config object is invalid

loadFromFile

public static PieSectionDataModel loadFromFile(Config config,
                                               ExecutionMonitor exec)
                                        throws CanceledExecutionException,
                                               InvalidSettingsException
Parameters:
config - the config object to use
exec - the ExecutionMonitor to provide progress messages
Returns:
the BarDataModel
Throws:
CanceledExecutionException - if the operation is canceled
InvalidSettingsException - if the config object is invalid


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.