org.knime.base.node.preproc.groupby.dialogutil
Class AggregationColumnPanel

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by org.knime.base.node.preproc.groupby.dialogutil.AggregationColumnPanel
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class AggregationColumnPanel
extends MouseAdapter

This class creates the aggregation column panel that allows the user to define the aggregation columns and their aggregation method.

Author:
Tobias Koetter, University of Konstanz

Field Summary
static Dimension PANEL_DIMENSION
          The initial dimension of this panel.
 
Constructor Summary
AggregationColumnPanel()
          Constructor for class AggregationColumnPanel.
 
Method Summary
protected  void changeAggregationMethod(String methodLabel)
          Changes the aggregation method of all selected rows to the method with the given label.
 void excludeColsChange(Collection<String> excludeCols)
           
protected  int getAggregationColumnCount()
           
 JPanel getComponentPanel()
           
 void initialize(DataTableSpec spec, List<ColumnAggregator> colAggrs)
          Initializes the panel.
 void loadSettingsFrom(NodeSettingsRO settings, DataTableSpec spec)
           
protected  void onAddAll()
          Adds all columns to the aggregation column table.
protected  void onAddIt()
          Adds all selected columns to the aggregation column table.
protected  boolean onlyNumericalSelected()
           
protected  void onRemAll()
          Removes all columns from the aggregation column table.
protected  void onRemIt()
          Removes the selected columns from the aggregation column table.
protected  boolean rowsSelected()
           
 void saveSettingsTo(NodeSettingsWO settings)
           
protected  void selectAllNoneNumericalRows()
          Selects all none numerical rows.
protected  void selectAllNumericalRows()
          Selects all numerical rows.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PANEL_DIMENSION

public static final Dimension PANEL_DIMENSION
The initial dimension of this panel.

Constructor Detail

AggregationColumnPanel

public AggregationColumnPanel()
Constructor for class AggregationColumnPanel.

Method Detail

onRemAll

protected void onRemAll()
Removes all columns from the aggregation column table.


onRemIt

protected void onRemIt()
Removes the selected columns from the aggregation column table.


onAddAll

protected void onAddAll()
Adds all columns to the aggregation column table.


onAddIt

protected void onAddIt()
Adds all selected columns to the aggregation column table.


changeAggregationMethod

protected void changeAggregationMethod(String methodLabel)
Changes the aggregation method of all selected rows to the method with the given label.

Parameters:
methodLabel - the label of the aggregation method

selectAllNumericalRows

protected void selectAllNumericalRows()
Selects all numerical rows.


selectAllNoneNumericalRows

protected void selectAllNoneNumericalRows()
Selects all none numerical rows.


rowsSelected

protected boolean rowsSelected()
Returns:
true if at least one row is selected

onlyNumericalSelected

protected boolean onlyNumericalSelected()
Returns:
true if only numerical columns are selected

getAggregationColumnCount

protected int getAggregationColumnCount()
Returns:
the number of aggregation columns

getComponentPanel

public JPanel getComponentPanel()
Returns:
the panel in which all sub-components of this component are arranged. This panel can be added to the dialog pane.

excludeColsChange

public void excludeColsChange(Collection<String> excludeCols)
Parameters:
excludeCols - the name of all columns that should be excluded from the aggregation panel

saveSettingsTo

public void saveSettingsTo(NodeSettingsWO settings)
Parameters:
settings - the settings object to write to

loadSettingsFrom

public void loadSettingsFrom(NodeSettingsRO settings,
                             DataTableSpec spec)
                      throws InvalidSettingsException
Parameters:
settings - the settings to read from
spec - initializes the component
Throws:
InvalidSettingsException - if the settings are invalid

initialize

public void initialize(DataTableSpec spec,
                       List<ColumnAggregator> colAggrs)
Initializes the panel.

Parameters:
spec - the DataTableSpec of the input table
colAggrs - the List of ColumnAggregators that are initially used


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.