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
  • Constructor Details

    • NodeOutPortWrapper

      protected NodeOutPortWrapper(org.knime.core.node.workflow.NodeOutPort delegate)
      Parameters:
      delegate - the implementation to delegate to
  • Method Details

    • wrap

      public static final NodeOutPortWrapper wrap(org.knime.core.node.workflow.NodeOutPort nop)
      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: NodeOutPortUI
      Returns the DataTableSpec or null if not available.
      Specified by:
      getPortObjectSpec in interface NodeOutPortUI
      Returns:
      The DataTableSpec for this port.
    • getPortObject

      public org.knime.core.node.port.PortObject getPortObject()
      Description copied from interface: NodeOutPortUI
      Returns the DataTable for this port, as set by the node this port is output for.
      Specified by:
      getPortObject in interface NodeOutPortUI
      Returns:
      PortObject the object for this port. Can be null.
    • stateChanged

      public void stateChanged(org.knime.core.node.workflow.NodeStateEvent state)
      Specified by:
      stateChanged in interface org.knime.core.node.workflow.NodeStateChangeListener
    • getNodeContainerState

      public org.knime.core.node.workflow.NodeContainerState getNodeContainerState()
      Specified by:
      getNodeContainerState in interface org.knime.core.node.workflow.NodeContainerStateObservable
    • getPortIndex

      public int getPortIndex()
      Specified by:
      getPortIndex in interface NodePortUI
      Returns:
      The port index.
    • getPortSummary

      public String getPortSummary()
      Description copied from interface: NodeOutPortUI
      Get summary of the underlying port object as provided by PortObject.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:
      getPortSummary in interface NodeOutPortUI
      Returns:
      The port object's summary.
    • getPortType

      public org.knime.core.node.port.PortType getPortType()
      Specified by:
      getPortType in interface NodePortUI
      Returns:
      The port type.
    • addNodeStateChangeListener

      public boolean addNodeStateChangeListener(org.knime.core.node.workflow.NodeStateChangeListener listener)
      Specified by:
      addNodeStateChangeListener in interface org.knime.core.node.workflow.NodeContainerStateObservable
    • getPortName

      public String getPortName()
      Specified by:
      getPortName in interface NodePortUI
      Returns:
      The port name.
    • setPortName

      public void setPortName(String portName)
      Description copied from interface: NodePortUI
      Sets a new name for this port. If null or an empty string is passed, the default name will be generated: "Port [" + portID + "]".
      Specified by:
      setPortName in interface NodePortUI
      Parameters:
      portName - The new name for this port. If null is passed, the default name will be generated.
    • openPortView

      public void openPortView(String name, Rectangle knimeWindowBounds)
      Description copied from interface: NodeOutPortUI
      Opens the port view for this port with the given name.
      Specified by:
      openPortView in interface NodeOutPortUI
      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:
      removeNodeStateChangeListener in interface org.knime.core.node.workflow.NodeContainerStateObservable
    • isInactive

      public boolean isInactive()
      Specified by:
      isInactive in interface NodeOutPortUI
      Returns:
      true if the contained spec is not null and instance of InactiveBranchPortObjectSpec
    • getNodeState

      public org.knime.core.node.workflow.NodeContainerState getNodeState()
      Specified by:
      getNodeState in interface NodeOutPortUI
      Returns:
      the state of the node owning this port.
    • getFlowObjectStack

      public org.knime.core.node.workflow.FlowObjectStack getFlowObjectStack()
      Description copied from interface: NodeOutPortUI
      Returns the FlowObjectStack of the underlying node.
      Specified by:
      getFlowObjectStack in interface NodeOutPortUI
      Returns:
      the flow obj stack container
    • notifyNodeStateChangeListener

      public void notifyNodeStateChangeListener(org.knime.core.node.workflow.NodeStateEvent e)
      Specified by:
      notifyNodeStateChangeListener in interface NodeOutPortUI
      Parameters:
      e - the event which should be forwarded to all regsitered NodeStateChangeListeners