use of org.knime.core.node.NodeDialogPane in project knime-core by knime.
the class WorkflowManager method getDialogPaneWithSettings.
/**
* {@inheritDoc}
*/
@Override
NodeDialogPane getDialogPaneWithSettings(final PortObjectSpec[] inSpecs, final PortObject[] inData) throws NotConfigurableException {
NodeDialogPane dialogPane = getDialogPane();
// find all quickform input nodes and update meta dialog
Map<NodeID, MetaNodeDialogNode> nodes = findNodes(MetaNodeDialogNode.class, false);
((MetaNodeDialogPane) dialogPane).setQuickformNodes(nodes);
NodeSettings settings = getNodeSettings();
Node.invokeDialogInternalLoad(dialogPane, settings, inSpecs, inData, new FlowObjectStack(getID()), new CredentialsProvider(this, m_credentialsStore), getDirectNCParent().isWriteProtected());
return dialogPane;
}
use of org.knime.core.node.NodeDialogPane in project knime-core by knime.
the class SubNodeContainer method getDialogPaneWithSettings.
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("rawtypes")
NodeDialogPane getDialogPaneWithSettings(final PortObjectSpec[] inSpecs, final PortObject[] inData) throws NotConfigurableException {
NodeDialogPane dialogPane = getDialogPane();
// find all dialog nodes and update subnode dialog
Map<NodeID, MetaNodeDialogNode> nodes = m_wfm.findNodes(MetaNodeDialogNode.class, new NodeModelFilter<MetaNodeDialogNode>() {
@Override
public boolean include(final MetaNodeDialogNode nodeModel) {
return nodeModel instanceof DialogNode && !((DialogNode) nodeModel).isHideInDialog();
}
}, false);
((MetaNodeDialogPane) dialogPane).setQuickformNodes(nodes);
NodeSettings settings = new NodeSettings("subnode_settings");
saveSettings(settings);
// remove the flow variable port from the specs and data
PortObjectSpec[] correctedInSpecs = ArrayUtils.remove(inSpecs, 0);
PortObject[] correctedInData = ArrayUtils.remove(inData, 0);
// the next call will call dialogPane.internalLoadSettingsFrom()
// dialogPane is a MetaNodeDialogPane and does not handle the flow variable port correctly
// this is why we remove it first
Node.invokeDialogInternalLoad(dialogPane, settings, correctedInSpecs, correctedInData, getFlowObjectStack(), new CredentialsProvider(this, m_wfm.getCredentialsStore()), getParent().isWriteProtected());
return dialogPane;
}
Aggregations