Beispiel #1
0
 public void restore(OMGeometry source) {
   super.restore(source);
   if (source instanceof OMDistance) {
     OMDistance dist = (OMDistance) source;
     this.labels = DeepCopyUtil.deepCopy(dist.labels);
     this.points = DeepCopyUtil.deepCopy(dist.points);
     this.distUnits = dist.distUnits;
     this.df = new DecimalFormat(dist.df.toLocalizedPattern());
     this.labelPaint = dist.labelPaint;
     if (dist.labelFont != null) {
       this.labelFont = dist.labelFont.deriveFont(AffineTransform.TYPE_IDENTITY);
     }
   }
 }
Beispiel #2
0
 public void restore(OMGeometry source) {
   super.restore(source);
   if (source instanceof OMRasterObject) {
     OMRasterObject rasterO = (OMRasterObject) source;
     this.colorModel = rasterO.colorModel;
     this.pixels = DeepCopyUtil.deepCopy(rasterO.pixels);
     this.x = rasterO.x;
     this.y = rasterO.y;
     this.lat = rasterO.lat;
     this.lon = rasterO.lon;
     this.width = rasterO.width;
     this.height = rasterO.height;
     this.bits = DeepCopyUtil.deepCopy(rasterO.bits);
     this.filteredWidth = rasterO.filteredWidth;
     this.filteredHeight = rasterO.filteredHeight;
     this.rotationAngle = rasterO.rotationAngle;
     // OKOK, again, not a deep copy.
     this.imageFilter = rasterO.imageFilter;
   }
 }