Example #1
0
  private void collectAbsoluteGrid(Collection<Integer> grids_x, Collection<Integer> grids_y) {
    // if(this.width == 0 || this.height == 0) return;

    grids_x.add(this.absoluteX);
    grids_y.add(this.absoluteY);

    if (this.width > 0) {
      grids_x.add(this.absoluteX + this.width - 1);
      grids_x.add(this.absoluteX + this.width + 1);
    }

    if (this.height > 0) {
      grids_y.add(this.absoluteY + this.height - 1);
      grids_y.add(this.absoluteY + this.height + 1);
    }

    if (this.children != null)
      for (ViewComponentInfo child : this.children) {
        child.collectAbsoluteGrid(grids_x, grids_y);
      }
  }