Search in sources :

Example 6 with DialogNodeValue

use of org.knime.core.node.dialog.DialogNodeValue in project knime-core by knime.

the class SubNodeContainer method performSaveModelSettingsTo.

/**
 * {@inheritDoc}
 */
@Override
@SuppressWarnings("rawtypes")
void performSaveModelSettingsTo(final NodeSettings modelSettings) {
    Map<NodeID, DialogNode> nodes = m_wfm.findNodes(DialogNode.class, false);
    for (Map.Entry<NodeID, DialogNode> entry : nodes.entrySet()) {
        final DialogNode dialogNode = entry.getValue();
        final String parameterName = getDialogNodeParameterName(dialogNode, entry.getKey());
        final DialogNodeValue dialogValue = dialogNode.getDialogValue();
        if (dialogValue != null) {
            NodeSettingsWO subSettings = modelSettings.addNodeSettings(parameterName);
            dialogValue.saveToNodeSettings(subSettings);
        }
    }
}
Also used : NodeSettingsWO(org.knime.core.node.NodeSettingsWO) DialogNode(org.knime.core.node.dialog.DialogNode) MetaNodeDialogNode(org.knime.core.node.dialog.MetaNodeDialogNode) DialogNodeValue(org.knime.core.node.dialog.DialogNodeValue) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

Map (java.util.Map)6 DialogNode (org.knime.core.node.dialog.DialogNode)6 DialogNodeValue (org.knime.core.node.dialog.DialogNodeValue)6 MetaNodeDialogNode (org.knime.core.node.dialog.MetaNodeDialogNode)6 InvalidSettingsException (org.knime.core.node.InvalidSettingsException)4 HashMap (java.util.HashMap)3 LinkedHashMap (java.util.LinkedHashMap)3 NodeSettingsRO (org.knime.core.node.NodeSettingsRO)3 DialogNodePanel (org.knime.core.node.dialog.DialogNodePanel)3 QuickFormInputNode (org.knime.core.quickform.in.QuickFormInputNode)3 NodeSettingsWO (org.knime.core.node.NodeSettingsWO)2 AbstractQuickFormConfiguration (org.knime.core.quickform.AbstractQuickFormConfiguration)2 AbstractQuickFormValueInConfiguration (org.knime.core.quickform.AbstractQuickFormValueInConfiguration)2 QuickFormConfigurationPanel (org.knime.core.quickform.QuickFormConfigurationPanel)2 BorderLayout (java.awt.BorderLayout)1 FlowLayout (java.awt.FlowLayout)1 ArrayList (java.util.ArrayList)1 BoxLayout (javax.swing.BoxLayout)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1