public class DBColumnAggregationFunctionPanel extends AbstractAggregationPanel<DBColumnAggregationFunctionTableModel,DBColumnAggregationFunctionRow,DataColumnSpec>
MISSING_CELL_OPTION_SIZE, PANEL_DIMENSION, SETTINGS_BUTTON_CELL_SIZE
Constructor and Description |
---|
DBColumnAggregationFunctionPanel(String key)
Constructor for class AggregationColumnPanel.
|
DBColumnAggregationFunctionPanel(String title,
String key) |
Modifier and Type | Method and Description |
---|---|
protected void |
adaptTableColumnModel(TableColumnModel columnModel)
Override this method to set specific renderer and column widths.
|
protected void |
changeAggregationMethod(String methodId)
Changes the aggregation method of all selected rows to the method
with the given label.
|
protected DBColumnAggregationFunctionRow |
createRow(DataColumnSpec colSpec) |
protected JPopupMenu |
createTablePopupMenu() |
void |
excludeColsChange(Collection<String> excludeColNames) |
protected List<DBAggregationFunction> |
getMethods4SelectedItems() |
void |
initialize(DataTableSpec spec,
List<DBColumnAggregationFunctionRow> colAggrs)
Initializes the panel.
|
void |
loadSettingsFrom(NodeSettingsRO settings,
String dbIdentifier,
DataTableSpec spec) |
(package private) int |
noOfCompatibleRows(DataType type)
Returns the number of rows that are compatible to the given type.
|
void |
saveSettingsTo(NodeSettingsWO settings) |
protected void |
selectCompatibleRows(DataType type)
Selects all rows that are compatible with the given type.
|
void |
setAggregationFunctionProvider(AggregationFunctionProvider<DBAggregationFunction> provider) |
void |
validate()
Validates the internal state of the aggregation functions.
|
addRows, appendMissingValuesEntry, createButtonComponent, createInvalidRowsSelectionMenu, createListComponent, createTableComponent, getComponentPanel, getInputTableSpec, getList, getListElements, getListModel, getMissingCellRenderer, getNoOfSelectedRows, getNoOfTableRows, getOperator, getSelectedRows, getTable, getTableModel, getTableMouseAdapter, initialize, onAddAll, onAddIt, onRemAll, onRemIt, selectAllCompatibleMethods, selectAllCompatibleRows, selectAllRows, selectAllSelectedMethods, tableRowsSelected, toggleMissingCellOption, updateSelection
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
public DBColumnAggregationFunctionPanel(String key)
key
- the unique settings keyprotected JPopupMenu createTablePopupMenu()
createTablePopupMenu
in class AbstractAggregationPanel<DBColumnAggregationFunctionTableModel,DBColumnAggregationFunctionRow,DataColumnSpec>
JPopupMenu
or null
for no popup menupublic void setAggregationFunctionProvider(AggregationFunctionProvider<DBAggregationFunction> provider)
provider
- the AggregationFunctionProvider
protected void adaptTableColumnModel(TableColumnModel columnModel)
adaptTableColumnModel
in class AbstractAggregationPanel<DBColumnAggregationFunctionTableModel,DBColumnAggregationFunctionRow,DataColumnSpec>
columnModel
- the TableColumnModel
to adaptprotected void changeAggregationMethod(String methodId)
methodId
- the label of the aggregation methodprotected void selectCompatibleRows(DataType type)
type
- the type to check for compatibilityint noOfCompatibleRows(DataType type)
type
- the type to check forpublic void excludeColsChange(Collection<String> excludeColNames)
excludeColNames
- the name of all columns that should be
excluded from the aggregation panelpublic void saveSettingsTo(NodeSettingsWO settings)
settings
- the settings object to write topublic void loadSettingsFrom(NodeSettingsRO settings, String dbIdentifier, DataTableSpec spec) throws InvalidSettingsException
settings
- the settings to read fromdbIdentifier
- the database identifierspec
- initializes the componentInvalidSettingsException
- if the settings are invalidpublic void validate() throws InvalidSettingsException
validate
in class AbstractAggregationPanel<DBColumnAggregationFunctionTableModel,DBColumnAggregationFunctionRow,DataColumnSpec>
InvalidSettingsException
- if the internal state of a function is invalidpublic void initialize(DataTableSpec spec, List<DBColumnAggregationFunctionRow> colAggrs)
spec
- the DataTableSpec
of the input tablecolAggrs
- the List
of ColumnAggregator
s that are
initially usedprotected List<DBAggregationFunction> getMethods4SelectedItems()
protected DBColumnAggregationFunctionRow createRow(DataColumnSpec colSpec)
createRow
in class AbstractAggregationPanel<DBColumnAggregationFunctionTableModel,DBColumnAggregationFunctionRow,DataColumnSpec>
colSpec
- the list element to create the AggregationFunctionRow
forAggregationFunctionRow
class
KNIME GmbH, Konstanz, Germany
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.