Search in sources :

Example 1 with Builder

use of org.knime.core.node.workflow.ConnectionUIInformation.Builder in project knime-core by knime.

the class NewBendpointMoveCommand method undo.

/**
 * {@inheritDoc}
 */
@Override
public void undo() {
    ConnectionContainer connection = getConnection();
    ConnectionUIInformation uiInfo = connection.getUIInfo();
    Point oldLocation = m_oldLocation.getCopy();
    Builder builder = ConnectionUIInformation.builder(uiInfo);
    builder.removeBendpoint(m_index);
    builder.addBendpoint(oldLocation.x, oldLocation.y, m_index);
    // issue notification
    connection.setUIInfo(builder.build());
}
Also used : ConnectionContainer(org.knime.core.node.workflow.ConnectionContainer) Builder(org.knime.core.node.workflow.ConnectionUIInformation.Builder) ConnectionUIInformation(org.knime.core.node.workflow.ConnectionUIInformation) Point(org.eclipse.draw2d.geometry.Point)

Aggregations

Point (org.eclipse.draw2d.geometry.Point)1 ConnectionContainer (org.knime.core.node.workflow.ConnectionContainer)1 ConnectionUIInformation (org.knime.core.node.workflow.ConnectionUIInformation)1 Builder (org.knime.core.node.workflow.ConnectionUIInformation.Builder)1