示例#1
0
  @Override
  public void markDamaged(final Bounds bounds) {
    if (spy != null) {
      spy.addDamagedArea(bounds);
    }

    synchronized (redrawArea) {
      if (redrawArea.equals(NO_REDRAW)) {
        redrawArea.setBounds(bounds);
        UI_LOG.debug("damage - new area " + redrawArea);
      } else {
        if (!bounds.getSize().equals(NO_SIZE)) {
          redrawArea.union(bounds);
          UI_LOG.debug("damage - extend area " + redrawArea + " - to include " + bounds);
        }
      }
    }
  }