コード例 #1
0
 /** Destructor. */
 public void remove() {
   for (Iterator<Map.Entry<Long, WImage>> it_it = this.grid_.entrySet().iterator();
       it_it.hasNext(); ) {
     Map.Entry<Long, WImage> it = it_it.next();
     ;
     if (it.getValue() != null) it.getValue().remove();
   }
   super.remove();
 }
コード例 #2
0
 /**
  * Regenerates and redraws the image pieces.
  *
  * <p>This method invalidates all current grid images, and recreates them.
  */
 public void redrawAll() {
   for (Iterator<Map.Entry<Long, WImage>> it_it = this.grid_.entrySet().iterator();
       it_it.hasNext(); ) {
     Map.Entry<Long, WImage> it = it_it.next();
     ;
     if (it.getValue() != null) it.getValue().remove();
   }
   this.grid_.clear();
   this.generateGridItems(this.currentX_, this.currentY_);
 }
コード例 #3
0
 private void cleanGrid() {
   WVirtualImage.Rect cleanNb =
       this.neighbourhood(
           this.currentX_, this.currentY_, this.viewPortWidth_ * 3, this.viewPortHeight_ * 3);
   long i1 = cleanNb.x1 / this.gridImageSize_;
   long j1 = cleanNb.y1 / this.gridImageSize_;
   long i2 = cleanNb.x2 / this.gridImageSize_ + 1;
   long j2 = cleanNb.y2 / this.gridImageSize_ + 1;
   for (Iterator<Map.Entry<Long, WImage>> it_it = this.grid_.entrySet().iterator();
       it_it.hasNext(); ) {
     Map.Entry<Long, WImage> it = it_it.next();
     WVirtualImage.Coordinate coordinate = new WVirtualImage.Coordinate();
     this.decodeKey(it.getKey(), coordinate);
     if (coordinate.i < i1 || coordinate.i > i2 || coordinate.j < j1 || coordinate.j > j2) {;
       if (it.getValue() != null) it.getValue().remove();
       it_it.remove();
     } else {
     }
   }
 }