use of com.revolsys.swing.map.layer.NullLayer in project com.revolsys.open by revolsys.
the class LayerRendererOverlay method paintComponent.
@Override
public void paintComponent(final Graphics g) {
if (!(this.layer instanceof NullLayer)) {
GeoreferencedImage image;
synchronized (this.loadSync) {
image = this.image;
if ((image == null || this.loadImage) && this.imageWorker == null) {
final BoundingBox boundingBox = this.viewport.getBoundingBox();
final int viewWidthPixels = this.viewport.getViewWidthPixels();
final int viewHeightPixels = this.viewport.getViewHeightPixels();
final GeoreferencedImage loadImage = new BufferedGeoreferencedImage(boundingBox, viewWidthPixels, viewHeightPixels);
this.imageWorker = new LayerRendererOverlaySwingWorker(this, loadImage);
Invoke.worker(this.imageWorker);
}
}
if (image != null) {
render((Graphics2D) g);
}
}
}
Aggregations