Beispiel #1
0
  private void updateMarginSize(CompoundModel root) {
    for (Object o : root.getChildren()) {
      GraphObject child = (GraphObject) o;

      if (child instanceof CompoundModel) {
        updateMarginSize((CompoundModel) child);
      }
    }

    root.calculateSizeUp();
  }
Beispiel #2
0
  public void setMarginSize(int margin) {
    this.MARGIN_SIZE = margin;
    CompoundModel root = this;

    while (root.getParentModel() != null) {
      root = root.getParentModel();
    }

    for (Object o : root.getChildren()) {
      if (o instanceof CompoundModel) {
        updateMarginSize((CompoundModel) o);
      }
    }
  }