|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.node.defaultnodesettings.DialogComponent
org.knime.core.node.defaultnodesettings.DialogComponentColumnNameSelection
public class DialogComponentColumnNameSelection
Provides a standard component for a dialog that allows to select a column in
a given DataTableSpec. Provides label and list
(possibly filtered by a given DataCell type) as
well as functionality to load/store into a settings model.
The column name selection list will provide a RowID option if the provided
settings model object is an instance of SettingsModelColumnName which
provides the additional method useRowID to check if the
RowID was selected.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
|---|
DialogComponent.EmptySettingsModel |
| Field Summary |
|---|
| Fields inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
|---|
DEFAULT_BG, DEFAULT_FG |
| Constructor Summary | |
|---|---|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
boolean addNoneCol,
Class<? extends DataValue>... classFilter)
Constructor that puts label and combobox into the panel. |
|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
boolean addNoneCol,
ColumnFilter columnFilter)
Constructor that puts label and combobox into the panel. |
|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
Class<? extends DataValue>... classFilter)
Constructor that puts label and combobox into the panel. |
|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
ColumnFilter columnFilter)
Constructor that puts label and combobox into the panel. |
|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
Class<? extends DataValue>... classFilter)
Constructor that puts label and combobox into the panel. |
|
DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
ColumnFilter columnFilter)
Constructor that puts label and combobox into the panel. |
|
| Method Summary | |
|---|---|
protected void |
checkConfigurabilityBeforeLoad(PortObjectSpec[] specs)
Will be called before the new values are loaded from the NodeSettings object. |
String |
getSelected()
Returns the name of the currently selected item. |
DataColumnSpec |
getSelectedAsSpec()
Returns the DataColumnSpec of the currently selected item. |
protected void |
setEnabledComponents(boolean enabled)
This method is called by the above (final) DialogComponent.setEnabled(boolean)
method. |
void |
setToolTipText(String text)
Implement this so it sets the tooltip on your component(s). |
protected void |
updateComponent()
Read the value from the DialogComponent.EmptySettingsModel and set/display it in the
component. |
protected void |
validateSettingsBeforeSave()
Will be called before the value of the component is saved into the NodeSettings object. |
| Methods inherited from class org.knime.core.node.defaultnodesettings.DialogComponent |
|---|
clearError, getComponentPanel, getLastTableSpec, getLastTableSpecs, getModel, loadSettingsFrom, saveSettingsTo, setEnabled, showError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
ColumnFilter columnFilter)
DataValue classes.
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnscolumnFilter - ColumnFilter. The combo box
will allow to select only columns compatible with the
column filter. All other columns will be ignored.
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
Class<? extends DataValue>... classFilter)
DataValue classes.
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnsclassFilter - which classes are available for selection
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
Class<? extends DataValue>... classFilter)
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnsisRequired - true, if the component should throw an exception in
case of no available compatible column, false otherwise.classFilter - which classes are available for selection
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
boolean addNoneCol,
Class<? extends DataValue>... classFilter)
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnsisRequired - true, if the component should throw an exception in
case of no available compatible column, false otherwise.addNoneCol - true, if a none option should be added to the column
listclassFilter - which classes are available for selection
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
ColumnFilter columnFilter)
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnsisRequired - true, if the component should throw an exception in
case of no available compatible column, false otherwise.columnFilter - ColumnFilter. The combo box
will allow to select only columns compatible with the
column filter. All other columns will be ignored.
public DialogComponentColumnNameSelection(SettingsModelString model,
String label,
int specIndex,
boolean isRequired,
boolean addNoneCol,
ColumnFilter columnFilter)
model - the model holding the value of this component. If the model
is an instance of SettingsModelColumnName a RowID option is
added to the select list.label - label for dialog in front of checkboxspecIndex - index of (input) port listing available columnsisRequired - true, if the component should throw an exception in
case of no available compatible column, false otherwise.addNoneCol - true, if a none option should be added to the column
listcolumnFilter - ColumnFilter. The combo box
will allow to select only columns compatible with the
column filter. All other columns will be ignored.| Method Detail |
|---|
public final DataColumnSpec getSelectedAsSpec()
DataColumnSpec of the currently selected item.
This method delegates to
ColumnSelectionPanel.getSelectedColumnAsSpec().
DataColumnSpec or null
if none is selected (the list is empty) or the RowID should be used
(check return value of the useRowID method).public final String getSelected()
ColumnSelectionPanel.getSelectedColumn().
protected void updateComponent()
DialogComponent.EmptySettingsModel and set/display it in the
component. (Called after loading new values in the model to ensure they
are transfered into the component.) Implementations should set the new
value(s) in the components, should clear any possible error indications,
and should also take over the enable state.
updateComponent in class DialogComponent
protected void checkConfigurabilityBeforeLoad(PortObjectSpec[] specs)
throws NotConfigurableException
checkConfigurabilityBeforeLoad in class DialogComponentspecs - the specs from the input ports.
NotConfigurableException - if the component can't be used due to
inappropriate table specs. (Prevents the dialog from being
opened.)
protected void validateSettingsBeforeSave()
throws InvalidSettingsException
validateSettingsBeforeSave in class DialogComponentInvalidSettingsException - if the entered values are invalidprotected void setEnabledComponents(boolean enabled)
DialogComponent.setEnabled(boolean)
method. Derived classes should disable all the contained components in
here.
setEnabledComponents in class DialogComponentenabled - the new status of the componentDialogComponent.setEnabled(boolean)public void setToolTipText(String text)
setToolTipText in class DialogComponenttext - the tool tip text to set.JComponent.setToolTipText(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||