Search in sources :

Example 1 with NewToolTipFigure

use of org.knime.workbench.editor2.figures.NewToolTipFigure in project knime-core by knime.

the class AbstractPortEditPart method rebuildTooltip.

/**
 * Tries to build the tooltip from the port name and if this is a data
 * outport and the node is configured/executed, it appends also the number
 * of columns and rows.
 */
public void rebuildTooltip() {
    if (isInPort()) {
        if (getIndex() < getNodeContainer().getNrInPorts()) {
            NodeInPortUI port = getNodeContainer().getInPort(getIndex());
            String tooltip = getTooltipText(port.getPortName(), port);
            ((NewToolTipFigure) getFigure().getToolTip()).setText(tooltip);
        }
    } else {
        if (getIndex() < getNodeContainer().getNrOutPorts()) {
            NodeOutPortUI port = getNodeContainer().getOutPort(getIndex());
            String tooltip = getTooltipText(port.getPortName(), port);
            ((NewToolTipFigure) getFigure().getToolTip()).setText(tooltip);
        }
    }
}
Also used : NodeOutPortUI(org.knime.core.ui.node.workflow.NodeOutPortUI) NewToolTipFigure(org.knime.workbench.editor2.figures.NewToolTipFigure) NodeInPortUI(org.knime.core.ui.node.workflow.NodeInPortUI)

Example 2 with NewToolTipFigure

use of org.knime.workbench.editor2.figures.NewToolTipFigure in project knime-core by knime.

the class WorkflowInPortEditPart method rebuildTooltip.

/**
 * {@inheritDoc}
 */
@Override
public void rebuildTooltip() {
    NodeOutPortUI port = ((WorkflowInPortUI) getNodeContainer().getInPort(getIndex())).getUnderlyingPort();
    String tooltip = getTooltipText(PORT_NAME + ": " + getIndex(), port);
    ((NewToolTipFigure) getFigure().getToolTip()).setText(tooltip);
}
Also used : NodeOutPortUI(org.knime.core.ui.node.workflow.NodeOutPortUI) WorkflowInPortUI(org.knime.core.ui.node.workflow.WorkflowInPortUI) NewToolTipFigure(org.knime.workbench.editor2.figures.NewToolTipFigure)

Aggregations

NodeOutPortUI (org.knime.core.ui.node.workflow.NodeOutPortUI)2 NewToolTipFigure (org.knime.workbench.editor2.figures.NewToolTipFigure)2 NodeInPortUI (org.knime.core.ui.node.workflow.NodeInPortUI)1 WorkflowInPortUI (org.knime.core.ui.node.workflow.WorkflowInPortUI)1