Package org.knime.core.ui.wrapper
Class NodeOutPortWrapper
java.lang.Object
org.knime.core.ui.wrapper.AbstractWrapper<org.knime.core.node.workflow.NodeOutPort>
org.knime.core.ui.wrapper.NodeOutPortWrapper
- All Implemented Interfaces:
org.knime.core.node.workflow.NodeContainerStateObservable,org.knime.core.node.workflow.NodeStateChangeListener,NodeOutPortUI,NodePortUI,UI,Wrapper<org.knime.core.node.workflow.NodeOutPort>
public class NodeOutPortWrapper
extends AbstractWrapper<org.knime.core.node.workflow.NodeOutPort>
implements NodeOutPortUI
UI-interface implementation that wraps a
NodeOutPort.- Author:
- Martin Horn, University of Konstanz
-
Field Summary
Fields inherited from interface org.knime.core.ui.wrapper.Wrapper
WRAPPER_MAP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNodeOutPortWrapper(org.knime.core.node.workflow.NodeOutPort delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) org.knime.core.node.workflow.FlowObjectStackReturns theFlowObjectStackof the underlying node.org.knime.core.node.workflow.NodeContainerStateorg.knime.core.node.workflow.NodeContainerStateintorg.knime.core.node.port.PortObjectReturns the DataTable for this port, as set by the node this port is output for.org.knime.core.node.port.PortObjectSpecReturns theDataTableSpecor null if not available.Get summary of the underlying port object as provided byPortObject.getSummary().org.knime.core.node.port.PortTypebooleanvoidnotifyNodeStateChangeListener(org.knime.core.node.workflow.NodeStateEvent e) voidopenPortView(String name, Rectangle knimeWindowBounds) Opens the port view for this port with the given name.booleanremoveNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) voidsetPortName(String portName) Sets a new name for this port.voidstateChanged(org.knime.core.node.workflow.NodeStateEvent state) static final NodeOutPortWrapperwrap(org.knime.core.node.workflow.NodeOutPort nop) Wraps the object viaWrapper.wrapOrGet(Object, java.util.function.Function).Methods inherited from class org.knime.core.ui.wrapper.AbstractWrapper
equals, hashCode, toString, unwrap
-
Constructor Details
-
NodeOutPortWrapper
protected NodeOutPortWrapper(org.knime.core.node.workflow.NodeOutPort delegate) - Parameters:
delegate- the implementation to delegate to
-
-
Method Details
-
wrap
Wraps the object viaWrapper.wrapOrGet(Object, java.util.function.Function).- Parameters:
nop- the object to be wrapped- Returns:
- a new wrapper or a already existing one
-
getPortObjectSpec
public org.knime.core.node.port.PortObjectSpec getPortObjectSpec()Description copied from interface:NodeOutPortUIReturns theDataTableSpecor null if not available.- Specified by:
getPortObjectSpecin interfaceNodeOutPortUI- Returns:
- The
DataTableSpecfor this port.
-
getPortObject
public org.knime.core.node.port.PortObject getPortObject()Description copied from interface:NodeOutPortUIReturns the DataTable for this port, as set by the node this port is output for.- Specified by:
getPortObjectin interfaceNodeOutPortUI- Returns:
- PortObject the object for this port. Can be null.
-
stateChanged
public void stateChanged(org.knime.core.node.workflow.NodeStateEvent state) - Specified by:
stateChangedin interfaceorg.knime.core.node.workflow.NodeStateChangeListener
-
getNodeContainerState
public org.knime.core.node.workflow.NodeContainerState getNodeContainerState()- Specified by:
getNodeContainerStatein interfaceorg.knime.core.node.workflow.NodeContainerStateObservable
-
getPortIndex
public int getPortIndex()- Specified by:
getPortIndexin interfaceNodePortUI- Returns:
- The port index.
-
getPortSummary
Description copied from interface:NodeOutPortUIGet summary of the underlying port object as provided byPortObject.getSummary(). It's a separate method since calling getPortObject().getSummary() may force the underlying table (if it is a table) to restore its content from disc. Summaries are saved in the workflow file (or the node's corresponding sub directory).- Specified by:
getPortSummaryin interfaceNodeOutPortUI- Returns:
- The port object's summary.
-
getPortType
public org.knime.core.node.port.PortType getPortType()- Specified by:
getPortTypein interfaceNodePortUI- Returns:
- The port type.
-
addNodeStateChangeListener
public boolean addNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) - Specified by:
addNodeStateChangeListenerin interfaceorg.knime.core.node.workflow.NodeContainerStateObservable
-
getPortName
- Specified by:
getPortNamein interfaceNodePortUI- Returns:
- The port name.
-
setPortName
Description copied from interface:NodePortUISets a new name for this port. If null or an empty string is passed, the default name will be generated: "Port [" + portID + "]".- Specified by:
setPortNamein interfaceNodePortUI- Parameters:
portName- The new name for this port. If null is passed, the default name will be generated.
-
openPortView
Description copied from interface:NodeOutPortUIOpens the port view for this port with the given name.- Specified by:
openPortViewin interfaceNodeOutPortUI- Parameters:
name- The name of the port view.knimeWindowBounds- Bounds of the KNIME window, used to calculate the center which will also be the center of the opened view. If null the center of the primary monitor is used.
-
removeNodeStateChangeListener
public boolean removeNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener) - Specified by:
removeNodeStateChangeListenerin interfaceorg.knime.core.node.workflow.NodeContainerStateObservable
-
isInactive
public boolean isInactive()- Specified by:
isInactivein interfaceNodeOutPortUI- Returns:
- true if the contained spec is not null and instance of
InactiveBranchPortObjectSpec
-
getNodeState
public org.knime.core.node.workflow.NodeContainerState getNodeState()- Specified by:
getNodeStatein interfaceNodeOutPortUI- Returns:
- the state of the node owning this port.
-
getFlowObjectStack
public org.knime.core.node.workflow.FlowObjectStack getFlowObjectStack()Description copied from interface:NodeOutPortUIReturns theFlowObjectStackof the underlying node.- Specified by:
getFlowObjectStackin interfaceNodeOutPortUI- Returns:
- the flow obj stack container
-
notifyNodeStateChangeListener
public void notifyNodeStateChangeListener(org.knime.core.node.workflow.NodeStateEvent e) - Specified by:
notifyNodeStateChangeListenerin interfaceNodeOutPortUI- Parameters:
e- the event which should be forwarded to all regsiteredNodeStateChangeListeners
-