org.knime.base.node.viz.property.color
Class ColorManager2NodeDialogPane

java.lang.Object
  extended by org.knime.core.node.NodeDialogPane
      extended by org.knime.base.node.viz.property.color.ColorManager2NodeDialogPane
All Implemented Interfaces:
ItemListener, EventListener

final class ColorManager2NodeDialogPane
extends NodeDialogPane
implements ItemListener

Color manager dialog which shows all columns of the input data and its corresponding values inside two combo boxes divided by range and nominal ones. The color chooser can then be used to select certain colors for each value for one attribute value or range, min or max. If the attribute changes, the color settings are locally saved. During save the settings are saved by the underlying ColorHandler's ColorModel which in turn a read by the model.

Author:
Thomas Gabriel, University of Konstanz
See Also:
ColorManager2NodeModel

Constructor Summary
ColorManager2NodeDialogPane()
          Creates a new color manager dialog; all color settings are empty.
 
Method Summary
 void itemStateChanged(ItemEvent e)
           
protected  void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs)
          Updates this dialog by refreshing all components in the color tab.
protected  void saveSettingsTo(NodeSettingsWO settings)
          Method is invoked by the super class in order to force the dialog to apply its changes.
 
Methods inherited from class org.knime.core.node.NodeDialogPane
addJobMgrTab, addTab, addTabAt, createFlowVariableModel, createFlowVariableModel, createFlowVariableModel, finishEditingAndSaveSettingsTo, getAvailableFlowVariables, getPanel, getTab, getTabIndex, internalLoadSettingsFrom, loadSettingsFrom, loadSettingsFrom, onCancel, onClose, onOpen, removeTab, renameTab, saveSettingsTo, setEnabled, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorManager2NodeDialogPane

ColorManager2NodeDialogPane()
Creates a new color manager dialog; all color settings are empty.

Method Detail

loadSettingsFrom

protected void loadSettingsFrom(NodeSettingsRO settings,
                                DataTableSpec[] specs)
                         throws NotConfigurableException
Updates this dialog by refreshing all components in the color tab. Inits the column name combo box and sets the values for the default selected one.

Overrides:
loadSettingsFrom in class NodeDialogPane
Parameters:
settings - the settings to load
specs - the input table specs
Throws:
NotConfigurableException - if no column found for color selection
See Also:
NodeDialogPane.loadSettingsFrom(NodeSettingsRO, DataTableSpec[])

saveSettingsTo

protected void saveSettingsTo(NodeSettingsWO settings)
                       throws InvalidSettingsException
Method is invoked by the super class in order to force the dialog to apply its changes.

Specified by:
saveSettingsTo in class NodeDialogPane
Parameters:
settings - the object to write the settings into
Throws:
InvalidSettingsException - if either nominal or range selection could not be saved
See Also:
NodeModel.loadSettingsFrom(NodeSettingsRO)

itemStateChanged

public void itemStateChanged(ItemEvent e)
Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - the source event
See Also:
ItemListener.itemStateChanged(java.awt.event.ItemEvent)


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.