Package org.knime.core.ui.node.workflow
Interface NodeContainerUI
- All Superinterfaces:
EventListener,org.knime.core.node.workflow.NodeContainerStateObservable,org.knime.core.node.workflow.NodeProgressListener,UI
- All Known Subinterfaces:
AsyncNodeContainerUI,AsyncWorkflowManagerUI,LazyWorkflowManagerUI,NativeNodeContainerUI,SingleNodeContainerUI,SubNodeContainerUI,WorkflowManagerUI
- All Known Implementing Classes:
NativeNodeContainerWrapper,NodeContainerWrapper,SingleNodeContainerWrapper,SubNodeContainerWrapper,WorkflowManagerWrapper
public interface NodeContainerUI
extends org.knime.core.node.workflow.NodeProgressListener, org.knime.core.node.workflow.NodeContainerStateObservable, UI
UI-interface that mirrors the
NodeContainer.- Author:
- Martin Horn, KNIME.com
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddNodeMessageListener(org.knime.core.node.workflow.NodeMessageListener listener) booleanaddNodePropertyChangedListener(org.knime.core.node.workflow.NodePropertyChangedListener l) booleanaddNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) booleanaddProgressListener(org.knime.core.node.workflow.NodeProgressListener listener) voidaddUIInformationListener(org.knime.core.node.workflow.NodeUIInformationListener l) org.knime.core.node.NodeSettingsTake settings from the node's dialog and apply them to the model.booleanbooleanbooleanCurrently called by nodes having data aware dialogs in order to test whether upstream nodes are correctly wired and can be executed.voidchangeNodeLocks(boolean setLock, org.knime.core.node.workflow.NodeContainer.NodeLock... locks) Changes the nodes lock status for various actions, i.e.voidclears the list of waiting loops.To be called from rpc clients - not needed for local, for remote, picks an endpoint and forwards ui data request to be transported to remote node model and collects the response in `out`.org.knime.core.node.workflow.NodeExecutionJobManagerFor reporting backward compatibility.org.knime.core.node.NodeDialogPaneReturn a NodeDialogPane for a node which can be embedded into a JFrame oder another GUI element.getIcon()default InputStreamorg.knime.core.node.workflow.NodeIDgetID()getInPort(int index) Returns the name of the interactive view if such a view exists.Get the 'interactive web views' provided by this node.org.knime.core.node.workflow.NodeExecutionJobManagergetName()org.knime.core.node.workflow.NodeAnnotationorg.knime.core.node.workflow.NodeContainerStateorg.knime.core.node.workflow.NodeContainer.NodeLocksReturns the node's lock status, i.e.org.knime.core.node.workflow.NodeMessageGet the message to be displayed to the user.org.knime.core.node.config.base.ConfigBaseROgetNodeViewName(int i) intintReturns the number of views provided by the node implementation.intintgetOutPort(int index) org.knime.core.node.NodeFactory.NodeTypegetType()org.knime.core.node.workflow.NodeUIInformationReturns the UI information.getViewName(int i) booleanWhether the dialog is aDataAwareNodeDialogPane.booleanbooleanbooleanCalled for nodes having data aware dialogs in order to check whether to prompt for execution or not.booleanbooleanisDirty()booleanremoveNodeMessageListener(org.knime.core.node.workflow.NodeMessageListener listener) booleanremoveNodeProgressListener(org.knime.core.node.workflow.NodeProgressListener listener) booleanremoveNodePropertyChangedListener(org.knime.core.node.workflow.NodePropertyChangedListener l) booleanremoveNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) voidremoveUIInformationListener(org.knime.core.node.workflow.NodeUIInformationListener l) voidsetCustomDescription(String customDescription) voidsetDeletable(boolean value) voidsetDirty()Mark this node container to be changed, that is, it needs to be saved.voidsetNodeMessage(org.knime.core.node.workflow.NodeMessage newMessage) voidsetUIInformation(org.knime.core.node.workflow.NodeUIInformation uiInformation) Used, e.g., when nodes are moved.voidsetUIInformationForCorrection(org.knime.core.node.workflow.NodeUIInformation uiInfo) Updates the node's UI information only in order to correct it's bounding box and position.toString()Methods inherited from interface org.knime.core.node.workflow.NodeProgressListener
progressChanged
-
Method Details
-
getParent
WorkflowManagerUI getParent()- Returns:
- parent workflowmanager holding this node (or null if root).
-
getJobManager
org.knime.core.node.workflow.NodeExecutionJobManager getJobManager()- Returns:
- The job manager associated with this node or null if this node will use the job manager of the parent (or the parent of ...)
- See Also:
-
findJobManager
org.knime.core.node.workflow.NodeExecutionJobManager findJobManager()- Returns:
- NodeExecutionJobManager responsible for this node and all its children.
-
addNodePropertyChangedListener
boolean addNodePropertyChangedListener(org.knime.core.node.workflow.NodePropertyChangedListener l) -
removeNodePropertyChangedListener
boolean removeNodePropertyChangedListener(org.knime.core.node.workflow.NodePropertyChangedListener l) -
clearWaitingLoopList
void clearWaitingLoopList()clears the list of waiting loops. -
addProgressListener
boolean addProgressListener(org.knime.core.node.workflow.NodeProgressListener listener) - Parameters:
listener- listener to the node progress- Returns:
- true if the listener was not already registered before, false otherwise
-
removeNodeProgressListener
boolean removeNodeProgressListener(org.knime.core.node.workflow.NodeProgressListener listener) - Parameters:
listener- existing listener to the node progress- Returns:
- true if the listener was successfully removed, false if it was not registered
-
addNodeMessageListener
boolean addNodeMessageListener(org.knime.core.node.workflow.NodeMessageListener listener) - Parameters:
listener- listener to the node messages (warnings and errors)- Returns:
- true if the listener was not already registered, false otherwise
-
removeNodeMessageListener
boolean removeNodeMessageListener(org.knime.core.node.workflow.NodeMessageListener listener) - Parameters:
listener- listener to the node messages- Returns:
- true if the listener was successfully removed, false if it was not registered
-
getNodeMessage
org.knime.core.node.workflow.NodeMessage getNodeMessage()Get the message to be displayed to the user.- Returns:
- the node message consisting of type and message, never null.
-
setNodeMessage
void setNodeMessage(org.knime.core.node.workflow.NodeMessage newMessage) - Parameters:
newMessage- the nodeMessage to set
-
addUIInformationListener
void addUIInformationListener(org.knime.core.node.workflow.NodeUIInformationListener l) -
removeUIInformationListener
void removeUIInformationListener(org.knime.core.node.workflow.NodeUIInformationListener l) -
getUIInformation
org.knime.core.node.workflow.NodeUIInformation getUIInformation()Returns the UI information.- Returns:
- a the node information
-
setUIInformation
void setUIInformation(org.knime.core.node.workflow.NodeUIInformation uiInformation) Used, e.g., when nodes are moved.- Parameters:
uiInformation- new user interface information of the node such as coordinates on workbench.
-
setUIInformationForCorrection
void setUIInformationForCorrection(org.knime.core.node.workflow.NodeUIInformation uiInfo) Updates the node's UI information only in order to correct it's bounding box and position. In that case there is no need, e.g., to send the info to the server.- Parameters:
uiInfo-
-
addNodeStateChangeListener
boolean addNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) - Specified by:
addNodeStateChangeListenerin interfaceorg.knime.core.node.workflow.NodeContainerStateObservable
-
removeNodeStateChangeListener
boolean removeNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) - Specified by:
removeNodeStateChangeListenerin interfaceorg.knime.core.node.workflow.NodeContainerStateObservable
-
getNodeContainerState
org.knime.core.node.workflow.NodeContainerState getNodeContainerState()- Specified by:
getNodeContainerStatein interfaceorg.knime.core.node.workflow.NodeContainerStateObservable- Since:
- 2.8
-
hasDataAwareDialogPane
boolean hasDataAwareDialogPane()Whether the dialog is aDataAwareNodeDialogPane. If so, the predecessor nodes need to be executed before the dialog is opened.- Returns:
- that property
- Since:
- 2.6
-
getDialogPaneWithSettings
org.knime.core.node.NodeDialogPane getDialogPaneWithSettings() throws org.knime.core.node.NotConfigurableExceptionReturn a NodeDialogPane for a node which can be embedded into a JFrame oder another GUI element.- Returns:
- A dialog pane for the corresponding node.
- Throws:
org.knime.core.node.NotConfigurableException- if node cannot be configured
-
isAllInputDataAvailable
boolean isAllInputDataAvailable()Called for nodes having data aware dialogs in order to check whether to prompt for execution or not.- Returns:
- true if correctly connected and all inputs have data.
- Since:
- 2.8
- See Also:
-
WorkflowManager.isAllInputDataAvailableToNode(NodeID)
-
canExecuteUpToHere
boolean canExecuteUpToHere()Currently called by nodes having data aware dialogs in order to test whether upstream nodes are correctly wired and can be executed. It only tests if the direct predecessors are connected -- in the longer term it will check if all predecessors are correctly set up and at least one is executable.- Returns:
- true if all non-optional ports are connected.
- Since:
- 2.8
-
applySettingsFromDialog
org.knime.core.node.NodeSettings applySettingsFromDialog() throws org.knime.core.node.InvalidSettingsExceptionTake settings from the node's dialog and apply them to the model. Throws an exception if the apply fails.- Returns:
- the settings
- Throws:
org.knime.core.node.InvalidSettingsException- if settings are not applicable.
-
areDialogSettingsValid
boolean areDialogSettingsValid() -
hasDialog
boolean hasDialog() -
areDialogAndNodeSettingsEqual
boolean areDialogAndNodeSettingsEqual() -
getNrInPorts
int getNrInPorts() -
getInPort
-
getOutPort
-
getNrOutPorts
int getNrOutPorts() -
getNrViews
int getNrViews() -
getNodeSettings
org.knime.core.node.config.base.ConfigBaseRO getNodeSettings()- Returns:
- user settings for this node, possibly empty but not
null.
-
getNrNodeViews
int getNrNodeViews()Returns the number of views provided by the node implementation.- Returns:
- the number of views provided by the node implementation
-
getViewName
-
getNodeViewName
-
hasInteractiveView
boolean hasInteractiveView()- Returns:
- true if node provides an interactive view.
- Since:
- 2.8
-
getInteractiveViewName
String getInteractiveViewName()Returns the name of the interactive view if such a view exists. Otherwisenullis returned.- Returns:
- name of the interactive view or
null - Since:
- 2.8
-
getInteractiveWebViews
InteractiveWebViewsResultUI getInteractiveWebViews()Get the 'interactive web views' provided by this node. That is, views providing aWebTemplatefor an interactive web view. Native nodes can have at most one view, components may have many (one for each contained view node), metanodes have none.The name associated with the web view (e.g. JS scatter plot) comes from a node's description (xml).
- Returns:
- An new
InteractiveWebViewsResultUIwith possibly 0 or more views.
-
getIcon
URL getIcon() -
getIconAsStream
-
getType
org.knime.core.node.NodeFactory.NodeType getType() -
getID
org.knime.core.node.workflow.NodeID getID() -
getName
String getName() -
getNameWithID
String getNameWithID() -
toString
String toString() -
getDisplayLabel
String getDisplayLabel()- Returns:
- the display label for
NodeView,OutPortViewandNodeDialog
-
getCustomName
String getCustomName()For reporting backward compatibility. If no custom name is set the reporting creates new names (depending on the node id). (The preference page prefix is ignored then.)- Returns:
- the first line of the annotation (which contains in old (pre 2.5) flows the custom name) or null, if no annotation or no old custom name is set.
-
getNodeAnnotation
org.knime.core.node.workflow.NodeAnnotation getNodeAnnotation()- Returns:
- the annotation associated with the node, never null.
-
getCustomDescription
String getCustomDescription() -
setCustomDescription
-
setDeletable
void setDeletable(boolean value) - Parameters:
value- the isDeletable to set
-
isDeletable
boolean isDeletable()- Returns:
- the isDeletable
-
isDirty
boolean isDirty()- Returns:
- the isDirty
-
setDirty
void setDirty()Mark this node container to be changed, that is, it needs to be saved. -
changeNodeLocks
void changeNodeLocks(boolean setLock, org.knime.core.node.workflow.NodeContainer.NodeLock... locks) Changes the nodes lock status for various actions, i.e. from being deleted, reset or configured.- Parameters:
setLock- whether the locks should be set (true) or released (false)locks- the locks to be set or released, e.g.NodeContainer.NodeLock.DELETE,NodeContainer.NodeLock.RESET,NodeContainer.NodeLock.CONFIGURE- Since:
- 3.2
-
getNodeLocks
org.knime.core.node.workflow.NodeContainer.NodeLocks getNodeLocks()Returns the node's lock status, i.e. whether the node is locked from being deleted, reset or configured.- Returns:
- the currently set
NodeContainer.NodeLocks - Since:
- 3.2
-
doRpc
To be called from rpc clients - not needed for local, for remote, picks an endpoint and forwards ui data request to be transported to remote node model and collects the response in `out`.
(De-)serialization is handled byAbstractRpcClient.- Parameters:
remoteProcedureCall- the rpc serialized as a string- Returns:
- serialized result
-