use of com.revolsys.swing.map.layer.BaseMapLayerGroup in project com.revolsys.open by revolsys.
the class LayerRendererOverlay method setLayer.
public void setLayer(final Layer layer) {
final Layer old = this.layer;
if (old != layer) {
if (old != null) {
if (old.getParent() instanceof BaseMapLayerGroup) {
old.setVisible(false);
}
Property.removeListener(old, this);
}
this.layer = layer;
if (layer != null) {
Property.addListener(layer, this);
if (layer.getParent() instanceof BaseMapLayerGroup) {
layer.setVisible(true);
}
if (layer.isInitialized()) {
layer.refresh();
}
}
this.image = null;
redraw();
firePropertyChange("layer", old, layer);
}
}
Aggregations