Ejemplo n.º 1
0
  public BindingInfo changeBindingTarget(
      BindingInfo bindingInfo, BoundableElement firstElement, BoundableElement secondElement) {
    if (bindingInfo.getLeft().equals(firstElement)) {
      bindingInfo.setRight(secondElement);
    } else if (bindingInfo.getRight().equals(firstElement)) {
      bindingInfo.setLeft(secondElement);
    }

    return bindingInfo;
  }
Ejemplo n.º 2
0
  public BindingInfo reconnectBindingTarget(
      BindingInfo bindingInfo, BoundableElement oldTarget, BoundableElement newTarget) {
    if (bindingInfo.getLeft().equals(oldTarget)) {
      bindingInfo.setLeft(newTarget);
    } else if (bindingInfo.getRight().equals(oldTarget)) {
      bindingInfo.setRight(newTarget);
    }

    return bindingInfo;
  }