Exemplo n.º 1
0
  public void setContainerLastActions(List<ActionItem> lastActions) {
    removeContainerLastActions();

    for (ActionItem lastAction : lastActions) {
      lastAction.ensureLastActionOf().add(this);
    }

    containerLastActions = lastActions;
  }
Exemplo n.º 2
0
  public void setJumpTarget(ActionItem item) {
    removeJumpTarget();

    if (item == null) {
      return;
    }

    if (item.jumpsHere == null) {
      item.jumpsHere = new HashSet<>();
    }

    item.jumpsHere.add(this);
    jumpTarget = item;
  }
Exemplo n.º 3
0
  public void replaceContainerLastAction(ActionItem oldItem, ActionItem newItem) {
    if (containerLastActions == null) {
      return;
    }

    for (int i = 0; i < containerLastActions.size(); i++) {
      if (containerLastActions.get(i) == oldItem) {
        containerLastActions.set(i, newItem);
        if (oldItem.lastActionOf != null) {
          oldItem.lastActionOf.remove(this);
        }

        newItem.ensureLastActionOf().add(this);
      }
    }
  }